diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-04 21:53:53 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-04 21:53:53 +0000 |
commit | 67ac97591175936a06cc1ef1df228746edcdb545 (patch) | |
tree | eb6068254e2992c5aa83741da1e59bb1af9562f4 /gdb/sparcly-nat.c | |
parent | e14316e7fe96be0212669a9a4d60608707f66c90 (diff) | |
download | gdb-67ac97591175936a06cc1ef1df228746edcdb545.zip gdb-67ac97591175936a06cc1ef1df228746edcdb545.tar.gz gdb-67ac97591175936a06cc1ef1df228746edcdb545.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/sparcly-nat.c')
-rw-r--r-- | gdb/sparcly-nat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/sparcly-nat.c b/gdb/sparcly-nat.c index 193fa1e..92ab0e8 100644 --- a/gdb/sparcly-nat.c +++ b/gdb/sparcly-nat.c @@ -310,10 +310,13 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore) /* Wait for child to do something. Return pid of child, or -1 in case of error; store status through argument pointer STATUS. */ +/* FIXME: Not sparc-specific. Should be using lynx-nat.c instead; the + child_wait's are identical. */ + int child_wait (pid, status) int pid; - int *status; + struct target_waitstatus *ourstatus; { int save_errno; int thread; @@ -335,9 +338,11 @@ child_wait (pid, status) { if (save_errno == EINTR) continue; - fprintf (stderr, "Child process unexpectedly missing: %s.\n", + fprintf_unfiltered (gdb_stderr, "Child process unexpectedly missing: %s.\n", safe_strerror (save_errno)); - *status = 42; /* Claim it exited with signal 42 */ + /* Claim it exited with unknown signal. */ + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN; return -1; } @@ -358,6 +363,8 @@ child_wait (pid, status) pid = BUILDPID (pid, thread); + store_waitstatus (ourstatus, status); + return pid; } } |