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 */
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 */
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 */
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;
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. */
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. */
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. */
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 */
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;
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 */