diff options
author | John Gilmore <gnu@cygnus> | 1992-09-18 09:56:28 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-09-18 09:56:28 +0000 |
commit | a03d4f8e65036e3f9c3457c588fe8c2fd72841b9 (patch) | |
tree | e48525afdc038c8f2a6155f95dcebde8adfe39e7 /gdb/remote.c | |
parent | dcc8abceed4c9faf9285018a46bede3a39161471 (diff) | |
download | gdb-a03d4f8e65036e3f9c3457c588fe8c2fd72841b9.zip gdb-a03d4f8e65036e3f9c3457c588fe8c2fd72841b9.tar.gz gdb-a03d4f8e65036e3f9c3457c588fe8c2fd72841b9.tar.bz2 |
Remove convert_{to,from}_virtual members from target structs.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 03d4dee..86df56a 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -270,7 +270,7 @@ device is attached to the remote system (e.g. /dev/ttya)."); 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; @@ -416,8 +416,8 @@ remote_wait (status) 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); @@ -430,15 +430,21 @@ remote_wait (status) 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++) { @@ -448,6 +454,9 @@ remote_wait (status) p += 2; } + if (*p++ != ';') + error("Remote register badly formatted: %s", buf); + supply_register (regno, regs); } } @@ -1045,8 +1054,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", /* to_doc */ 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 */ |