From: Daniel Jacobowitz <drow@false.org>
To: Maxim Grigoriev <maxim@tensilica.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Handling corner case in building symbol table when "debug_line" includes compilation directory
Date: Tue, 10 Apr 2007 21:03:00 -0000 [thread overview]
Message-ID: <20070410210346.GD2056@caradoc.them.org> (raw)
In-Reply-To: <45F8CBDF.9090501@hq.tensilica.com>
On Wed, Mar 14, 2007 at 09:30:23PM -0700, Maxim Grigoriev wrote:
> I've attached the patch separately. Now, it should be fine. Sorry for
> inconvenience.
Actually, I apologize - looks like it was my mailer to blame...
> So the compilation directory is listed in the directory table. And, there is
> a reference from the file table pointing to this directory.
>
> Normally, we wouldn't see a compilation directory in a line table prologue.
Right. Now I understand.
This stuff is all quite fragile; we don't keep good track of what
dirname is which. I think I puzzled it out, but...
> + char *subfile_name;
> + if (IS_ABSOLUTE_PATH(name) && !IS_ABSOLUTE_PATH (subfile->name))
> + {
> + subfile_name = concat (dirname, SLASH_STRING,
> + subfile->name, (char *)NULL);
Isn't that the wrong DIRNAME? That's supposed to be a prefix to NAME,
but SUBFILE might be in a different directory. You need
subfile->dirname (if it's not NULL).
As for the patch, watch out for your formatting. Spaces around
parentheses and you don't need braces around a single statement.
Also, creating a cleanup in a function that doesn't call do_cleanups
is bad. It would be better to free it immediately when we're done
with it.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-04-10 21:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-15 1:55 Maxim Grigoriev
2007-03-15 2:27 ` Daniel Jacobowitz
2007-03-15 4:30 ` Maxim Grigoriev
2007-04-10 21:03 ` Daniel Jacobowitz [this message]
2007-04-10 23:34 ` Maxim Grigoriev
2007-04-11 2:06 ` Maxim Grigoriev
2007-05-14 14:11 ` Daniel Jacobowitz
2007-05-14 19:01 ` Maxim Grigoriev
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=20070410210346.GD2056@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=maxim@tensilica.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