This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Don't lose compilation directory in Dwarf2 line-tables


On 4/21/06, Frederic RISS <frederic.riss@st.com> wrote:
> > - 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?

No --- I hadn't noticed the loop in start_subfile.  That's great!

> > 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?

If it doesn't cause any regressions, it looks great to me!  Thanks very much!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]