diff options
author | Geoffrey Noer <noer@cygnus> | 1997-08-08 02:57:35 +0000 |
---|---|---|
committer | Geoffrey Noer <noer@cygnus> | 1997-08-08 02:57:35 +0000 |
commit | 9cf7f520c671cdb644fb987facea36ff5e597605 (patch) | |
tree | 4aaec4ac63998804ae2483d5915b94153ea468eb /gdb/ser-ocd.c | |
parent | 1154b47ab13c0cee1c409f81fa5f0dd4186a0050 (diff) | |
download | gdb-9cf7f520c671cdb644fb987facea36ff5e597605.zip gdb-9cf7f520c671cdb644fb987facea36ff5e597605.tar.gz gdb-9cf7f520c671cdb644fb987facea36ff5e597605.tar.bz2 |
Thu Aug 7 19:40:52 1997 Geoffrey Noer <noer@cygnus.com>
Changes to OCD support to support wiggler box as well as
target boxes:
* ocd.c: change speed in init command to 0 from 80,
add (temporary) logging commands to help debugging,
(ocd_open): if "target ocd wiggler lpt" then use special
ser-ocd.c serial interface which communicates with Wigglers.dll,
otherwise do as we did before
(ocd_get_packet): add OCD_LOG_FILE and OCD_SET_CONNECTION to
switch of known commands of len 0
* ocd.h: add OCD_LOG_FILE
* serial.c (serial_open): do serial_interface_lookup on ocd
in the case of ocd
* ser-ocd.c: add buffer to contain responses from sending a
command to the Wigglers.dll.
(ocd_readchar): return curr char from buffer and increment ptr
(ocd_write): send buffer to Wigglers.dll, storing response in
return buffer and initializing curr location ptr to start of
buffer.
Diffstat (limited to 'gdb/ser-ocd.c')
-rw-r--r-- | gdb/ser-ocd.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/gdb/ser-ocd.c b/gdb/ser-ocd.c index 1b1213e..1bded76 100644 --- a/gdb/ser-ocd.c +++ b/gdb/ser-ocd.c @@ -54,8 +54,9 @@ ocd_raw (scb) } /* We need a buffer to store responses from the Wigglers.dll */ -char * from_wigglers_buffer; -char * bptr; /* curr spot in buffer */ +#define WIGGLER_BUFF_SIZE 512 +unsigned char from_wiggler_buffer[WIGGLER_BUFF_SIZE]; +unsigned char * wiggler_buffer_ptr; /* curr spot in buffer */ static void ocd_readremote () @@ -67,7 +68,7 @@ ocd_readchar (scb, timeout) serial_t scb; int timeout; { - + return (int) *wiggler_buffer_ptr++; /* return curr char and increment ptr */ } struct ocd_ttystate { @@ -130,12 +131,11 @@ ocd_write (scb, str, len) { char c; - ocd_readremote(); - #ifdef __CYGWIN32__ /* send packet to Wigglers.dll and store response so we can give it to remote-wiggler.c when get_packet is run */ - do_command (str, from_wigglers_buffer); + do_command (str, from_wiggler_buffer); + wiggler_buffer_ptr = from_wiggler_buffer; #endif return 0; @@ -145,7 +145,6 @@ static void ocd_close (scb) serial_t scb; { - ocd_close (0); } static struct serial_ops ocd_ops = @@ -172,3 +171,9 @@ _initialize_ser_ocd_bdm () { serial_add_interface (&ocd_ops); } + + + + + + |