int
main (int argc, char *argv[])
{
- char ch, status, own_buf[PBUFSIZ], mem_buf[2000];
+ char ch, status, *own_buf, mem_buf[2000];
int i = 0;
unsigned char signal;
unsigned int len;
initialize_low ();
+ own_buf = malloc (PBUFSIZ);
+
if (pid == 0)
{
/* Wait till we are at first instruction in program. */
}
break;
case 'g':
- convert_int_to_ascii (registers, own_buf, REGISTER_BYTES);
+ registers_to_string (own_buf);
break;
case 'G':
- convert_ascii_to_int (&own_buf[1], registers, REGISTER_BYTES);
+ registers_from_string (&own_buf[1]);
store_inferior_registers (-1);
write_ok (own_buf);
break;
break;
case 'C':
convert_ascii_to_int (own_buf + 1, &sig, 1);
- myresume (0, sig);
+ if (target_signal_to_host_p (sig))
+ signal = target_signal_to_host (sig);
+ else
+ signal = 0;
+ myresume (0, signal);
signal = mywait (&status);
prepare_resume_reply (own_buf, status, signal);
break;
case 'S':
convert_ascii_to_int (own_buf + 1, &sig, 1);
- myresume (1, sig);
+ if (target_signal_to_host_p (sig))
+ signal = target_signal_to_host (sig);
+ else
+ signal = 0;
+ myresume (1, signal);
signal = mywait (&status);
prepare_resume_reply (own_buf, status, signal);
break;