aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-nindy.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-01-04 21:53:53 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-01-04 21:53:53 +0000
commit67ac97591175936a06cc1ef1df228746edcdb545 (patch)
treeeb6068254e2992c5aa83741da1e59bb1af9562f4 /gdb/remote-nindy.c
parente14316e7fe96be0212669a9a4d60608707f66c90 (diff)
downloadgdb-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/remote-nindy.c')
-rw-r--r--gdb/remote-nindy.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c
index b9b120c..aa1fbe3 100644
--- a/gdb/remote-nindy.c
+++ b/gdb/remote-nindy.c
@@ -256,10 +256,11 @@ non_dle( buf, n )
void
nindy_resume (pid, step, siggnal)
- int pid, step, siggnal;
+ int pid, step;
+ enum target_signal siggnal;
{
- if (siggnal != 0 && siggnal != stop_signal)
- error ("Can't send signals to remote NINDY targets.");
+ if (siggnal != TARGET_SIGNAL_0 && siggnal != stop_signal)
+ warning ("Can't send signals to remote NINDY targets.");
dcache_flush(nindy_dcache);
if ( regs_changed ){
@@ -301,7 +302,7 @@ You may need to reset the 80960 and/or reload your program.\n");
static int
nindy_wait( pid, status )
int pid;
- WAITTYPE *status;
+ struct target_waitstatus *status;
{
fd_set fds;
char buf[500]; /* FIXME, what is "500" here? */
@@ -312,7 +313,8 @@ nindy_wait( pid, status )
struct cleanup *old_cleanups;
long ip_value, fp_value, sp_value; /* Reg values from stop */
- WSETEXIT( (*status), 0 );
+ status->kind = TARGET_WAITKIND_EXITED;
+ status->value.integer = 0;
/* OPERATE IN PASSTHROUGH MODE UNTIL NINDY SENDS A DLE CHARACTER */
@@ -391,30 +393,13 @@ nindy_wait( pid, status )
if (stop_exit)
{
- /* User program exited */
- WSETEXIT ((*status), stop_code);
+ status->kind = TARGET_WAITKIND_EXITED;
+ status->value.integer = stop_code;
}
else
{
- /* Fault or trace */
- switch (stop_code)
- {
- case STOP_GDB_BPT:
- case TRACE_STEP:
- /* Breakpoint or single stepping. */
- stop_code = SIGTRAP;
- break;
- default:
- /* The target is not running Unix, and its faults/traces do
- not map nicely into Unix signals. Make sure they do not
- get confused with Unix signals by numbering them with
- values higher than the highest legal Unix signal. code
- in i960_print_fault(), called via PRINT_RANDOM_SIGNAL,
- will interpret the value. */
- stop_code += NSIG;
- break;
- }
- WSETSTOP ((*status), stop_code);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = i960_fault_to_signal (stop_code);
}
return inferior_pid;
}