diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-20 21:20:59 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-20 21:20:59 +0000 |
commit | 66a48870ac0d96f42e51e89a1b04d08e2399cb81 (patch) | |
tree | d061626ca26bf1a329b66ca217f3edc29c4ee635 /gdb/remote.c | |
parent | 424ab390d67502b4aa0c2f89d0db5fd01881ceaf (diff) | |
download | gdb-66a48870ac0d96f42e51e89a1b04d08e2399cb81.zip gdb-66a48870ac0d96f42e51e89a1b04d08e2399cb81.tar.gz gdb-66a48870ac0d96f42e51e89a1b04d08e2399cb81.tar.bz2 |
* remote.c, remote-mips.c: Use sr_get_debug not remote_debug.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index efdc7d9..ca880a8 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -221,10 +221,6 @@ static int timeout = 2; int icache; #endif -/* FIXME: This is a hack which lets this file compile. It should be getting - this setting from remote-utils.c. */ -#define remote_debug (0) - /* Descriptor for I/O to remote machine. Initialize it to NULL so that remote_open knows that we don't have a file open when the program starts. */ @@ -409,7 +405,7 @@ remote_interrupt (signo) /* If this doesn't work, try more severe steps. */ signal (signo, remote_interrupt_twice); - if (remote_debug) + if (sr_get_debug ()) printf ("remote_interrupt called\n"); SERIAL_WRITE (remote_desc, "\003", 1); /* Send a ^C */ @@ -933,7 +929,7 @@ putpkt (buf) while (1) { - if (remote_debug) + if (sr_get_debug ()) { *p = '\0'; printf ("Sending packet: %s...", buf2); fflush(stdout); @@ -949,7 +945,7 @@ putpkt (buf) switch (ch) { case '+': - if (remote_debug) + if (sr_get_debug ()) printf("Ack\n"); return; case SERIAL_TIMEOUT: @@ -959,7 +955,7 @@ putpkt (buf) case SERIAL_EOF: error ("putpkt: EOF while trying to read ACK"); default: - if (remote_debug) + if (sr_get_debug ()) printf ("%02X %c ", ch&0xFF, ch); continue; } @@ -1000,7 +996,7 @@ getpkt (buf, forever) if (forever) continue; if (++retries >= MAX_RETRIES) - if (remote_debug) puts_filtered ("Timed out.\n"); + if (sr_get_debug ()) puts_filtered ("Timed out.\n"); goto out; } @@ -1018,13 +1014,13 @@ getpkt (buf, forever) c = readchar (); if (c == SERIAL_TIMEOUT) { - if (remote_debug) + if (sr_get_debug ()) puts_filtered ("Timeout in mid-packet, retrying\n"); goto whole; /* Start a new packet, count retries */ } if (c == '$') { - if (remote_debug) + if (sr_get_debug ()) puts_filtered ("Saw new packet start in middle of old one\n"); goto whole; /* Start a new packet, count retries */ } @@ -1069,7 +1065,7 @@ out: SERIAL_WRITE (remote_desc, "+", 1); - if (remote_debug) + if (sr_get_debug ()) fprintf (stderr,"Packet received: %s\n", buf); } |