From: Daniel Jacobowitz <drow@false.org>
To: Douglas Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: example fix to pr 2360
Date: Mon, 17 Dec 2007 00:44:00 -0000 [thread overview]
Message-ID: <20071217000136.GA9212@caradoc.them.org> (raw)
In-Reply-To: <e394668d0711151555k79e50c43kc88336b3dd2a4db2@mail.gmail.com>
On Thu, Nov 15, 2007 at 03:55:41PM -0800, Douglas Evans wrote:
> To make things more concrete to what I was refering to in
> http://sourceware.org/ml/gdb/2007-11/msg00138.html I've filed pr 2360,
> and attached is an example fix.
>
> I'm not sufficiently happy with it that I'd submit it RFA, but that's
> mostly because of perceived objections to the use of xfullpath. Maybe
> the thing to do is write a canonicalizer like what is done in
> cli-cmds.c:cd_command (and presumably move it to a more generic
> place).
>
> Suggestions?
Why should we canonicalize paths at all? Definitely the use of
xfullpath is suspect on anything read from debug information. Those
are paths on some system where the program was compiled, not paths on
the system where GDB is running; there are a variety of commands like
"dir" and "set substitute-path" designed to map the one to the other,
and this goes behind their back to look at the filesystem.
The root of the problem seems to me to be inconsistent information in
the source file. Your debug information describes two files,
e.g. /tmp/bug2.c and //tmp/bug2.c (one via DW_AT_comp_dir, the other
via .debug_line). There's nothing like an inode in the DWARF, so GDB
has reasonably assumed that they are different files. Then you say
"bug2.c:2" and it happens to pick the one you didn't mean.
Are there any examples of this without #line?
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-12-17 0:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 23:55 Douglas Evans
2007-11-27 0:11 ` Douglas Evans
2007-12-17 0:44 ` Daniel Jacobowitz [this message]
2007-12-20 19:40 ` Doug Evans
2007-12-20 20:23 ` Daniel Jacobowitz
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=20071217000136.GA9212@caradoc.them.org \
--to=drow@false.org \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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