aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-mips.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-09-20 21:20:59 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-09-20 21:20:59 +0000
commit66a48870ac0d96f42e51e89a1b04d08e2399cb81 (patch)
treed061626ca26bf1a329b66ca217f3edc29c4ee635 /gdb/remote-mips.c
parent424ab390d67502b4aa0c2f89d0db5fd01881ceaf (diff)
downloadgdb-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-mips.c')
-rw-r--r--gdb/remote-mips.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 91d846d..f04f0e8 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -28,6 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "gdbcore.h"
#include "serial.h"
#include "target.h"
+#include "remote-utils.h"
#include <signal.h>
@@ -306,7 +307,7 @@ mips_readchar (timeout)
error ("End of file from remote");
if (ch == SERIAL_ERROR)
error ("Error reading from remote: %s", safe_strerror (errno));
- if (remote_debug > 1)
+ if (sr_get_debug () > 1)
{
if (ch != SERIAL_TIMEOUT)
printf_filtered ("Read '%c' %d 0x%x\n", ch, ch, ch);
@@ -323,7 +324,7 @@ mips_readchar (timeout)
&& state == 5
&& ! mips_initializing)
{
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Reinitializing MIPS debugging mode\n");
SERIAL_WRITE (mips_desc, "\rdb tty0\r", sizeof "\rdb tty0\r" - 1);
sleep (1);
@@ -375,7 +376,7 @@ mips_receive_header (hdr, pgarbage, ch, timeout)
what the program is outputting, if the debugging is
being done on the console port. FIXME: Perhaps this
should be filtered? */
- if (! mips_initializing || remote_debug > 0)
+ if (! mips_initializing || sr_get_debug () > 0)
{
putchar (ch);
fflush (stdout);
@@ -510,7 +511,7 @@ mips_send_packet (s, get_ack)
int garbage;
int ch;
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
{
packet[HDR_LENGTH + len + TRLR_LENGTH] = '\0';
printf_filtered ("Writing \"%s\"\n", packet + 1);
@@ -566,7 +567,7 @@ mips_send_packet (s, get_ack)
!= TRLR_GET_CKSUM (trlr))
continue;
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
{
hdr[HDR_LENGTH] = '\0';
trlr[TRLR_LENGTH] = '\0';
@@ -627,7 +628,7 @@ mips_receive_packet (buff)
/* An acknowledgement is probably a duplicate; ignore it. */
if (! HDR_IS_DATA (hdr))
{
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Ignoring unexpected ACK\n");
continue;
}
@@ -635,7 +636,7 @@ mips_receive_packet (buff)
/* If this is the wrong sequence number, ignore it. */
if (HDR_GET_SEQ (hdr) != mips_receive_seq)
{
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Ignoring sequence number %d (want %d)\n",
HDR_GET_SEQ (hdr), mips_receive_seq);
continue;
@@ -660,7 +661,7 @@ mips_receive_packet (buff)
if (i < len)
{
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Got new SYN after %d chars (wanted %d)\n",
i, len);
continue;
@@ -671,7 +672,7 @@ mips_receive_packet (buff)
error ("Timed out waiting for packet");
if (err == -2)
{
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Got SYN when wanted trailer\n");
continue;
}
@@ -679,7 +680,7 @@ mips_receive_packet (buff)
if (mips_cksum (hdr, buff, len) == TRLR_GET_CKSUM (trlr))
break;
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
printf_filtered ("Bad checksum; data %d, trailer %d\n",
mips_cksum (hdr, buff, len),
TRLR_GET_CKSUM (trlr));
@@ -697,7 +698,7 @@ mips_receive_packet (buff)
ack[HDR_LENGTH + TRLR_INDX_CSUM2] = TRLR_SET_CSUM2 (cksum);
ack[HDR_LENGTH + TRLR_INDX_CSUM3] = TRLR_SET_CSUM3 (cksum);
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
{
ack[HDR_LENGTH + TRLR_LENGTH] = '\0';
printf_filtered ("Writing ack %d \"%s\"\n", mips_receive_seq,
@@ -708,7 +709,7 @@ mips_receive_packet (buff)
error ("write to target failed: %s", safe_strerror (errno));
}
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
{
buff[len] = '\0';
printf_filtered ("Got packet \"%s\"\n", buff);
@@ -728,7 +729,7 @@ mips_receive_packet (buff)
ack[HDR_LENGTH + TRLR_INDX_CSUM2] = TRLR_SET_CSUM2 (cksum);
ack[HDR_LENGTH + TRLR_INDX_CSUM3] = TRLR_SET_CSUM3 (cksum);
- if (remote_debug > 0)
+ if (sr_get_debug () > 0)
{
ack[HDR_LENGTH + TRLR_LENGTH] = '\0';
printf_filtered ("Writing ack %d \"%s\"\n", mips_receive_seq,