From: "Doug Evans" <dje@google.com>
To: "Aleksandar Ristovski" <ARistovski@qnx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies
Date: Tue, 08 Jan 2008 17:33:00 -0000 [thread overview]
Message-ID: <e394668d0801080932y6fd44476nfa88b5454acfda29@mail.gmail.com> (raw)
In-Reply-To: <2F6320727174C448A52CEB63D85D11F40A5E@nova.ott.qnx.com>
On Jan 8, 2008 8:09 AM, Aleksandar Ristovski <ARistovski@qnx.com> wrote:
> About normalize_path: I am really missing how would symlink spoil anything.
As a data point, here is an example that doesn't use #line, uses
present day gcc, and would cause bad behaviour in gdb if
normalize_path was indescriminately used. To what extent the example
is contrived and wouldn't occur in practice I don't know.
[The use of an obj directory here isn't important, it's just a turd
from various experiments.]
rm -rf /tmp/foo
mkdir -p /tmp/foo
cd /tmp/foo
mkdir -p a/b
ln -s a/b t
mkdir obj
cat >a/foo.c <<EOF
int x;
EOF
cat >a/b/foo.c <<EOF
#include "../foo.c"
int foo(){return x;}
EOF
cat >foo.c <<EOF
#include "t/foo.c"
int main (){return foo();}
EOF
cat foo.c
(cd obj && gcc -g /tmp/foo/foo.c -o ../foo.x)
readelf -w foo.x >foo.w
From foo.w:
DW_AT_name : /tmp/foo/foo.c
The Directory Table:
/tmp/foo/t
/tmp/foo
/tmp/foo/t/..
The File Name Table:
Entry Dir Time Size Name
1 1 0 0 foo.c
2 2 0 0 foo.c
3 3 0 0 foo.c
next prev parent reply other threads:[~2008-01-08 17:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 16:10 Aleksandar Ristovski
2008-01-08 16:19 ` Daniel Jacobowitz
2008-01-08 17:33 ` Doug Evans [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-09 14:55 Aleksandar Ristovski
2008-04-09 20:52 ` Doug Evans
2008-04-08 16:37 Aleksandar Ristovski
2008-01-08 21:51 Aleksandar Ristovski
2008-01-08 21:57 ` Daniel Jacobowitz
2008-01-08 21:26 Aleksandar Ristovski
2008-01-08 21:24 Aleksandar Ristovski
2008-01-08 21:32 ` Daniel Jacobowitz
2008-01-08 20:28 Aleksandar Ristovski
2008-01-08 20:33 ` Daniel Jacobowitz
2008-01-08 16:34 Aleksandar Ristovski
2008-01-08 16:46 ` Daniel Jacobowitz
2008-01-06 6:44 Aleksandar Ristovski
2008-01-06 18:44 ` Doug Evans
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=e394668d0801080932y6fd44476nfa88b5454acfda29@mail.gmail.com \
--to=dje@google.com \
--cc=ARistovski@qnx.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