2003-08-18 Michal Ludvig <mludvig@suse.cz>
authorMichal Ludvig <mludvig@suse.cz>
Mon, 18 Aug 2003 13:42:13 +0000 (13:42 +0000)
committerMichal Ludvig <mludvig@suse.cz>
Mon, 18 Aug 2003 13:42:13 +0000 (13:42 +0000)
* config/i386/nm-x86-64linux.h (LINUX_CHILD_POST_STARTUP_INFERIOR):
Define.
* i386-linux-nat.c: Include "linux-nat.h".
(child_post_startup_inferior): New function.

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

index 4ac481d4136a2b74de98212d568bc6d4e8393e8b..4fb1d2211c63f429bb5dadbafb3e51437bcd6ec6 100644 (file)
@@ -1,3 +1,10 @@
+2003-08-18  Michal Ludvig  <mludvig@suse.cz>
+
+       * config/i386/nm-x86-64linux.h (LINUX_CHILD_POST_STARTUP_INFERIOR):
+       Define.
+       * i386-linux-nat.c: Include "linux-nat.h".
+       (child_post_startup_inferior): New function.
+       
 2003-08-18  Mark Kettenis  <kettenis@gnu.org>
 
        * i386-tdep.c (i386_analyze_register_saves): Handle register saves
index 8ff80957d577a9f38f01c77245d6434c4b048c7d..d1ac9104a15f6465e806bc46271e0904383f7196 100644 (file)
@@ -61,4 +61,9 @@ extern unsigned long x86_64_linux_dr_get_status (void);
 /* Override copies of {fetch,store}_inferior_registers in `infptrace.c'.  */
 #define FETCH_INFERIOR_REGISTERS
 
+/* `linux-nat.c' and `i386-nat.c' have their own versions of
+   child_post_startup_inferior.  Define this to use the copy in
+   `x86-86-linux-nat.c' instead, which calls both.  */
+#define LINUX_CHILD_POST_STARTUP_INFERIOR
+
 #endif /* NM_X86_64_LINUX_H */
index 87b69c9d853b8c77a02509352b5ca007c96c7764..66a1b68b08a65b3ba8aa851a37027d255988104b 100644 (file)
@@ -25,6 +25,7 @@
 #include "inferior.h"
 #include "gdbcore.h"
 #include "regcache.h"
+#include "linux-nat.h"
 
 #include "gdb_assert.h"
 #include "gdb_string.h"
@@ -347,3 +348,9 @@ ps_get_thread_area (const struct ps_prochandle *ph,
   return PS_ERR;               /* ptrace failed.  */
 }
 
+void
+child_post_startup_inferior (ptid_t ptid)
+{
+  i386_cleanup_dregs ();
+  linux_child_post_startup_inferior (ptid);
+}