From: Tom Tromey <tromey@redhat.com>
To: Jie Zhang <jie@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Fix a bug in source file searching
Date: Wed, 07 Apr 2010 20:53:00 -0000 [thread overview]
Message-ID: <m3zl1ft26s.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4BB2E6F7.4020401@codesourcery.com> (Jie Zhang's message of "Wed, 31 Mar 2010 14:08:55 +0800")
>>>>> "Jie" == Jie Zhang <jie@codesourcery.com> writes:
Tom> Maybe the documentation is just wrong or misleading here. I say that
Tom> because the special entry `$cdir' expands to the compilation directory,
Tom> and you can control where this appears pretty easily.
Jie> Maybe I misunderstood the document. I thought
Jie> comp_dir = /usr/src/foo-1.0
Jie> filename = lib/foo.c
Jie> should be same as
Jie> comp_dir =
Jie> filename = /usr/src/foo-1.0/lib/foo.c
Jie> Obviously GDB treats them differently although I don't know why.
FWIW, I don't really understand the rationale behind why the code works
the way it does.
Further down in the info node it seems clear that it is intentional that
$cdir work this way, though.
If DWARF intends those two cases to be the same, then perhaps the fix
ought to be in dwarf2read.c. I am not sure.
Jie> And I don't know why GCC adds those dir commands in its .gdbinit. I
Jie> will ask on GCC mailing list.
I think adding "dir $cdir" at the end of the list of dir commands would
also get the behavior you want.
Tom
next prev parent reply other threads:[~2010-04-07 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 3:22 Jie Zhang
2010-03-30 22:14 ` Tom Tromey
2010-03-31 6:09 ` Jie Zhang
2010-04-07 20:53 ` Tom Tromey [this message]
2010-04-08 0:49 ` Jie Zhang
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=m3zl1ft26s.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jie@codesourcery.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