aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-es.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-es.c
parente14316e7fe96be0212669a9a4d60608707f66c90 (diff)
downloadfsf-binutils-gdb-67ac97591175936a06cc1ef1df228746edcdb545.zip
fsf-binutils-gdb-67ac97591175936a06cc1ef1df228746edcdb545.tar.gz
fsf-binutils-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-es.c')
-rw-r--r--gdb/remote-es.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/gdb/remote-es.c b/gdb/remote-es.c
index acff4e3..7ee7bf9 100644
--- a/gdb/remote-es.c
+++ b/gdb/remote-es.c
@@ -161,8 +161,7 @@ es1800_prepare_to_store PARAMS ((void));
static int
es1800_wait PARAMS ((WAITTYPE *));
-static void
-es1800_resume PARAMS ((int, int, int));
+static void es1800_resume PARAMS ((int, int, enum target_signal));
static void
es1800_detach PARAMS ((char *, int));
@@ -654,7 +653,7 @@ static void
es1800_resume (pid, step, siggnal)
int pid;
int step;
- int siggnal;
+ enum target_signal siggnal;
{
char buf[PBUFSIZ];
@@ -679,12 +678,14 @@ es1800_resume (pid, step, siggnal)
static int
es1800_wait (status)
- WAITTYPE *status;
+ struct target_waitstatus *status;
{
unsigned char buf[PBUFSIZ];
int old_timeout = timeout;
- WSETEXIT ((*status), 0);
+ status->kind = TARGET_WAITKIND_EXITED;
+ status->value.integer = 0;
+
timeout = 0; /* Don't time out -- user program is running. */
if (!setjmp (interrupt))
{
@@ -694,7 +695,8 @@ es1800_wait (status)
getmessage (buf, sizeof(buf));
if (strncmp ( buf, "\r\n* BREAK *", 11) == 0)
{
- WSETSTOP ((*status), SIGTRAP);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_TRAP;
send_command ("STP"); /* Restore stack and PC and such */
if (m68020)
{
@@ -704,7 +706,8 @@ es1800_wait (status)
}
if (strncmp (buf, "STP\r\n ", 6) == 0)
{
- WSETSTOP ((*status), SIGTRAP);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_TRAP;
break;
}
if (buf[strlen (buf) - 2] == 'R')
@@ -714,7 +717,8 @@ es1800_wait (status)
else
{
printf ("Unexpected stop: \n%s\n", buf);
- WSETSTOP ((*status), SIGQUIT);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_QUIT;
break;
}
}
@@ -728,7 +732,8 @@ es1800_wait (status)
old_sigint = signal (SIGINT, es1800_request_quit);
send_command ("STP");
printf (" emulator stopped\n");
- WSETSTOP ((*status), SIGINT);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_INT;
}
else
{