public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix "Remote 'g' packet reply is too long" problems with multiple inferiors
@ 2017-10-02 15:15 Pedro Alves
  2017-10-02 15:15 ` [PATCH 3/3] " Pedro Alves
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Pedro Alves @ 2017-10-02 15:15 UTC (permalink / raw)
  To: gdb-patches

This series fixes some problems I uncovered while working on my
multi-target branch [1].

Namely when debugging two inferiors (or more) against gdbserver, and
the inferiors have different architectures, such as e.g., on x86_64
GNU/Linux and one inferior is 64-bit while the other is 32-bit, then
GDB can get confused with the different architectures in a couple
spots, resulting in instances of the infamous "Remote 'g' packet reply
is too long" error.  For example, with the test added in patch #3, we
get:

~~~
  Continuing.
  Remote 'g' packet reply is too long (expected 440 bytes, got 816 bytes): ad064000000000000[snip]
  (gdb) FAIL: gdb.multi/multi-arch.exp: inf1 event with inf2 selected: continue to hello_loop

  c
  Continuing.
  Truncated register 50 in remote 'g' packet
  (gdb) PASS: gdb.multi/multi-arch.exp: inf2 event with inf1 selected: c
~~~

The fix I was aiming for is in patch #3.  The other two patches
preemptively fix problems that patch #3 alone would cause.  They're
sorted this way to avoid introducing temporary regressions.

[1] - https://github.com/palves/gdb/tree/palves/multi-target

Pedro Alves (3):
  Redesign mock environment for gdbarch selftests
  Reimplement support for "maint print registers" with no running
    inferior yet
  Fix "Remote 'g' packet reply is too long" problems with multiple
    inferiors

 gdb/frame.c                            |  17 ------
 gdb/frame.h                            |   8 ---
 gdb/gdbarch-selftests.c                | 105 +++++++++++++++++++++++++++------
 gdb/progspace.c                        |  12 ----
 gdb/progspace.h                        |  11 ++++
 gdb/regcache.c                         |  33 ++++++-----
 gdb/regcache.h                         |  10 ----
 gdb/remote.c                           |  92 +++++++++++++++++++++--------
 gdb/target.c                           |  14 ++---
 gdb/target.h                           |  10 ++++
 gdb/testsuite/gdb.multi/hangout.c      |  14 +++++
 gdb/testsuite/gdb.multi/hello.c        |  15 ++++-
 gdb/testsuite/gdb.multi/multi-arch.exp |  24 ++++++++
 13 files changed, 250 insertions(+), 115 deletions(-)

-- 
2.5.5

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

end of thread, other threads:[~2017-12-13 11:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-02 15:15 [PATCH 0/3] Fix "Remote 'g' packet reply is too long" problems with multiple inferiors Pedro Alves
2017-10-02 15:15 ` [PATCH 3/3] " Pedro Alves
2017-10-03 11:36   ` Yao Qi
2017-10-03 11:40   ` Yao Qi
2017-10-03 12:21     ` Pedro Alves
2017-10-03 14:02       ` Pedro Alves
2017-10-04 10:21         ` Yao Qi
2017-10-04 17:38           ` Pedro Alves
2017-10-05 16:50   ` Ulrich Weigand
2017-10-05 17:08     ` Pedro Alves
2017-12-12 21:33   ` Maciej W. Rozycki
2017-12-13  0:45     ` Pedro Alves
2017-12-13 11:31       ` Maciej W. Rozycki
2017-10-02 15:15 ` [PATCH 2/3] Reimplement support for "maint print registers" with no running inferior yet Pedro Alves
2017-10-03 11:17   ` Yao Qi
2017-10-02 15:15 ` [PATCH 1/3] Redesign mock environment for gdbarch selftests Pedro Alves
2017-10-03 11:06   ` Yao Qi
2017-10-03 12:05     ` Pedro Alves
2017-10-04 10:39       ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).