[RFC] Don't lose compilation directory in Dwarf2 line-tables
Frederic RISS
frederic.riss@st.com
Fri Apr 21 08:35:00 GMT 2006
On Thu, 2006-04-20 at 18:09 -0700, Jim Blandy wrote:
> So, Frederic, your last patch doesn't introduce any new problems that
> I can see, and it does solve the problem you set out to solve
> originally (losing comp_dir), but if you're willing go around one more
> time, we can try to add the info consistently:
OK, here we go.
> - Leave the comparison loop alone, as in your last patch.
> - If dwarf2_start_subfile does have to start a subfile itself, always
> pass comp_dir as start_subfile's second argument, whether it's NULL or
> not (because this is what we do when calling start_symtab), and
> concatenate dirname, if it's non-null, with filename to get
> start_subfile's first argument. I think this means that 'fullname'
> always gets used, so you can hoist that computation and its xfree out
> of the 'if'.
But then, the loop in dwarf2_start_subfile doesn't serve any purpose,
because the loop at the beginning of start_subfile proper will do the
same work. Or maybe I'm missing something?
> Either way, this definitely needs a comment. If you'd like to write
> up one yourself, great; if not, that's fine; I'll put one in after
> your patch goes in.
Attached is a new patch that adds comments and removes the superfluous
loop. How's that?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf2-keep-compdir.patch
Type: text/x-patch
Size: 4620 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060421/3c3143a2/attachment.bin>
More information about the Gdb-patches
mailing list