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] Do not make up line information


Daniel Jacobowitz <drow@false.org> writes:
> We'll never return a line number for function "foo", because with modern
> debug info we'll have an end marker for that part of the line table,
> represented as an entry for line 0.  But if the code for foo_init has
> inlined code from any header file that foo doesn't have, we'll have another
> symtab sharing the same blockvector whose lowest PC value is after "bar".
> We'll select that as the "best match", since it's the closest thing
> following bar.  We'll subtract one from the line number (probably putting us
> on the start of an inline function definition) and report that as the
> line for bar.

Wow --- that's weird code.  Where did that alt->line - 1 come from?

If we can't find the original motivation, the change looks like an
obvious improvement to me.


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