summaryrefslogtreecommitdiffstats
path: root/gdb/remote-bug.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-bug.c
parente14316e7fe96be0212669a9a4d60608707f66c90 (diff)
downloadppe42-binutils-67ac97591175936a06cc1ef1df228746edcdb545.tar.gz
ppe42-binutils-67ac97591175936a06cc1ef1df228746edcdb545.zip
* 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-bug.c')
-rw-r--r--gdb/remote-bug.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c
index a1806fc8b5..d709cd2bfc 100644
--- a/gdb/remote-bug.c
+++ b/gdb/remote-bug.c
@@ -242,7 +242,8 @@ bug_open (args, from_tty)
void
bug_resume (pid, step, sig)
- int pid, step, sig;
+ int pid, step;
+ enum target_signal sig;
{
dcache_flush (gr_get_dcache());
@@ -275,12 +276,13 @@ static char *wait_strings[] = {
int
bug_wait (pid, status)
int pid;
- WAITTYPE *status;
+ struct target_waitstatus *status;
{
int old_timeout = sr_get_timeout();
int old_immediate_quit = immediate_quit;
- WSETEXIT ((*status), 0);
+ status->kind = TARGET_WAITKIND_EXITED;
+ status->value.integer = 0;
/* read off leftovers from resume so that the rest can be passed
back out as stdout. */
@@ -297,13 +299,15 @@ bug_wait (pid, status)
switch (gr_multi_scan(wait_strings, need_artificial_trap == 0))
{
case 0: /* breakpoint case */
- WSETSTOP ((*status), SIGTRAP);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_TRAP;
/* user output from the target can be discarded here. (?) */
gr_expect_prompt();
break;
case 1: /* bus error */
- WSETSTOP ((*status), SIGBUS);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_BUS;
/* user output from the target can be discarded here. (?) */
gr_expect_prompt();
break;
@@ -313,14 +317,16 @@ bug_wait (pid, status)
if (need_artificial_trap != 0)
{
/* stepping */
- WSETSTOP ((*status), SIGTRAP);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_TRAP;
need_artificial_trap--;
break;
}
else
{
/* exit case */
- WSETEXIT ((*status), 0);
+ status->kind = TARGET_WAITKIND_EXITED;
+ status->value.integer = 0;
break;
}
OpenPOWER on IntegriCloud