From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, Andreas Arnez <arnez@linux.ibm.com>
Subject: [PING] [PATCH] gdb: Fix derive_heap_segment for PIE
Date: Thu, 22 Jun 2023 00:13:26 +0200 [thread overview]
Message-ID: <eb4c2118d0c89036267ee06b7cb933f2c1db9338.camel@linux.ibm.com> (raw)
In-Reply-To: <20230509112401.1043723-1-iii@linux.ibm.com>
On Tue, 2023-05-09 at 13:24 +0200, Ilya Leoshkevich wrote:
> Using gcore with qemu-user gdbstub produces huge core dumps:
>
> $ qemu-s390x-static -g 1234 /bin/true
> $ gdb -ex 'target remote :1234' /bin/true
> (gdb) generate-core-file
> Saved corefile core.1
> $ wc -c <core.1
> 274878128632
>
> The reason is that derive_heap_segment thinks that heap starts quite
> close to 0, because it works with bfd objects, which are not aware of
> actual PIE load addresses.
>
> Fix by using objfiles instead.
> ---
> gdb/gcore.c | 31 ++++++++++++++-----------------
> 1 file changed, 14 insertions(+), 17 deletions(-)
Ping.
prev parent reply other threads:[~2023-06-21 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 11:24 Ilya Leoshkevich
2023-06-21 22:13 ` Ilya Leoshkevich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb4c2118d0c89036267ee06b7cb933f2c1db9338.camel@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=arnez@linux.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).