From: "Jim Blandy" <jimb@red-bean.com>
To: "Frederic RISS" <frederic.riss@st.com>
Cc: "GDB Patches" <gdb-patches@sourceware.org>
Subject: Re: [RFC] Don't loose compilation directory in Dwarf2 line-tables
Date: Thu, 13 Apr 2006 17:49:00 -0000 [thread overview]
Message-ID: <8f2776cb0604131049i69e9b20fv78e60c023f245e56@mail.gmail.com> (raw)
In-Reply-To: <1144927446.14807.561.camel@crx549.cro.st.com>
Hi, Frederic. Thanks for the patch! I think you're right about how
GDB should interpret DW_AT_comp_dir and directories in the line number
information. Some comments:
You should generally include a ChangeLog entry along with the patch;
you'll have to write it anyway, and it helps reviewers get oriented
for what they're going to see in the patch itself.
Ideally, the use of SLASH_STRING would be a separate patch, but that's
not a big deal.
When you add a new argument to dwarf2_start_subfile, you need to
adjust the comments above the file that describe what the arguments
mean.
The patch changes the logic of dwarf2_start_subfile in a circuitous
way. If dirname and comp_dir are absolute and different, and filename
is relative, then you end up passing start_subfile two absolute paths.
I'd rather see the code changed like this:
- Since dwarf2_start_subfile now knows about comp_dir, there's no need
to use comp_dir as a default in dwarf_decode_lines. Just pass NULL
for dirname when the dir_index is zero.
- Then, at the top of dwarf2_start_subfile, check if dirname is
relative, and if comp_dir is available, prepend comp_dir to it. At
this point, we know dirname is as absolute as it can be. Then proceed
as in the original unpatched code. (Watch out for allocation issues.)
Also, in the comments, "loose" is the opposite of "tight"; you mean "lose".
next prev parent reply other threads:[~2006-04-13 17:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-13 11:25 Frederic RISS
2006-04-13 17:49 ` Jim Blandy [this message]
2006-04-14 7:32 ` [RFC] Don't lose " Frederic RISS
2006-04-14 7:41 ` Jim Blandy
2006-04-14 8:23 ` Frederic RISS
2006-04-14 14:04 ` Daniel Jacobowitz
2006-04-14 14:51 ` Frederic RISS
2006-04-18 12:32 ` Frederic RISS
2006-04-18 13:04 ` Daniel Jacobowitz
2006-04-18 14:00 ` Frederic RISS
2006-04-20 16:27 ` Daniel Jacobowitz
2006-04-21 7:14 ` Frederic RISS
2006-04-21 1:10 ` Jim Blandy
2006-04-21 8:35 ` Frederic RISS
2006-04-21 16:46 ` Jim Blandy
2006-04-21 17:00 ` Frederic RISS
2006-04-24 12:49 ` Andrew STUBBS
2006-04-14 8:44 ` Eli Zaretskii
2006-04-14 11:44 ` Frederic RISS
2006-04-14 13:08 ` Eli Zaretskii
2006-04-14 13:42 ` Frederic RISS
2006-04-14 14:21 ` Eli Zaretskii
2006-04-14 14:58 ` Daniel Jacobowitz
2006-04-14 15:03 ` Eli Zaretskii
2006-04-14 18:39 ` Frédéric Riss
2006-04-13 19:58 ` [RFC] Don't loose " Jason Molenda
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=8f2776cb0604131049i69e9b20fv78e60c023f245e56@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=frederic.riss@st.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