This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] Fix "Remote 'g' packet reply is too long" problems with multiple inferiors
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 2 Oct 2017 16:15:08 +0100
- Subject: [PATCH 0/3] Fix "Remote 'g' packet reply is too long" problems with multiple inferiors
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BB61E90902
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