Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lluís Batlle i Rossell via Gdb" <gdb@sourceware.org>
To: Luis Machado <luis.machado@arm.com>
Cc: gdb@sourceware.org
Subject: Re: sysroot and coredump debugging
Date: Thu, 24 Apr 2025 18:23:00 +0200	[thread overview]
Message-ID: <ufyaa6qnpxiw7ubjd7vgmxl7fb7fkh52f5tmfbjfdskea35vrf@nyekd6qoqrfb> (raw)
In-Reply-To: <c8921a3d-f267-4a19-b61a-f3328615c141@arm.com>

On Thu, Apr 24, 2025 at 03:01:56PM +0100, Luis Machado wrote:
> On 4/23/25 14:06, Lluís Batlle i Rossell via Gdb wrote:
> > I expect that I can run this in my development computer, after downloading
> > the core dump from the target system:
> > (gdb) set sysroot /mysysroot
> > (gdb) file myelf  #  it has debug info
> > (gdb) core-file core
> > 
> > And this never works; it drops the file with the symbols, thinking it's
> > unrelated to the core dump:
> > 
> > warning: Can't open file /home/user/myelf during file-backed mapping note
> > processing
> > warning: core file may not match specified executable file.
> 
> Unfortunately I think this is an area where improvements could be made. I know
> we have "substitute-path", but that's only for sources. In theory setting sysroot
> should work, but it doesn't seem to.
> 
> We want gdb to be strict about making sure the core file matches the ELF file, but
> we could have some adjustability here.

The "same absolute path" is never required when debugging core dumps
without sysroot, for dump/elf matching. Why does the sysroot introduce
that requirement? It looks like there is a small mistake somewhere, rather
than intended behavior.

      reply	other threads:[~2025-04-24 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 13:06 Lluís Batlle i Rossell via Gdb
2025-04-24 14:01 ` Luis Machado via Gdb
2025-04-24 16:23   ` Lluís Batlle i Rossell via Gdb [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=ufyaa6qnpxiw7ubjd7vgmxl7fb7fkh52f5tmfbjfdskea35vrf@nyekd6qoqrfb \
    --to=gdb@sourceware.org \
    --cc=luis.machado@arm.com \
    --cc=viric@viric.name \
    /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