From: Tom Tromey <tromey@redhat.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Patch: search `directory' path for `break' files
Date: Mon, 01 Oct 2001 13:52:00 -0000 [thread overview]
Message-ID: <878zev138s.fsf@creche.redhat.com> (raw)
In-Reply-To: <4634-Sat29Sep2001114241+0300-eliz@is.elta.co.il>
>>>>> "Eli" == Eli Zaretskii <eliz@is.elta.co.il> writes:
>> With this patch, if the file name argument to lookup_symtab is a full
>> path, we run it through realpath. Then we search for each symtab's
>> file using the `dir' list. If we find a match, we use it.
Eli> IIRC, last time this was discussed, Per Bothner suggested to use the
Eli> current directory recorded in the debug info to convert a relative or
Eli> semi-relative file name into an absolute one.
Thanks for reminding me of this. I had misunderstood Per's messages.
After seeing your message I went back and did some more investigation.
I think my patch is still a reasonable approach.
With my patch, we actually do use the directory information, when
available. This info is stored in symtab->dirname, and is used when
trying to find the real path for a symtab. This happens indirectly
via symtab_to_filename() (for symtabs).
So if that information is available, we use it. But if it isn't, we
search the user's `directory' path. This seems like a reasonable
approach to me. Also, psymtabs don't have this directory information,
so in that case we can't use this approach. We must do the path
searching. Perhaps this is fixable; I don't know enough about
psymtabs to say.
Eli> I think this needs to be tested with as many debug infor formats
Eli> as possible. What format did you use? DWARF2?
I used stabs. That is the default for the compiler and system I am
using. I will try DWARF2. Is it easy to run the test suite with
`-gdwarf2' (or whatever)?
Tom
next prev parent reply other threads:[~2001-10-01 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-28 16:45 Tom Tromey
2001-09-29 2:45 ` Eli Zaretskii
2001-10-01 13:52 ` Tom Tromey [this message]
2001-10-01 15:35 ` Michael Snyder
2001-10-02 1:01 ` Eli Zaretskii
2001-10-11 12:50 ` Elena Zannoni
2001-10-11 20:46 ` Tom Tromey
2001-10-14 14:43 ` Elena Zannoni
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=878zev138s.fsf@creche.redhat.com \
--to=tromey@redhat.com \
--cc=eliz@is.elta.co.il \
--cc=gdb-patches@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