diff --git a/external/gpl3/gdb/dist/gdb/remote.c b/external/gpl3/gdb/dist/gdb/remote.c index 59075cb09f20..389b6132d617 100644 --- a/external/gpl3/gdb/dist/gdb/remote.c +++ b/external/gpl3/gdb/dist/gdb/remote.c @@ -8126,13 +8126,6 @@ remote_target::process_g_packet (struct regcache *regcache) buf_len = strlen (rs->buf.data ()); - /* Further sanity checks, with knowledge of the architecture. */ - if (buf_len > 2 * rsa->sizeof_g_packet) - error (_("Remote 'g' packet reply is too long (expected %ld bytes, got %d " - "bytes): %s"), - rsa->sizeof_g_packet, buf_len / 2, - rs->buf.data ()); - /* 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 target can safely receive. */ @@ -8143,7 +8136,7 @@ remote_target::process_g_packet (struct regcache *regcache) update our records. A 'g' reply that doesn't include a register's value implies either that the register is not available, or that the 'p' packet must be used. */ - if (buf_len < 2 * rsa->sizeof_g_packet) + if (buf_len != 2 * rsa->sizeof_g_packet) { long sizeof_g_packet = buf_len / 2;