Line number zero in line table gives incorrect debugging experince with gdb
Simon Marchi
simark@simark.ca
Fri Aug 28 18:03:57 GMT 2020
On 2020-08-28 12:59 p.m., Tom Tromey wrote:
>>>>>> "Jaydeep" == Jaydeep Chauhan via Gdb <gdb@sourceware.org> writes:
>
> Jaydeep> We have a situation with GDB(latest trunk) and below testcase
> Jaydeep> referred for further discussion :
>
> I tried git master gdb today on the gdb.o you sent, and I see a
> different result. I can't run the program in question, but setting a
> breakpoint seemed to work:
>
> (gdb) b main
> Breakpoint 1 at 0x1c: file gdb.c, line 5.
>
> I somewhat expected this, because some fixes here have landed, in
> particular:
>
> commit 876518dd0a0b6fd6f4ad0a0b247db0d6a267db27
> Author: Tom de Vries <tdevries@suse.de>
> Date: Sat Jul 25 00:23:06 2020 +0200
>
> [gdb/symtab] Ignore zero line table entries
>
> Does your tree include this commit?
>
> If so, then I wonder why I see something different. If not, could you
> update to (at least) this revision and then try again? Maybe it's been
> fixed.
>
> Tom
>
Jaydeep,
As I replied in the bug you filed [1], I think this is a duplicate of 26243.
The plan was to commit Tom de Vries' patch (which Tom Tromey mentioned above), which brings back
the previous behavior. Then, once the GDB 10 branch is created, revert that and merge other patches
that handle the situation a bit better, such as:
https://sourceware.org/pipermail/gdb-patches/2020-July/170645.html
https://sourceware.org/pipermail/gdb-patches/2020-July/170751.html
Simon
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=26538
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=26243
More information about the Gdb
mailing list