This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp
- From: Daniel Jacobowitz <drow at false dot org>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sources dot redhat dot com
- Date: Fri, 17 Apr 2009 13:30:31 -0400
- Subject: Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp
- References: <49CCDB3D.email@example.com> <20090327184726.GW9472@adacore.com> <49D083FB.firstname.lastname@example.org> <20090330170216.GB9472@adacore.com> <49D21E7E.email@example.com> <20090401183240.GD8766@adacore.com> <49D47C75.firstname.lastname@example.org> <49E8B701.email@example.com>
On Fri, Apr 17, 2009 at 07:06:09PM +0200, Christophe LYON wrote:
> However, from GDB, using "maintenance print symbols", I noticed that
> quite a few lines have become "0" instead of meaningful values. In turn,
> I thinks this makes skip_prologue do something wrong.
> What I dont' understand currently is where those "0" line entries come
> from? Is there any verbose flag or maintenance command I could use to
> understand how the Dwarf debug_line info is parsed?
Not really, but it's pretty straightforward to step through.
GDB uses line 0 internally to represent a lack of line number
information. This is required because the line table uses
half-ranges; a line number and a start address. We get a line
0 at file switch events or at DW_LNS_end_of_sequence. There's
some hairy bits to make sure the 0 appears 'before' any other line
marker at the same address.