core_open, core_close,
child_attach, core_detach, 0, 0, /* resume, wait */
get_core_registers,
- 0, 0, 0, 0, /* store_regs, prepare_to_store, conv_to, conv_from */
+ 0, 0, /* store_regs, prepare_to_store */
xfer_memory, core_files_info,
0, 0, /* core_insert_breakpoint, core_remove_breakpoint, */
0, 0, 0, 0, 0, /* terminal stuff */
exec_file_command, exec_close, /* open, close */
child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
0, 0, /* fetch_registers, store_registers, */
- 0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+ 0, /* prepare_to_store, */
xfer_memory, exec_files_info,
0, 0, /* insert_breakpoint, remove_breakpoint, */
0, 0, 0, 0, 0, /* terminal stuff */
adapt_open, adapt_close,
adapt_attach, adapt_detach, adapt_resume, adapt_wait,
adapt_fetch_register, adapt_store_register,
- adapt_prepare_to_store, 0, 0, /* conv_to, conv_from */
+ adapt_prepare_to_store,
adapt_xfer_inferior_memory,
adapt_files_info,
adapt_insert_breakpoint, adapt_remove_breakpoint, /* Breakpoints */
eb_open, eb_close,
0, eb_detach, eb_resume, eb_wait,
eb_fetch_register, eb_store_register,
- eb_prepare_to_store, 0, 0, /* conv_to, conv_from */
+ eb_prepare_to_store,
eb_xfer_inferior_memory, eb_files_info,
0, 0, /* Breakpoints */
0, 0, 0, 0, 0, /* Terminal handling */
NULL, /* to_fetch_registers */
NULL, /* to_store_registers */
es1800_prepare_to_store, /* to_prepare_to_store */
- NULL, /* to_convert_to_virtual */
- NULL, /* to_convert_from_virtual */
es1800_xfer_inferior_memory, /* to_xfer_memory */
es1800_files_info, /* to_files_info */
es1800_insert_breakpoint, /* to_insert_breakpoint */
es1800_fetch_register, /* to_fetch_registers */
es1800_store_register, /* to_store_registers */
es1800_prepare_to_store, /* to_prepare_to_store */
- NULL, /* to_convert_to_virtual */
- NULL, /* to_convert_from_virtual */
es1800_xfer_inferior_memory, /* to_xfer_memory */
es1800_files_info, /* to_files_info */
es1800_insert_breakpoint, /* to_insert_breakpoint */
hms_open, hms_close,
hms_attach, hms_detach, hms_resume, hms_wait,
hms_fetch_register, hms_store_register,
- hms_prepare_to_store, 0, 0, /* conv_to, conv_from */
+ hms_prepare_to_store,
hms_xfer_inferior_memory,
hms_files_info,
hms_insert_breakpoint, hms_remove_breakpoint, /* Breakpoints */
mm_open, mm_close,
mm_attach, mm_detach, mm_resume, mm_wait,
mm_fetch_registers, mm_store_registers,
- mm_prepare_to_store, 0, 0, /* conv_to, conv_from */
+ mm_prepare_to_store,
mm_xfer_inferior_memory,
mm_files_info,
mm_insert_breakpoint, mm_remove_breakpoint, /* Breakpoints */
nindy_open, nindy_close,
0, nindy_detach, nindy_resume, nindy_wait,
nindy_fetch_registers, nindy_store_registers,
- nindy_prepare_to_store, 0, 0, /* conv_from, conv_to */
+ nindy_prepare_to_store,
nindy_xfer_inferior_memory, nindy_files_info,
0, 0, /* insert_breakpoint, remove_breakpoint, */
0, 0, 0, 0, 0, /* Terminal crud */
st2000_fetch_register,
st2000_store_register,
st2000_prepare_to_store,
- 0,
- 0, /* conv_to, conv_from */
st2000_xfer_inferior_memory,
st2000_files_info,
st2000_insert_breakpoint,
udi_open, udi_close,
udi_attach, udi_detach, udi_resume, udi_wait,
udi_fetch_registers, udi_store_registers,
- udi_prepare_to_store, 0, 0, /* conv_to, conv_from */
+ udi_prepare_to_store,
udi_xfer_inferior_memory,
udi_files_info,
udi_insert_breakpoint, udi_remove_breakpoint, /* Breakpoints */
extern void symbol_file_command ();
extern int stop_soon_quietly; /* for wait_for_inferior */
-extern void host_convert_to_virtual ();
-extern void host_convert_from_virtual ();
static int net_ptrace_clnt_call (); /* Forward decl */
static enum clnt_stat net_clnt_call (); /* Forward decl */
vx_open, vx_close, vx_attach, 0, /* vx_detach, */
0, 0, /* resume, wait */
0, 0, /* read_reg, write_reg */
- 0, host_convert_to_virtual, host_convert_from_virtual, /* prep_to_store, */
+ 0, /* prep_to_store, */
vx_xfer_memory, vx_files_info,
0, 0, /* insert_breakpoint, remove_breakpoint */
0, 0, 0, 0, 0, /* terminal stuff */
vx_proc_open, vx_proc_close, 0, vx_detach, /* vx_attach */
vx_resume, vx_wait,
vx_read_register, vx_write_register,
- vx_prepare_to_store, host_convert_to_virtual, host_convert_from_virtual,
+ vx_prepare_to_store,
vx_xfer_memory, vx_run_files_info,
vx_insert_breakpoint, vx_remove_breakpoint,
0, 0, 0, 0, 0, /* terminal stuff */
if (baud_rate)
{
- if (1 != sscanf (baud_rate, "%d ", &a_rate))
+ if (sscanf (baud_rate, "%d", &a_rate) == 1)
{
b_rate = damn_b (a_rate);
baudrate_set = 1;
void (*ofunc)();
unsigned char *p;
int i;
- int regno;
- unsigned char regs[8]; /* Better be big enough for largest reg */
+ long regno;
+ unsigned char regs[MAX_REGISTER_RAW_SIZE];
WSETEXIT ((*status), 0);
if (buf[0] == 'T')
{
/* Expedited reply, containing Signal, {regno, reg} repeat */
+ /* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
+ ss = signal number
+ n... = register number
+ r... = register contents
+ */
+
p = &buf[3]; /* after Txx */
while (*p)
{
- regno = fromhex (p[0]) * 16 + fromhex (p[1]);
- p += 2;
- if (regno >= NUM_REGS)
- error ("Remote sent illegal register number %d (0x%x)", regno,
- regno);
+ regno = strtol (p, &p, 16); /* Read the register number */
+
+ if (*p++ != ':'
+ || regno >= NUM_REGS)
+ error ("Remote sent bad register number %s", buf);
for (i = 0; i < REGISTER_RAW_SIZE (regno); i++)
{
p += 2;
}
+ if (*p++ != ';')
+ error("Remote register badly formatted: %s", buf);
+
supply_register (regno, regs);
}
}
remote_fetch_registers, /* to_fetch_registers */
remote_store_registers, /* to_store_registers */
remote_prepare_to_store, /* to_prepare_to_store */
- NULL, /* to_convert_to_virtual */
- NULL, /* to_convert_from_virtual */
remote_xfer_memory, /* to_xfer_memory */
remote_files_info, /* to_files_info */
NULL, /* to_insert_breakpoint */
exec_file_command, exec_close, /* open, close */
child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
0, 0, /* fetch_registers, store_registers, */
- 0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+ 0, /* prepare_to_store */
xfer_memory, exec_files_info,
0, 0, /* insert_breakpoint, remove_breakpoint, */
0, 0, 0, 0, 0, /* terminal stuff */