diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-06-22 15:20:47 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-06-22 15:20:47 +0000 |
commit | 01f9e8fab8e45337f0451f7edbd03cfe0381999a (patch) | |
tree | 0c0c608e4d60bbd1e26154782561d50cc70e1014 /gdb/gdbserver/server.h | |
parent | 3994f87e9911d0ae23164d55e19dcc009cb51e1b (diff) | |
download | gdb-01f9e8fab8e45337f0451f7edbd03cfe0381999a.zip gdb-01f9e8fab8e45337f0451f7edbd03cfe0381999a.tar.gz gdb-01f9e8fab8e45337f0451f7edbd03cfe0381999a.tar.bz2 |
* remote-utils.c (remote_escape_output, remote_unescape_input): New.
(putpkt_binary): Renamed from putpkt and adjusted for binary
data.
(putpkt): New wrapper for putpkt_binary.
(readchar): Don't mask off the high bit.
(decode_X_packet): New function.
* server.c (main): Call putpkt_binary if a handler sets the packet
length. Save the length of the incoming packet. Handle 'X'.
* server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
Diffstat (limited to 'gdb/gdbserver/server.h')
-rw-r--r-- | gdb/gdbserver/server.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index a659bbb..5147094 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -57,6 +57,9 @@ extern char *strerror (int); /* X3.159-1989 4.11.6.2 */ #endif #endif +/* A type used for binary buffers. */ +typedef unsigned char gdb_byte; + /* FIXME: This should probably be autoconf'd for. It's an integer type at least the size of a (void *). */ typedef long long CORE_ADDR; @@ -133,6 +136,7 @@ extern jmp_buf toplevel; extern int all_symbols_looked_up; int putpkt (char *buf); +int putpkt_binary (char *buf, int len); int getpkt (char *buf); void remote_open (char *name); void remote_close (void); @@ -152,9 +156,14 @@ void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr, unsigned int *len_ptr); void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr, unsigned int *len_ptr, unsigned char *to); +int decode_X_packet (char *from, int packet_len, CORE_ADDR * mem_addr_ptr, + unsigned int *len_ptr, unsigned char *to); int unhexify (char *bin, const char *hex, int count); int hexify (char *hex, const char *bin, int count); +int remote_escape_output (const gdb_byte *buffer, int len, + gdb_byte *out_buf, int *out_len, + int out_maxlen); int look_up_one_symbol (const char *name, CORE_ADDR *addrp); |