[RFA] Fix amd64 dwarf register number mapping
Commit Message
dwarf register number is defined in
"System V Application Binary Interface
AMD64 Architecture Processor Supplement
Draft Version 0.99.6"
The amd64_dwarf_regmap array
is missing the 8 MMX registers
in Figure 3.36: DWARF Register Number Mapping page 57.
This leads to a wrong value for the
registers past this point.
I don't know if there are already
cases where this really fixes a problem,
but it is nevertheless a valid correction.
Is this OK, or is there a valid reason for
this "miss"?
Pierre Muller
Pascal language maintainer of GDB
2014-10-01 Pierre Muller <muller@sourceware.org>
* amd64-tdep.c (amd64_dwarf_regmap array): Fix amd64 dwarf
register numbering, by adding missing MMX registers.
@@ -201,7 +201,11 @@ static int amd64_dwarf_regmap[] =
AMD64_ST0_REGNUM + 4, AMD64_ST0_REGNUM + 5,
AMD64_ST0_REGNUM + 6, AMD64_ST0_REGNUM + 7,
- /* Control and Status Flags Register. */
+ /* MMX Registers 0 - 7. Currently not handled,
+ see "tdep->num_mmx_regs = 0;" below. */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+
+ /* Control and Status Flags Register. */
AMD64_EFLAGS_REGNUM,
/* Selector Registers. */