projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* target.h: Add enum target_waitkind, enum target_signal, and
[deliverable/binutils-gdb.git]
/
gdb
/
remote-es.c
diff --git
a/gdb/remote-es.c
b/gdb/remote-es.c
index f61c1eb3db0d6c7760b3f228592fed75b3124008..7ee7bf996794fc92169b87e128f739d0fbff659d 100644
(file)
--- a/
gdb/remote-es.c
+++ b/
gdb/remote-es.c
@@
-106,6
+106,7
@@
STP
#include "wait.h"
#include "terminal.h"
#include "command.h"
#include "wait.h"
#include "terminal.h"
#include "command.h"
+#include "remote-utils.h"
#ifdef USG
#include <sys/types.h>
#ifdef USG
#include <sys/types.h>
@@
-160,8
+161,7
@@
es1800_prepare_to_store PARAMS ((void));
static int
es1800_wait PARAMS ((WAITTYPE *));
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));
static void
es1800_detach PARAMS ((char *, int));
@@
-364,7
+364,7
@@
es1800_open (name, from_tty)
char buf[PBUFSIZ];
char *p;
int i, fcflag;
char buf[PBUFSIZ];
char *p;
int i, fcflag;
- char
*baudrate
;
+ char
baudrate[1024]
;
m68020 = 0;
m68020 = 0;
@@
-372,7
+372,7
@@
es1800_open (name, from_tty)
{
error_no_arg ("serial port device name");
}
{
error_no_arg ("serial port device name");
}
- baudrate = baud_rate ? baud_rate : "19200"; /* default baudrate = 19200 */
+ sprintf(baudrate, "%d", sr_get_baud_rate());
target_preopen (from_tty);
es1800_close (0);
target_preopen (from_tty);
es1800_close (0);
@@
-653,7
+653,7
@@
static void
es1800_resume (pid, step, siggnal)
int pid;
int step;
es1800_resume (pid, step, siggnal)
int pid;
int step;
-
int
siggnal;
+
enum target_signal
siggnal;
{
char buf[PBUFSIZ];
{
char buf[PBUFSIZ];
@@
-678,12
+678,14
@@
es1800_resume (pid, step, siggnal)
static int
es1800_wait (status)
static int
es1800_wait (status)
-
WAITTYPE
*status;
+
struct target_waitstatus
*status;
{
unsigned char buf[PBUFSIZ];
int old_timeout = timeout;
{
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))
{
timeout = 0; /* Don't time out -- user program is running. */
if (!setjmp (interrupt))
{
@@
-693,7
+695,8
@@
es1800_wait (status)
getmessage (buf, sizeof(buf));
if (strncmp ( buf, "\r\n* BREAK *", 11) == 0)
{
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)
{
send_command ("STP"); /* Restore stack and PC and such */
if (m68020)
{
@@
-703,7
+706,8
@@
es1800_wait (status)
}
if (strncmp (buf, "STP\r\n ", 6) == 0)
{
}
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')
break;
}
if (buf[strlen (buf) - 2] == 'R')
@@
-713,7
+717,8
@@
es1800_wait (status)
else
{
printf ("Unexpected stop: \n%s\n", buf);
else
{
printf ("Unexpected stop: \n%s\n", buf);
- WSETSTOP ((*status), SIGQUIT);
+ status->kind = TARGET_WAITKIND_STOPPED;
+ status->value.sig = TARGET_SIGNAL_QUIT;
break;
}
}
break;
}
}
@@
-727,7
+732,8
@@
es1800_wait (status)
old_sigint = signal (SIGINT, es1800_request_quit);
send_command ("STP");
printf (" emulator stopped\n");
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
{
}
else
{
@@
-1429,7
+1435,7
@@
es1800_load (filename, from_tty)
error ("Downloading format not defined\n");
}
error ("Downloading format not defined\n");
}
-
mark_breakpoints_out
();
+
breakpoint_init_inferior
();
inferior_pid = 0;
if (from_tty)
{
inferior_pid = 0;
if (from_tty)
{
@@
-2249,8
+2255,6
@@
Specify the serial device it is connected to (e.g. /dev/ttya).",
OPS_MAGIC /* to_magic (always last) */
};
OPS_MAGIC /* to_magic (always last) */
};
-/* _initialize_es1800 () */
-
void
_initialize_es1800 ()
{
void
_initialize_es1800 ()
{
This page took
0.024552 seconds
and
4
git commands to generate.