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:45:55 +0200 |
commit | e72d662aba1bc92e141688ebb27f3948ec5d2997 (patch) | |
tree | 18f14993d66f3027149bae91438ebda74204dad4 /gdb | |
parent | 6854bcdfba43dd3a2058565bbf85868c9914bf39 (diff) | |
download | fsf-binutils-gdb-e72d662aba1bc92e141688ebb27f3948ec5d2997.zip fsf-binutils-gdb-e72d662aba1bc92e141688ebb27f3948ec5d2997.tar.gz fsf-binutils-gdb-e72d662aba1bc92e141688ebb27f3948ec5d2997.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')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/remote.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5eef1c9..25310e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-09-05 Simon Marchi <simon.marchi@ericsson.com> + + * remote.c (process_g_packet): Update error message. + 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/22046 diff --git a/gdb/remote.c b/gdb/remote.c index 694897d..a667b0c 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7583,7 +7583,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 |