aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-09-29 15:55:55 +0000
committerAndrew Cagney <cagney@redhat.com>2004-09-29 15:55:55 +0000
commitee21b650be3203a6ace921530e694ef045613d0a (patch)
treed954e745ecadcf75b128ab9cfac1d63edd05c8e1
parenta182eed6e25da26d08047ce884748547da0c0b36 (diff)
downloadfsf-binutils-gdb-ee21b650be3203a6ace921530e694ef045613d0a.zip
fsf-binutils-gdb-ee21b650be3203a6ace921530e694ef045613d0a.tar.gz
fsf-binutils-gdb-ee21b650be3203a6ace921530e694ef045613d0a.tar.bz2
2004-09-29 Andrew Cagney <cagney@gnu.org>
* infptrace.c (ptrace_wait): Mention problem with HPUX. (kill_inferior): Inline ptrace_wait call. * linux-nat.c (kill_inferior): Inline ptrace_wait call. * inftarg.c (child_wait): Inline ptrace_wait call.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/infptrace.c6
-rw-r--r--gdb/inftarg.c2
-rw-r--r--gdb/linux-nat.c6
4 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1f7947f..060cac9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2004-09-29 Andrew Cagney <cagney@gnu.org>
+ * infptrace.c (ptrace_wait): Mention problem with HPUX.
+ (kill_inferior): Inline ptrace_wait call.
+ * linux-nat.c (kill_inferior): Inline ptrace_wait call.
+ * inftarg.c (child_wait): Inline ptrace_wait call.
+
+2004-09-29 Andrew Cagney <cagney@gnu.org>
+
* target.h (struct target_ops): Delete field to_post_wait.
(target_post_wait): Delete macro.
(child_post_wait): Delete declaration.
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 2428722..1db795b 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -138,6 +138,10 @@ call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
/* Wait for a process to finish, possibly running a target-specific
hook before returning. */
+/* NOTE: cagney: 2004-09-29: Dependant on the native configuration,
+ "hppah-nat.c" may either call this or infttrace.c's implementation
+ of ptrace_wait. See "hppahpux.mh". */
+
int
ptrace_wait (ptid_t ptid, int *status)
{
@@ -170,7 +174,7 @@ kill_inferior (void)
The kill call causes problems under hpux10, so it's been removed;
if this causes problems we'll deal with them as they arise. */
ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3) 0, 0);
- ptrace_wait (null_ptid, &status);
+ wait (status);
target_mourn_inferior ();
}
#endif /* DEPRECATED_KILL_INFERIOR */
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 7238576..e0b6a31 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -113,7 +113,7 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
attached process. */
set_sigio_trap ();
- pid = ptrace_wait (inferior_ptid, &status);
+ pid = wait (&status);
save_errno = errno;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 88e8cb3..8ceb1e7 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -522,12 +522,12 @@ kill_inferior (void)
|| last.kind == TARGET_WAITKIND_VFORKED)
{
ptrace (PT_KILL, last.value.related_pid, 0, 0);
- ptrace_wait (null_ptid, &status);
+ wait (&status);
}
/* Kill the current process. */
ptrace (PT_KILL, pid, 0, 0);
- ret = ptrace_wait (null_ptid, &status);
+ ret = wait (&status);
/* We might get a SIGCHLD instead of an exit status. This is
aggravated by the first kill above - a child has just died. */
@@ -535,7 +535,7 @@ kill_inferior (void)
while (ret == pid && WIFSTOPPED (status))
{
ptrace (PT_KILL, pid, 0, 0);
- ret = ptrace_wait (null_ptid, &status);
+ ret = wait (&status);
}
target_mourn_inferior ();