diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-09-05 16:43:07 +0200 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-09-05 17:41:03 +0200 |
commit | fc8098275751f48404a547fd027b2671c5350302 (patch) | |
tree | 3f35c22a0d6bf40e56d2ad5e87d81d7af14f3e42 /gdb/remote.c | |
parent | d2fcdd85466668c06dda0fa02ac8c1f4cef3910d (diff) | |
download | gdb-fc8098275751f48404a547fd027b2671c5350302.zip gdb-fc8098275751f48404a547fd027b2671c5350302.tar.gz gdb-fc8098275751f48404a547fd027b2671c5350302.tar.bz2 |
Improve "'g' reply is is to long" error message
... by adding the expected size, and the received size. I found this
useful when debugging gdbarch/remote issues, since it gives a hint of
what gdb expects and what the remote sent.
gdb/ChangeLog:
* remote.c (process_g_packet): Update error message.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 3347dd8..abeef0d 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7591,7 +7591,8 @@ process_g_packet (struct regcache *regcache) /* Further sanity checks, with knowledge of the architecture. */ if (buf_len > 2 * rsa->sizeof_g_packet) - error (_("Remote 'g' packet reply is too long: %s"), rs->buf); + error (_("Remote 'g' packet reply is too long (expected %ld bytes, got %d " + "bytes): %s"), rsa->sizeof_g_packet, buf_len / 2, rs->buf); /* Save the size of the packet sent to us by the target. It is used as a heuristic when determining the max size of packets that the |