* 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.
* 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.
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)
/* 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.
/* 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>
/* 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)
{