Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PR13984 - gdb stops controlling a thread after "Remote 'g' packet reply is too long: ..." error message
@ 2016-04-10 14:49 Orgad Shaneh
  2016-04-11 21:19 ` Luis Machado
  0 siblings, 1 reply; 16+ messages in thread
From: Orgad Shaneh @ 2016-04-10 14:49 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 100 bytes --]

Please review the attached patch. It was inspired by the patch
attached to the bug report.

Thanks.

[-- Attachment #2: 0001-PR13984-gdb-stops-controlling-a-thread.patch --]
[-- Type: application/octet-stream, Size: 1413 bytes --]

From 03ab95933b85dd85c2f4fa5797017e6cee0c8466 Mon Sep 17 00:00:00 2001
From: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Date: Sun, 10 Apr 2016 17:39:24 +0300
Subject: [PATCH] PR13984, gdb stops controlling a thread...

... after "Remote 'g' packet reply is too long: ..." error message

PR13984:
    remote.c: Handle long g packets instead of failing
---
 gdb/remote.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gdb/remote.c b/gdb/remote.c
index 5c407b6..e8951dc 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -7188,10 +7188,6 @@ process_g_packet (struct regcache *regcache)
 
   buf_len = strlen (rs->buf);
 
-  /* 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);
-
   /* 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.  */
@@ -7202,7 +7198,7 @@ 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)
     {
       rsa->sizeof_g_packet = buf_len / 2;
 
-- 
2.8.0.windows.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-04-14 21:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-10 14:49 PR13984 - gdb stops controlling a thread after "Remote 'g' packet reply is too long: ..." error message Orgad Shaneh
2016-04-11 21:19 ` Luis Machado
2016-04-12  5:16   ` Orgad Shaneh
2016-04-12 13:37     ` Luis Machado
2016-04-13  5:43       ` Orgad Shaneh
2016-04-13 19:11         ` Luis Machado
2016-04-13 20:07           ` Orgad Shaneh
2016-04-13 20:27             ` Pedro Alves
2016-04-13 20:52               ` Orgad Shaneh
2016-04-13 21:57                 ` Pedro Alves
2016-04-14  8:33                   ` Orgad Shaneh
2016-04-14  9:07                     ` Orgad Shaneh
2016-04-14  9:22                       ` Pedro Alves
2016-04-14  9:39                         ` Orgad Shaneh
2016-04-14  9:47                           ` Pedro Alves
2016-04-14 21:21                   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox