This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Do not make up line information
- From: Jim Blandy <jimb at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 22 Nov 2006 11:54:13 -0800
- Subject: Re: [rfc] Do not make up line information
- References: <20061122154249.GA3884@nevyn.them.org>
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.