diff options
author | Stu Grossman <grossman@cygnus> | 1994-04-27 01:39:38 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1994-04-27 01:39:38 +0000 |
commit | 1624c38fd75e5987ff87687ec1180ea1da8ddafb (patch) | |
tree | c3d5ab0432e161786e516308683f74dce62753fc | |
parent | e632f85ee1d36b355a80cff5fdf7e8573efe4977 (diff) | |
download | gdb-1624c38fd75e5987ff87687ec1180ea1da8ddafb.zip gdb-1624c38fd75e5987ff87687ec1180ea1da8ddafb.tar.gz gdb-1624c38fd75e5987ff87687ec1180ea1da8ddafb.tar.bz2 |
[Sharp eyes, Jim...]
* remote.c:
* (get_offsets): Temporary kludge to force data & bss sections to
have the same relocation.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/remote.c | 47 |
2 files changed, 46 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ec724d2..9c14437 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -23,6 +23,8 @@ Tue Apr 26 09:50:45 1994 Stu Grossman (grossman at cygnus.com) * partial-stabs.h (cases 'f' & 'F'): Fixes to work around Solaris brain-damage which don't apply to relocatable object files. * remote.c (putpkt): Improve error reporting and error handling. + * (get_offsets): Temporary kludge to force data & bss sections to + have the same relocation. * stabsread.c (define_symbol, scan_file_globals): Record section info in sym. diff --git a/gdb/remote.c b/gdb/remote.c index 9be476c..09eb616 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -318,8 +318,13 @@ get_offsets () with SEC_CODE set, but we currently have no way to deal with that). */ ANOFFSET (offs, SECT_OFF_TEXT) = text_addr; + + /* This is a temporary kludge to force data and bss to use the same offsets + because that's what nlmconv does now. The real solution requires changes + to the stub and remote.c that I don't have time to do right now. */ + ANOFFSET (offs, SECT_OFF_DATA) = data_addr; - ANOFFSET (offs, SECT_OFF_BSS) = bss_addr; + ANOFFSET (offs, SECT_OFF_BSS) = data_addr; objfile_relocate (symfile_objfile, offs); } @@ -1096,10 +1101,13 @@ putpkt (buf) while (1) { + int started_error_output = 0; + if (remote_debug) { *p = '\0'; - printf_unfiltered ("Sending packet: %s...", buf2); gdb_flush(gdb_stdout); + printf_unfiltered ("Sending packet: %s...", buf2); + gdb_flush(gdb_stdout); } if (SERIAL_WRITE (remote_desc, buf2, p - buf2)) perror_with_name ("putpkt: write failed"); @@ -1109,6 +1117,23 @@ putpkt (buf) { ch = readchar (); + if (remote_debug) + { + switch (ch) + { + case '+': + case SERIAL_TIMEOUT: + case SERIAL_ERROR: + case SERIAL_EOF: + case '$': + if (started_error_output) + { + putc_unfiltered ('\n'); + started_error_output = 0; + } + } + } + switch (ch) { case '+': @@ -1121,9 +1146,25 @@ putpkt (buf) perror_with_name ("putpkt: couldn't read ACK"); case SERIAL_EOF: error ("putpkt: EOF while trying to read ACK"); + case '$': + { + unsigned char junkbuf[PBUFSIZ]; + + /* It's probably an old response, and we're out of sync. Just + gobble up the packet and ignore it. */ + getpkt (junkbuf, 0); + continue; /* Now, go look for + */ + } default: if (remote_debug) - printf_unfiltered ("%02X %c ", ch&0xFF, ch); + { + if (!started_error_output) + { + started_error_output = 1; + printf_unfiltered ("putpkt: Junk: "); + } + putc_unfiltered (ch & 0177); + } continue; } break; /* Here to retransmit */ |