[rfc] Do not make up line information

Jim Blandy jimb@codesourcery.com
Wed Nov 22 19:53:00 GMT 2006


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.



More information about the Gdb-patches mailing list