aboutsummaryrefslogtreecommitdiff
path: root/gdb/infptrace.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-01-21 16:22:51 +0000
committerJeff Law <law@redhat.com>1994-01-21 16:22:51 +0000
commit918fea3e3ca140642536617d04e32b5f4e4077a6 (patch)
tree250addf549f6a6de41625dbd8c98db564db823b1 /gdb/infptrace.c
parent1b880e74fb2800a7878dec5bfc2b271149e97af6 (diff)
downloadgdb-918fea3e3ca140642536617d04e32b5f4e4077a6.zip
gdb-918fea3e3ca140642536617d04e32b5f4e4077a6.tar.gz
gdb-918fea3e3ca140642536617d04e32b5f4e4077a6.tar.bz2
* infptrace.c (child_xfer_memory): Only use if CHILD_XFER_MEMORY
is not defined. * hppab-nat.c (call_ptrace): Delete redundant function. (kill_inferior, attach, detach, child_resume): Likewise. (child_xfer_memory): Likewise. * hppah-nat.c (call_ptrace): Delete redundant function. (kill_inferior, attach, detach, child_resume): Likewise. * config/pa/hppabsd.mh (NATDEPFILES): Add infptrace.o. * config/pa/hppahpux.mh (NATDEPFILES): Add infptrace.o. * config/pa/nm-hppab.h (FETCH_INFERIOR_REGISTERS): Define. * config/pa/nm-hppah.h (FETCH_INFERIOR_REGISTERS): Define. (CHILD_XFER_MEMORY): Define. (PT_*): Define so that generic infptrace.c code can be used.
Diffstat (limited to 'gdb/infptrace.c')
-rw-r--r--gdb/infptrace.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 26f7be3..011224e 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -125,14 +125,19 @@ void
child_resume (pid, step, signal)
int pid;
int step;
- int signal;
+ enum target_signal signal;
{
errno = 0;
if (pid == -1)
-#ifdef PIDGET /* XXX Lynx */
+ /* Resume all threads. */
+#ifdef PIDGET
+ /* This is for Lynx, and should be cleaned up by having Lynx be
+ a separate debugging target, with its own target_resume function. */
pid = PIDGET (inferior_pid);
#else
+ /* I think this only gets used in the non-threaded case, where "resume
+ all threads" and "resume inferior_pid" are the same. */
pid = inferior_pid;
#endif
@@ -146,9 +151,11 @@ child_resume (pid, step, signal)
instructions), so we don't have to worry about that here. */
if (step)
- ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1, signal);
+ ptrace (PT_STEP, pid, (PTRACE_ARG3_TYPE) 1,
+ target_signal_to_host (signal));
else
- ptrace (PT_CONTINUE, pid, (PTRACE_ARG3_TYPE) 1, signal);
+ ptrace (PT_CONTINUE, pid, (PTRACE_ARG3_TYPE) 1,
+ target_signal_to_host (signal));
if (errno)
perror_with_name ("ptrace");
@@ -342,6 +349,8 @@ store_inferior_registers (regno)
}
#endif /* !defined (FETCH_INFERIOR_REGISTERS). */
+
+#if !defined (CHILD_XFER_MEMORY)
/* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
in the NEW_SUN_PTRACE case.
It ought to be straightforward. But it appears that writing did
@@ -440,3 +449,4 @@ child_xfer_memory (memaddr, myaddr, len, write, target)
}
return len;
}
+#endif /* !defined (CHILD_XFER_MEMORY). */