From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb@sources.redhat.com
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: working with split debug files and sectionless ELFs
Date: Fri, 14 Oct 2011 17:34:00 -0000 [thread overview]
Message-ID: <4E9871B9.8080901@qnx.com> (raw)
In-Reply-To: <201110141307.54843.vapier@gentoo.org>
On 11-10-14 01:07 PM, Mike Frysinger wrote:
> On Friday 14 October 2011 11:49:24 Jan Kratochvil wrote:
>> On Fri, 14 Oct 2011 17:38:30 +0200, Aleksandar Ristovski wrote:
>>> On 11-10-14 11:27 AM, Mike Frysinger wrote:
>>>> check out symfile.c:find_separate_debug_file_by_debuglink(). i hacked
>>>> it locally so that when get_debug_link_info() returns NULL, the code
>>>> would fall back to searching for the basename(argv[0]) + ".debug" of
>>>> the ELF in question. that seemed to do what i want: "just work".
>>>
>>> Ok, so the problem is that if debuglink is missing, gdb just gives up.
>>>
>>> FWIW, what you are proposing makes sense to me. Maybe make it an
>>> optional behaviour?
>>
>> The problem is the ".debug" extension is stored in .debug_link and it is
>> not assumed by GDB so far. And for example Debian does not use it at all.
>
> that's why it was a hack. i think it reasonable that if there is no debug
> info to first look for the file name itself, and then look for the file name with
> a .debug suffix.
>
> so `gdb prog` where prog is found at /usr/bin/prog would default to
> /usr/lib/debug/usr/bin/prog followed by /usr/lib/debug/usr/bin/prog.debug (and
> obviously /usr/lib/debug/ is the existing configurable setup and not a
> hardcoded path).
>
> i'm thinking of the fallback/default behavior here. none of this would
> preclude the existing explicit options that gdb has available.
> -mike
I would prefer to not have gdb assume any suffix. When I said your
proposal made sense, I did not go into the implementation details. I
agree this would be useful in principle - but would strongly suggest not
to hard-code such a suffix, fallback or not.
If suffix is desired, than at a minimum make it optional. Something like
(gdb) set debug-file-suffix .debug
You can make default settable at configure time.
If separate info is in a separate directory, suffix quite possibly is
not needed at all; it does make a lot of sense if symbol file is in the
same directory as the binary itself.
Further, it might not be .debug at all (e.g. we prefer using .sym).
---
Aleksandar
prev parent reply other threads:[~2011-10-14 17:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 17:36 Mike Frysinger
2011-10-14 14:23 ` Aleksandar Ristovski
2011-10-14 15:37 ` Mike Frysinger
2011-10-14 15:27 ` Mike Frysinger
2011-10-14 15:42 ` Aleksandar Ristovski
2011-10-14 16:00 ` Jan Kratochvil
2011-10-14 16:47 ` Jan Kratochvil
2011-10-14 17:08 ` Mike Frysinger
2011-10-14 17:29 ` Jan Kratochvil
2011-10-15 5:28 ` Mike Frysinger
2011-10-14 17:20 ` Mike Frysinger
2011-10-14 17:31 ` Jan Kratochvil
2011-10-14 17:34 ` Aleksandar Ristovski [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=4E9871B9.8080901@qnx.com \
--to=aristovski@qnx.com \
--cc=gdb@sources.redhat.com \
--cc=jan.kratochvil@redhat.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