aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-14 18:15:48 +0000
committerTom Tromey <tromey@redhat.com>2013-08-14 18:15:48 +0000
commit2f65bcb75d05d93af037229e084160fe25259322 (patch)
tree752b884f926d80e82f85f2f7bbf7c7b7d623059c /gdb/remote.c
parentb80fafe37584f06b7748a2a3c839db484e18686d (diff)
downloadgdb-2f65bcb75d05d93af037229e084160fe25259322.zip
gdb-2f65bcb75d05d93af037229e084160fe25259322.tar.gz
gdb-2f65bcb75d05d93af037229e084160fe25259322.tar.bz2
move sizeof_pkt into remote_trace_find
The global sizeof_pkt is only used in remote_trace_find, like so: reply = remote_get_noisy_reply (&(rs->buf), &sizeof_pkt); I think in this situation it is more correct to use the recorded size of the buffer. Otherwise it seems that some skew could result. * remote.c (sizeof_pkt): Remove. (remote_trace_find): Use rs->buf_size, not sizeof_pkt.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 780a1be..0fa5fcd 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -490,8 +490,6 @@ struct remote_arch_state
long remote_packet_size;
};
-long sizeof_pkt = 2000;
-
/* Utility: generate error from an incoming stub packet. */
static void
trace_error (char *buf)
@@ -10971,7 +10969,7 @@ remote_trace_find (enum trace_find_type type, int num,
}
putpkt (rs->buf);
- reply = remote_get_noisy_reply (&(rs->buf), &sizeof_pkt);
+ reply = remote_get_noisy_reply (&(rs->buf), &rs->buf_size);
if (*reply == '\0')
error (_("Target does not support this command."));