From 67ac97591175936a06cc1ef1df228746edcdb545 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 4 Jan 1994 21:53:53 +0000 Subject: * target.h: Add enum target_waitkind, enum target_signal, and struct target_waitstatus. Change status argument to target_wait to be struct target_waitstatus * instead of int *. * target.h, infrun.c, all targets: Change type of signal arguments to resume(), proceed(), and target_resume() from int to enum target_signal. * All targets (*_wait, *_resume): Change accordingly. * infcmd.c (program_info, signal_command), throughout infrun.c, * fork-child.c, solib.c, hppa-tdep.c, osfsolib.c: Use this stuff. * convex-xdep.c, convex-tdep.c: Add FIXME's (getting the Convex signal code stuff right with the new signals would be non-trivial). * inferior.h (stop_signal): Make it enum target_signal not int. * target.c, target.h (target_signal_to_string, target_signal_to_name, target_signal_from_name): New functions. * inftarg.c, target.h (target_signal_to_host, target_signal_from_host, store_waitstatus): New functions. * procfs.c (procfs_notice_signals): Use them. * i960-tdep.c (i960_fault_to_signal): New function, to replace print_fault. * config/i960/tm-i960.h: Don't define PRINT_RANDOM_SIGNAL. --- gdb/remote-adapt.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'gdb/remote-adapt.c') diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c index 575bb6f..fe1586d 100644 --- a/gdb/remote-adapt.c +++ b/gdb/remote-adapt.c @@ -650,7 +650,8 @@ adapt_detach (args,from_tty) void adapt_resume (pid, step, sig) - int pid, step, sig; + int pid, step; + enum target_signal sig; { if (step) { @@ -680,7 +681,7 @@ adapt_resume (pid, step, sig) int adapt_wait (status) - WAITTYPE *status; + struct target_waitstatus *status; { /* Strings to look for. '?' means match any single character. Note that with the algorithm we use, the initial character @@ -705,11 +706,13 @@ adapt_wait (status) int old_timeout = timeout; int old_immediate_quit = immediate_quit; - WSETEXIT ((*status), 0); + status->kind = TARGET_WAITKIND_EXITED; + status->value.integer = 0; if (need_artificial_trap != 0) { - WSETSTOP ((*status), SIGTRAP); + status->kind = TARGET_WAITKIND_STOPPED; + status->value.sig = TARGET_SIGNAL_TRAP; need_artificial_trap--; return 0; } @@ -750,9 +753,15 @@ adapt_wait (status) } expect_prompt (); if (*bp== '\0') - WSETSTOP ((*status), SIGTRAP); + { + status->kind = TARGET_WAITKIND_STOPPED; + status->value.sig = TARGET_SIGNAL_TRAP; + } else - WSETEXIT ((*status), 0); + { + status->kind = TARGET_WAITKIND_EXITED; + status->value.integer = 0; + } timeout = old_timeout; immediate_quit = old_immediate_quit; return 0; -- cgit v1.1