diff options
author | Michal Ludvig <mludvig@suse.cz> | 2002-03-27 10:21:29 +0000 |
---|---|---|
committer | Michal Ludvig <mludvig@suse.cz> | 2002-03-27 10:21:29 +0000 |
commit | de220d0ff6d5ded0d71443c15a012a616fd7a17a (patch) | |
tree | 04053f7151b3b37a6abe9c4871a6f4a1fd8e00b4 /gdb/x86-64-linux-nat.c | |
parent | 0e98d0a7510d45111a189ecd2baed6d15c61a11b (diff) | |
download | gdb-de220d0ff6d5ded0d71443c15a012a616fd7a17a.zip gdb-de220d0ff6d5ded0d71443c15a012a616fd7a17a.tar.gz gdb-de220d0ff6d5ded0d71443c15a012a616fd7a17a.tar.bz2 |
* x86-64-tdep.h (X86_64_NUM_REGS, X86_64_NUM_GREGS): Delete #defines.
(x86_64_num_regs, x86_64_num_gregs): Added extern variables.
* x86-64-linux-nat.c (x86_64_regmap): Swapped RBX <> RDX, added DS, ES, FS, GS.
(x86_64_linux_dr_get_status, supply_gregset),
(fill_gregset): Changed X86_64_NUM_GREGS to x86_64_num_gregs.
* x86-64-tdep.c (x86_64_register_raw_size_table): Delete.
(x86_64_register_info_table): Add.
(X86_64_NUM_REGS, X86_64_NUM_GREGS): Add.
(x86_64_register_raw_size, x86_64_register_virtual_type),
(x86_64_register_name, _initialize_x86_64_tdep): Changed to reflect new
general x86_64_register_info_table.
(i386_gdbarch_init): gdbarch_register_bytes is now set
dynamicaly during initialization.
* regformats/reg-x86-64.dat: Synced with changes to registers above.
* gdbserver/linux-x86-64-low.c: Ditto.
Diffstat (limited to 'gdb/x86-64-linux-nat.c')
-rw-r--r-- | gdb/x86-64-linux-nat.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c index aafd2be..4e15cb9 100644 --- a/gdb/x86-64-linux-nat.c +++ b/gdb/x86-64-linux-nat.c @@ -39,11 +39,12 @@ format and GDB's register array layout. */ static int x86_64_regmap[] = { - RAX, RDX, RCX, RBX, + RAX, RBX, RCX, RDX, RSI, RDI, RBP, RSP, R8, R9, R10, R11, R12, R13, R14, R15, - RIP, EFLAGS + RIP, EFLAGS, + DS, ES, FS, GS }; static unsigned long @@ -125,7 +126,7 @@ x86_64_linux_dr_get_status (void) the register sets used by `ptrace'. */ #define GETREGS_SUPPLIES(regno) \ - (0 <= (regno) && (regno) <= 17) + (0 <= (regno) && (regno) < x86_64_num_gregs) #define GETFPREGS_SUPPLIES(regno) \ (FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM) @@ -144,7 +145,7 @@ supply_gregset (elf_gregset_t * gregsetp) elf_greg_t *regp = (elf_greg_t *) gregsetp; int i; - for (i = 0; i < X86_64_NUM_GREGS; i++) + for (i = 0; i < x86_64_num_gregs; i++) supply_register (i, (char *) (regp + x86_64_regmap[i])); } @@ -158,7 +159,7 @@ fill_gregset (elf_gregset_t * gregsetp, int regno) elf_greg_t *regp = (elf_greg_t *) gregsetp; int i; - for (i = 0; i < X86_64_NUM_GREGS; i++) + for (i = 0; i < x86_64_num_gregs; i++) if ((regno == -1 || regno == i)) read_register_gen (i, regp + x86_64_regmap[i]); } |