* 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().
This commit is contained in:
Stu Grossman 1994-11-03 22:41:12 +00:00
parent 78b459a7e7
commit 6c27841f3b
6 changed files with 20 additions and 17 deletions

View File

@ -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 ();
}

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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,