aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1994-11-03 22:41:12 +0000
committerStu Grossman <grossman@cygnus>1994-11-03 22:41:12 +0000
commit6c27841f3b120b58f6306070deaccd7421696c1b (patch)
tree0b861530082869d6e91c0fa85bc365f9b145b61e /gdb
parent78b459a7e7d0930a3ac1c4ca2fe4706559675cdc (diff)
downloadgdb-6c27841f3b120b58f6306070deaccd7421696c1b.zip
gdb-6c27841f3b120b58f6306070deaccd7421696c1b.tar.gz
gdb-6c27841f3b120b58f6306070deaccd7421696c1b.tar.bz2
* corelow.c, exec.c, inftarg.c, m3-nat.c, op50-rom.c, procfs.c,
remote-adapt.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mips.c, remote-mm.c, remote-mon.c, remote-nindy.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-vx.c, remote-z8k.c, remote.c, w89k-rom.c, target.c, target.h: Add support for target_stop(). * gdbtk.c (gdb_stop): Switch to target_stop().
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbtk.c7
-rw-r--r--gdb/remote-udi.c1
-rw-r--r--gdb/remote-vx.c2
-rw-r--r--gdb/remote-z8k.c1
-rw-r--r--gdb/remote.c25
-rw-r--r--gdb/w89k-rom.c1
6 files changed, 20 insertions, 17 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index eefac93..21b2be3 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -374,12 +374,7 @@ gdb_stop (clientData, interp, argc, argv)
int argc;
char *argv[];
{
- extern pid_t inferior_process_group;
-
- /* XXX - This is WRONG for remote targets. Probably need a target vector
- entry to do this right. */
-
- kill (-inferior_process_group, SIGINT);
+ target_stop ();
}
diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c
index c2366fd..dc82750 100644
--- a/gdb/remote-udi.c
+++ b/gdb/remote-udi.c
@@ -1666,6 +1666,7 @@ Arguments are\n\
udi_mourn, /* mourn_inferior FIXME */
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
process_stratum,
0, /* next */
1, /* has_all_memory */
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 239ad24..2de3bc5 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -1384,6 +1384,7 @@ Specify the name of the machine to connect to.",
vx_create_inferior, 0, /* mourn_inferior */
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
core_stratum, 0, /* next */
1, 1, 0, 0, 0, /* all mem, mem, stack, regs, exec */
0, 0, /* Section pointers */
@@ -1408,6 +1409,7 @@ struct target_ops vx_run_ops = {
0, vx_mourn_inferior,
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
process_stratum, 0, /* next */
0, /* all_mem--off to avoid spurious msg in "i files" */
1, 1, 1, 1, /* mem, stack, regs, exec */
diff --git a/gdb/remote-z8k.c b/gdb/remote-z8k.c
index 20d340d..0f43db0 100644
--- a/gdb/remote-z8k.c
+++ b/gdb/remote-z8k.c
@@ -344,6 +344,7 @@ struct target_ops sim_ops =
sim_mourn, /* mourn_inferior FIXME */
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
process_stratum, 0, /* next */
1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
0, 0, /* Section pointers */
diff --git a/gdb/remote.c b/gdb/remote.c
index fb6184a..942f1bd 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -284,7 +284,7 @@ remote_close (quitting)
static void
get_offsets ()
{
- unsigned char buf[PBUFSIZ];
+ char buf[PBUFSIZ];
int nvals;
CORE_ADDR text_addr, data_addr, bss_addr;
struct section_offsets *offs;
@@ -460,7 +460,7 @@ fromhex (a)
else if (a >= 'a' && a <= 'f')
return a - 'a' + 10;
else
- error ("Reply contains invalid hex digit");
+ error ("Reply contains invalid hex digit %d", a);
}
/* Convert number NIB to a hex digit. */
@@ -639,14 +639,13 @@ remote_wait (pid, status)
return inferior_pid;
}
case 'O': /* Console output */
- fputs_filtered (buf + 1, gdb_stdout);
+ fputs_filtered ((char *)(buf + 1), gdb_stdout);
continue;
default:
warning ("Invalid remote reply: %s", buf);
continue;
}
}
- return inferior_pid;
}
/* Number of bytes of registers this stub implements. */
@@ -1171,7 +1170,7 @@ putpkt (buf)
break; /* Retransmit buffer */
case '$':
{
- unsigned char junkbuf[PBUFSIZ];
+ char junkbuf[PBUFSIZ];
/* It's probably an old response, and we're out of sync. Just
gobble up the packet and ignore it. */
@@ -1249,11 +1248,13 @@ read_frame (buf)
if (csum == pktcsum)
return 1;
- printf_filtered ("Bad checksum, sentsum=0x%x, csum=0x%x, buf=",
- pktcsum, csum);
- puts_filtered (buf);
- puts_filtered ("\n");
-
+ if (remote_debug)
+ {
+ printf_filtered ("Bad checksum, sentsum=0x%x, csum=0x%x, buf=",
+ pktcsum, csum);
+ puts_filtered (buf);
+ puts_filtered ("\n");
+ }
return 0;
}
case '*': /* Run length encoding */
@@ -1262,7 +1263,8 @@ read_frame (buf)
csum += c;
c = c - ' ' + 3; /* Compute repeat count */
- if (bp + c - 1 < buf + PBUFSIZ - 1)
+
+ if (c > 0 && c < 255 && bp + c - 1 < buf + PBUFSIZ - 1)
{
memset (bp, *(bp - 1), c);
bp += c;
@@ -1460,6 +1462,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", /* to_doc */
remote_mourn, /* to_mourn_inferior */
0, /* to_can_run */
0, /* to_notice_signals */
+ 0, /* to_stop */
process_stratum, /* to_stratum */
NULL, /* to_next */
1, /* to_has_all_memory */
diff --git a/gdb/w89k-rom.c b/gdb/w89k-rom.c
index 45e14fe..bfc550f 100644
--- a/gdb/w89k-rom.c
+++ b/gdb/w89k-rom.c
@@ -68,6 +68,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
monitor_mourn_inferior,
0, /* can_run */
0, /* notice_signals */
+ 0, /* to_stop */
process_stratum,
0, /* next */
1,