aboutsummaryrefslogtreecommitdiff
path: root/gdb/lynx-nat.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-06-02 16:58:48 +0000
committerStu Grossman <grossman@cygnus>1994-06-02 16:58:48 +0000
commit2e6784a89f9565882c4c9937032aed88176b6d42 (patch)
treec9cce9677eafd4d49384bb426a2b751de3b3c65b /gdb/lynx-nat.c
parent314628f66c60bf1b8b0025bc377edfe2585ee24d (diff)
downloadfsf-binutils-gdb-2e6784a89f9565882c4c9937032aed88176b6d42.zip
fsf-binutils-gdb-2e6784a89f9565882c4c9937032aed88176b6d42.tar.gz
fsf-binutils-gdb-2e6784a89f9565882c4c9937032aed88176b6d42.tar.bz2
* configure.in: Add nlm subdir to configdirs for alpha-*-netware
target. * defs.h (enum language): Add language_asm. * findvar.c (read_register_bytes read_register_gen write_register_bytes read_register read_register_pid write_register write_register_pid supply_register): Move multi- thread handling down into these routines. Create XXX_pid routines that allow register references to specify the pid. * findvar.c infcmd.c (read_pc read_pc_pid write_pc write_pc_pid read_sp write_sp read_fp write_fp): Move these routines from infcmd to findvar to centralize the whole mess. * i386-nlmstub.c: Portability fixes. * infptrace.c (child_resume): Conditionalize to allow other natives to override it. Remove PIDGET gubbish, it's no longer necessary. * infrun.c (wait_for_inferior): Put registers_changed() before target_wait() to speed up remote debugging. * Replace code that reads registers from other threads with much nicer looking new function calls (see changes to findvar.c). * Don't skip prologues if debugging assembly source. * lynx-nat.c (child_resume): Lynx now needs it's own version of child_resume to handle multi-thread debugging properly. * remote.c: Add O response to get console output from target. * (readchar): Add timeout parameter. Handle SERIAL_EOF and SERIAL_ERROR here to simplify callers. * Change static var timeout to remote_timeout. * (fromhex): Remove unnecessary return -1 at end of routine. * (remote_wait): Turn this into a big switch statement. Add support for O response. * (putpkt): Remove unnecessary handling of SERIAL_EOF/ERROR. * (getpkt): Split getpkt into two parts. read_frame deals with all formatting issues, run-length encoding, and framing. getpkt now handles error recovery, and frame detection. * ser-tcp.c (tcp_readchar): Handle EINTR from read(). * ser-unix.c (hardwire_raw): Set CLOCAL so that we ignore modem control. (hardwire_readchar): Handle EINTR from read(). * symfile.c (deduce_language_from_filename): Add support for .s files. * config/nm-lynx.h: Define CHILD_WAIT so that lynx-nat.c can override infptrace's child_wait. * config/rs6000/rs6000lynx.mh: Use xm-rs6000ly.h & nm-rs6000ly.h instead of XXXlynx.h. * config/rs6000/rs6000lynx.mt: Use tm-rs6000ly.h instead of tm-rs6000lynx.h. * nlm/gdbserve.c: Portability fixes.
Diffstat (limited to 'gdb/lynx-nat.c')
-rw-r--r--gdb/lynx-nat.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index 451b4f5..49f361d 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -652,6 +652,44 @@ child_wait (pid, ourstatus)
}
}
+/* Resume execution of the inferior process.
+ If STEP is nonzero, single-step it.
+ If SIGNAL is nonzero, give it that signal. */
+
+void
+child_resume (pid, step, signal)
+ int pid;
+ int step;
+ enum target_signal signal;
+{
+ errno = 0;
+
+ if (pid == -1)
+ /* Resume all threads. */
+ /* 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;
+
+ /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
+ it was. (If GDB wanted it to start some other way, we have already
+ written a new PC value to the child.)
+
+ If this system does not support PT_STEP, a higher level function will
+ have called single_step() to transmute the step request into a
+ continue request (by setting breakpoints on all possible successor
+ instructions), so we don't have to worry about that here. */
+
+ if (step)
+ ptrace (PTRACE_SINGLESTEP_ONE, pid, (PTRACE_ARG3_TYPE) 1,
+ target_signal_to_host (signal));
+ else
+ ptrace (PTRACE_CONT_ONE, pid, (PTRACE_ARG3_TYPE) 1,
+ target_signal_to_host (signal));
+
+ if (errno)
+ perror_with_name ("ptrace");
+}
+
/* Convert a Lynx process ID to a string. Returns the string in a static
buffer. */