aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2002-01-20 09:29:41 +0000
committerAndreas Jaeger <aj@suse.de>2002-01-20 09:29:41 +0000
commitb7c4cbf8b4a2e7982be529ef16721b26f8d987b0 (patch)
treec82ea7a5e251064e53a22184a49bd8a2a37a1deb
parentabf22e64b87ca49a240cf75576070fc8cd3db04b (diff)
downloadgdb-b7c4cbf8b4a2e7982be529ef16721b26f8d987b0.zip
gdb-b7c4cbf8b4a2e7982be529ef16721b26f8d987b0.tar.gz
gdb-b7c4cbf8b4a2e7982be529ef16721b26f8d987b0.tar.bz2
2002-01-20 Jiri Smid <smid@suse.cz>
* config/i386/x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed. * x86-64-linux-nat.c (x86_64_register_u_addr): New function. * config/i386/nm-x86-64.h (ATTACH_LWP): Removed. * Makefile.in (x86-64-tdep.o, x86-64-linux-tdep.o, x86-64-linux-nat.o): Fix dependencies.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/Makefile.in13
-rw-r--r--gdb/config/i386/nm-x86-64.h8
-rw-r--r--gdb/x86-64-linux-nat.c23
4 files changed, 37 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 31f9bd0..e247174 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -3,6 +3,12 @@
* configure.host, configure.tgt: Support x86-64.
* NEWS: Note new target x86-64.
+ * config/i386/x86-64linux.mh (NATDEPFILES): x86-64-nat.o removed.
+ * x86-64-linux-nat.c (x86_64_register_u_addr): New function.
+ * config/i386/nm-x86-64.h (ATTACH_LWP): Removed.
+ * Makefile.in (x86-64-tdep.o, x86-64-linux-tdep.o,
+ x86-64-linux-nat.o): Fix dependencies.
+
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* utils.c: Remove #ifndef MALLOC_INCOMPATIBLE.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 873d238..855e79f 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2135,14 +2135,15 @@ values.o: values.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \
vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax.h $(defs_h) $(symtab_h)
x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h
+ $(gdbcore_h) $(regcache_h) x86-64-tdep.h i386-tdep.h $(dwarf2cfi_h)
-x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h \
- i386-tdep.h $(value_h)
+x86-64-tdep.o : x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) $(gdbcmd_h) \
+ $(arch_utils_h) $(regcache_h) $(symfile_h) x86-64-tdep.h i386-tdep.h \
+ $(dwarf2cfi_h) gdb_assert.h
-x86-64-linux-tdep.o : x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
- $(gdbcore_h) $(regcache_h) i387-nat.h x86-64-tdep.h i386-tdep.h
+x86-64-linux-nat.o : x86-64-linux-nat.c $(defs_h) $(inferior_h) \
+ $(gdbcore_h) $(regcache_h) i387-nat.h gdb_assert.h x86-64-tdep.h \
+ i386-tdep.h
win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
$(gdb_string_h) $(regcache_h) $(completer_h)
diff --git a/gdb/config/i386/nm-x86-64.h b/gdb/config/i386/nm-x86-64.h
index bbbea9f..4f668a4 100644
--- a/gdb/config/i386/nm-x86-64.h
+++ b/gdb/config/i386/nm-x86-64.h
@@ -1,6 +1,5 @@
/* Native support for Linux/x86-64.
- Copyright 2001
- Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -85,12 +84,7 @@ extern int kernel_u_size (void);
/* Override child_resume in `infptrace.c'. */
#define CHILD_RESUME
-// extern int lin_lwp_prepare_to_proceed (void);
#undef PREPARE_TO_PROCEED
-// #define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
-
-extern void lin_lwp_attach_lwp (ptid_t pid, int verbose);
-#define ATTACH_LWP(pid, verbose) lin_lwp_attach_lwp ((pid), (verbose))
#include <signal.h>
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 978df95..eb63566 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -558,6 +558,29 @@ static long debug_control_mirror;
/* Record which address associates with which register. */
static CORE_ADDR address_lookup[DR_LASTADDR - DR_FIRSTADDR + 1];
+/* Return the address of register REGNUM. BLOCKEND is the value of
+ u.u_ar0, which should point to the registers. */
+CORE_ADDR
+x86_64_register_u_addr (CORE_ADDR blockend, int regnum)
+{
+ struct user u;
+ CORE_ADDR fpstate;
+ CORE_ADDR ubase;
+ ubase = blockend;
+ if (IS_FP_REGNUM(regnum))
+ {
+ fpstate = ubase + ((char *) &u.i387.st_space - (char *) &u);
+ return (fpstate + 16 * (regnum - FP0_REGNUM));
+ }
+ else if (IS_SSE_REGNUM(regnum))
+ {
+ fpstate = ubase + ((char *) &u.i387.xmm_space - (char *) &u);
+ return (fpstate + 16 * (regnum - XMM0_REGNUM));
+ }
+ else
+ return (ubase + 8 * x86_64_regmap[regnum]);
+}
+
void
_initialize_x86_64_linux_nat (void)
{