OSDN Git Service

2002-01-20 Jiri Smid <smid@suse.cz>
authorAndreas Jaeger <aj@suse.de>
Sun, 20 Jan 2002 09:29:41 +0000 (09:29 +0000)
committerAndreas Jaeger <aj@suse.de>
Sun, 20 Jan 2002 09:29:41 +0000 (09:29 +0000)
* 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.

gdb/ChangeLog
gdb/Makefile.in
gdb/config/i386/nm-x86-64.h
gdb/x86-64-linux-nat.c

index 31f9bd0..e247174 100644 (file)
@@ -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.
index 873d238..855e79f 100644 (file)
@@ -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)
index bbbea9f..4f668a4 100644 (file)
@@ -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>
 
index 978df95..eb63566 100644 (file)
@@ -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)
 {