diff options
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/amd64-linux-nat.c | 31 | ||||
-rw-r--r-- | gdb/amd64-linux-tdep.c | 2 | ||||
-rw-r--r-- | gdb/amd64-tdep.h | 3 |
4 files changed, 17 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe5eb7b..7d007b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2010-04-22 H.J. Lu <hongjiu.lu@intel.com> + + * amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Removed. + (_initialize_amd64_linux_nat): Replace + amd64_linux_gregset64_reg_offset with + amd64_linux_gregset_reg_offset. + + * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Make it + global. + + * amd64-tdep.h (amd64_linux_gregset_reg_offset): New. + 2010-04-22 Pierre Muller <muller@ics.u-strasbg.fr> PR stabs/11479. diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index 9812610..c0edc10 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -68,33 +68,6 @@ static int have_ptrace_getregset = -1; /* Mapping between the general-purpose registers in GNU/Linux x86-64 - `struct user' format and GDB's register cache layout. */ - -static int amd64_linux_gregset64_reg_offset[] = -{ - RAX * 8, RBX * 8, /* %rax, %rbx */ - RCX * 8, RDX * 8, /* %rcx, %rdx */ - RSI * 8, RDI * 8, /* %rsi, %rdi */ - RBP * 8, RSP * 8, /* %rbp, %rsp */ - R8 * 8, R9 * 8, /* %r8 ... */ - R10 * 8, R11 * 8, - R12 * 8, R13 * 8, - R14 * 8, R15 * 8, /* ... %r15 */ - RIP * 8, EFLAGS * 8, /* %rip, %eflags */ - CS * 8, SS * 8, /* %cs, %ss */ - DS * 8, ES * 8, /* %ds, %es */ - FS * 8, GS * 8, /* %fs, %gs */ - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - ORIG_RAX * 8 -}; - - -/* Mapping between the general-purpose registers in GNU/Linux x86-64 `struct user' format and GDB's register cache layout for GNU/Linux i386. @@ -807,13 +780,11 @@ _initialize_amd64_linux_nat (void) amd64_native_gregset32_reg_offset = amd64_linux_gregset32_reg_offset; amd64_native_gregset32_num_regs = I386_LINUX_NUM_REGS; - amd64_native_gregset64_reg_offset = amd64_linux_gregset64_reg_offset; + amd64_native_gregset64_reg_offset = amd64_linux_gregset_reg_offset; amd64_native_gregset64_num_regs = AMD64_LINUX_NUM_REGS; gdb_assert (ARRAY_SIZE (amd64_linux_gregset32_reg_offset) == amd64_native_gregset32_num_regs); - gdb_assert (ARRAY_SIZE (amd64_linux_gregset64_reg_offset) - == amd64_native_gregset64_num_regs); /* Fill in the generic GNU/Linux methods. */ t = linux_target (); diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index 7376ba7..1eac4c6 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -62,7 +62,7 @@ static struct core_regset_section amd64_linux_regset_sections[] = format and GDB's register cache layout. */ /* From <sys/reg.h>. */ -static int amd64_linux_gregset_reg_offset[] = +int amd64_linux_gregset_reg_offset[] = { 10 * 8, /* %rax */ 5 * 8, /* %rbx */ diff --git a/gdb/amd64-tdep.h b/gdb/amd64-tdep.h index 9f07dda..e67106d 100644 --- a/gdb/amd64-tdep.h +++ b/gdb/amd64-tdep.h @@ -109,6 +109,9 @@ void amd64_classify (struct type *type, enum amd64_reg_class class[2]); +/* Variables exported from amd64-linux-tdep.c. */ +extern int amd64_linux_gregset_reg_offset[]; + /* Variables exported from amd64nbsd-tdep.c. */ extern int amd64nbsd_r_reg_offset[]; |