Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lluís Batlle i Rossell via Gdb" <gdb@sourceware.org>
To: gdb@sourceware.org
Subject: sysroot and coredump debugging
Date: Wed, 23 Apr 2025 15:06:11 +0200	[thread overview]
Message-ID: <ef7b4roispzs6js4zjw6fruoyg3m2qwggblzkydbb5amhd7ysf@drlvnmltqhh5> (raw)

Hello,

I have an target system, for which I have a sysroot path in my
development computer. Both GNU/Linux.

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.

Nothing works with dynamic libs loaded either. The only way I can make gdb
to allow me to debug the core dump with symbols is by copying the elf to
"/mysysroot/home/user/myelf", as it was in the target system.

Is this expected? It is very annoying. Why should the elf of the
executable sit within the sysroot in an exact place, to debug a core dump?

I use gdb 15.2 but this happens at least since gdb 11. Maybe it is fixed
in a newer version?

Thank you,
Lluís.

             reply	other threads:[~2025-04-23 13:07 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 [this message]
2025-04-24 14:01 ` Luis Machado via Gdb
2025-04-24 16:23   ` Lluís Batlle i Rossell via Gdb

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=ef7b4roispzs6js4zjw6fruoyg3m2qwggblzkydbb5amhd7ysf@drlvnmltqhh5 \
    --to=gdb@sourceware.org \
    --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