aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-nat.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-08-19 15:15:18 +0000
committerDaniel Jacobowitz <drow@false.org>2006-08-19 15:15:18 +0000
commit8695c747d81a46944b5e7fbf91a29e60bc75ec8a (patch)
tree6cd60ddca9b65060de414b774d46681879de4769 /gdb/amd64-linux-nat.c
parentc17eaafea78b9fef73ab2ec654812c8a1f31987a (diff)
downloadgdb-8695c747d81a46944b5e7fbf91a29e60bc75ec8a.zip
gdb-8695c747d81a46944b5e7fbf91a29e60bc75ec8a.tar.gz
gdb-8695c747d81a46944b5e7fbf91a29e60bc75ec8a.tar.bz2
gdb/
* Makefile.in (amd64_linux_tdep_h): New. (amd64-linux-nat.o, amd64-linux-tdep.o): Update. * amd64-linux-nat.c (amd64_linux_gregset64_reg_offset): Add ORIG_RAX. (_initialize_amd64_linux_nat): Set amd64_native_gregset64_num_regs. * amd64-linux-tdep.c (amd64_linux_register_name) (amd64_linux_register_type, amd64_linux_register_reggroup_p) (amd64_linux_write_pc): New. (amd64_linux_init_abi): Use them, and update num_regs. * amd64-linux-tdep.h: New file. * amd64-tdep.c (amd64_register_name, amd64_register_type): Make public. * amd64-tdep.h (amd64_register_name, amd64_register_type): New prototypes. * regformats/reg-x86-64-linux.dat: New file. gdb/testsuite/ * Makefile.in (clean): Clean reg-x86-64-linux.c. (reg-x86-64-linux.o, reg-x86-64-linux.c): New. * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o. * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX. (x86_64_fill_gregset, x86_64_store_gregset): Skip floating point registers.
Diffstat (limited to 'gdb/amd64-linux-nat.c')
-rw-r--r--gdb/amd64-linux-nat.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index b4a7112..fca05c8 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -26,6 +26,7 @@
#include "gdbcore.h"
#include "regcache.h"
#include "linux-nat.h"
+#include "amd64-linux-tdep.h"
#include "gdb_assert.h"
#include "gdb_string.h"
@@ -68,7 +69,12 @@ static int amd64_linux_gregset64_reg_offset[] =
RIP * 8, EFLAGS * 8, /* %rip, %eflags */
CS * 8, SS * 8, /* %cs, %ss */
DS * 8, ES * 8, /* %ds, %es */
- FS * 8, GS * 8 /* %fs, %gs */
+ 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,
+ ORIG_RAX * 8
};
@@ -382,6 +388,7 @@ _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_num_regs = AMD64_LINUX_NUM_REGS;
gdb_assert (ARRAY_SIZE (amd64_linux_gregset32_reg_offset)
== amd64_native_gregset32_num_regs);