... 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.
+2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
+
+ * remote.c (process_g_packet): Update error message.
+
2017-09-05 Yao Qi <yao.qi@linaro.org>
* configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
/* 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