aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
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/gdbserver
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/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog9
-rw-r--r--gdb/gdbserver/Makefile.in5
-rw-r--r--gdb/gdbserver/configure.srv2
-rw-r--r--gdb/gdbserver/linux-x86-64-low.c13
4 files changed, 24 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a5a735a..25b7ed5 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * 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.
+
2006-08-08 Richard Sandiford <richard@codesourcery.com>
* server.c (terminal_fd): New variable.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 01642c8..f443a28 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -206,7 +206,7 @@ clean:
rm -f gdbserver gdbreplay core make.log
rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c
rm -f reg-ppc.c reg-sh.c reg-x86-64.c reg-i386-linux.c
- rm -f reg-cris.c reg-crisv32.c
+ rm -f reg-cris.c reg-crisv32.c reg-x86-64-linux.c
maintainer-clean realclean distclean: clean
rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log
@@ -334,5 +334,8 @@ reg-sh.c : $(srcdir)/../regformats/reg-sh.dat $(regdat_sh)
reg-x86-64.o : reg-x86-64.c $(regdef_h)
reg-x86-64.c : $(srcdir)/../regformats/reg-x86-64.dat $(regdat_sh)
sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64.dat reg-x86-64.c
+reg-x86-64-linux.o : reg-x86-64-linux.c $(regdef_h)
+reg-x86-64-linux.c : $(srcdir)/../regformats/reg-x86-64-linux.dat $(regdat_sh)
+ sh $(regdat_sh) $(srcdir)/../regformats/reg-x86-64-linux.dat reg-x86-64-linux.c
# This is the end of "Makefile.in".
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 46383db..40805e5 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -97,7 +97,7 @@ case "${target}" in
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- x86_64-*-linux*) srv_regobj=reg-x86-64.o
+ x86_64-*-linux*) srv_regobj=reg-x86-64-linux.o
srv_tgtobj="linux-low.o linux-x86-64-low.o i387-fp.o"
srv_linux_regsets=yes
srv_linux_thread_db=yes
diff --git a/gdb/gdbserver/linux-x86-64-low.c b/gdb/gdbserver/linux-x86-64-low.c
index 43cd10b..e067b9c 100644
--- a/gdb/gdbserver/linux-x86-64-low.c
+++ b/gdb/gdbserver/linux-x86-64-low.c
@@ -50,7 +50,12 @@ static int x86_64_regmap[] = {
R8 * 8, R9 * 8, R10 * 8, R11 * 8,
R12 * 8, R13 * 8, R14 * 8, R15 * 8,
RIP * 8, EFLAGS * 8, CS * 8, SS * 8,
- DS * 8, ES * 8, FS * 8, GS * 8
+ DS * 8, ES * 8, FS * 8, GS * 8,
+ -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
};
#define X86_64_NUM_GREGS (sizeof(x86_64_regmap)/sizeof(int))
@@ -83,7 +88,8 @@ x86_64_fill_gregset (void *buf)
int i;
for (i = 0; i < X86_64_NUM_GREGS; i++)
- collect_register (i, ((char *) buf) + x86_64_regmap[i]);
+ if (x86_64_regmap[i] != -1)
+ collect_register (i, ((char *) buf) + x86_64_regmap[i]);
}
static void
@@ -92,7 +98,8 @@ x86_64_store_gregset (const void *buf)
int i;
for (i = 0; i < X86_64_NUM_GREGS; i++)
- supply_register (i, ((char *) buf) + x86_64_regmap[i]);
+ if (x86_64_regmap[i] != -1)
+ supply_register (i, ((char *) buf) + x86_64_regmap[i]);
}
static void