From: Eli Zaretskii <eliz@elta.co.il>
To: Bob Rossi <bob@brasko.net>
Cc: gdb@sources.redhat.com
Subject: Re: Finding absolute path from relative.
Date: Mon, 29 Sep 2003 05:18:00 -0000 [thread overview]
Message-ID: <u8yo8i18s.fsf@elta.co.il> (raw)
In-Reply-To: <20030929024437.GD10687@white> (message from Bob Rossi on Sun, 28 Sep 2003 22:44:37 -0400)
> Date: Sun, 28 Sep 2003 22:44:37 -0400
> From: Bob Rossi <bob@brasko.net>
>
> Another quick question. I have been told that some of the debug formats
> support absolute paths and some do not.
True. COFF is one example of debug info format that stores only the
file name, without the leading directories.
However, even with more advanced debug formats, such as DWARF2, the
file name stored in the debug info might exclude the leading
directories, depending on how the source file was specified to the
compiler during compilation. E.g., try
gcc -c foo.c
vs
gcc -c /full/path/to/foo.c
and then use objdump to look at the file name recorded in foo.o's
debug info.
> Does this just mean that some
> of the debug formats will give you the absolute path, and with the
> others, this expensive lookup is necessary?
>
> I guess the question is, in both cases, can GDB find the absolute path
> to a source file, given only the relative path?
I'm not sure this problem is solvable at all, in all cases. If the
leading directories are not recorded in the debug info, the assumption
that the file is somewhere along the list of known source directories
might not always hold, as GDB has no way of setting the list of those
directories automatically.
prev parent reply other threads:[~2003-09-29 4:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-29 2:25 Bob Rossi
2003-09-29 2:31 ` Daniel Jacobowitz
2003-09-29 2:33 ` Bob Rossi
2003-09-29 2:44 ` Daniel Jacobowitz
2003-09-29 4:58 ` Bob Rossi
2003-09-29 5:18 ` Eli Zaretskii [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=u8yo8i18s.fsf@elta.co.il \
--to=eliz@elta.co.il \
--cc=bob@brasko.net \
--cc=gdb@sources.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