Search
lxdream.org :: lxdream/src/gdbserver.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdbserver.c
changeset 1025:f32183d273fb
prev1020:04e622ab1635
next1071:182cfe43c09e
author nkeynes
date Sat Jun 13 07:03:51 2009 +0000 (12 years ago)
permissions -rw-r--r--
last change Fix signedness warnings
file annotate diff log raw
1.1 --- a/src/gdbserver.c Wed Jun 03 11:36:27 2009 +0000
1.2 +++ b/src/gdbserver.c Sat Jun 13 07:03:51 2009 +0000
1.3 @@ -104,7 +104,7 @@
1.4 /**
1.5 * Parse bulk hex data - buffer should be at least datalen/2 bytes long
1.6 */
1.7 -size_t gdb_read_hex_data( struct gdb_server *server, unsigned char *buf, unsigned char *data, int datalen )
1.8 +size_t gdb_read_hex_data( struct gdb_server *server, unsigned char *buf, char *data, int datalen )
1.9 {
1.10 char *p = data;
1.11 for( int i=0; i<datalen/2; i++ ) {
1.12 @@ -120,7 +120,7 @@
1.13 * Parse bulk binary-encoded data - $, #, 0x7D are encoded as 0x7d, char ^ 0x20.
1.14 * Buffer should be at least datalen bytes longs.
1.15 */
1.16 -size_t gdb_read_binary_data( struct gdb_server *server, unsigned char *buf, unsigned char *data, int datalen )
1.17 +size_t gdb_read_binary_data( struct gdb_server *server, unsigned char *buf, char *data, int datalen )
1.18 {
1.19 unsigned char *q = buf;
1.20 for( int i=0, j=0; i<datalen; i++ ) {
1.21 @@ -245,7 +245,7 @@
1.22 gdb_send_error( server, GDB_ERROR_FORMAT );
1.23 } else {
1.24 size_t datalen;
1.25 - char mem[tmp2];
1.26 + unsigned char mem[tmp2];
1.27 if( server->mmu ) {
1.28 datalen = server->cpu->read_mem_vma(mem, tmp, tmp2);
1.29 } else {
1.30 @@ -264,7 +264,7 @@
1.31 gdb_send_error( server, GDB_ERROR_FORMAT );
1.32 } else {
1.33 size_t len;
1.34 - char mem[tmp2];
1.35 + unsigned char mem[tmp2];
1.36 len = gdb_read_hex_data( server, mem, data+tmp3, length-tmp3 );
1.37 if( len != tmp2 ) {
1.38 gdb_send_error( server, GDB_ERROR_FORMAT );
1.39 @@ -347,7 +347,7 @@
1.40 if( sscanf( data, "%x,%x:%n", &tmp, &tmp2, &tmp3 ) != 2 ) {
1.41 gdb_send_error( server, GDB_ERROR_FORMAT );
1.42 } else {
1.43 - char mem[length - tmp3];
1.44 + unsigned char mem[length - tmp3];
1.45 size_t len = gdb_read_binary_data( server, mem, data + tmp3, length-tmp3 );
1.46 if( len != tmp2 ) {
1.47 gdb_send_error( server, GDB_ERROR_FORMAT );
.