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.
This commit is contained in:
parent
b80fafe375
commit
2f65bcb75d
2 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-08-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* remote.c (sizeof_pkt): Remove.
|
||||
(remote_trace_find): Use rs->buf_size, not sizeof_pkt.
|
||||
|
||||
2013-08-14 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* remote.c (struct remote_state) <use_threadinfo_query,
|
||||
|
|
|
@ -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."));
|
||||
|
||||
|
|
Loading…
Reference in a new issue