dwarf2read.c:read_partial_die question

Bob Rossi bob@brasko.net
Wed Jun 9 17:58:00 GMT 2004

On Wed, Jun 09, 2004 at 01:04:29PM -0400, Daniel Jacobowitz wrote:
> On Wed, Jun 09, 2004 at 12:05:26PM -0400, Bob Rossi wrote:
> > > > This is the comment in the testcase (twice.exp) that is producing this
> > > > behavior
> > > >        # Test that GDB can still detect whether we have line numbers
> > > >        # even if we're executing code in an include file.
> > > 
> > > Check what GCC is emiting (readelf -wi); do you have a compilation unit
> > > missing these attributes, or have we lost track of them somehow?
> > 
> > Whoa, readelf is a great command! I was trying to read the assembly file
> > when I wrote the patch :) Since I don't know what part of this file to
> > send in, the whole thing is below.
> > 
> > Basically, I just run the twice.exp testcase, and then I ran GDB on
> > twice-tmp. Here's the output. It looks as if the compiler is not
> > outputting the DW_AT_comp_dir directive for this file. Is this a bug in
> > GCC?
> I don't think so.  There's an absolute path so DW_AT_comp_dir would not
> add any information.  Is there some reason we can't cope with this?

OK, I understand. No I don't think that there has to be a
DW_AT_comp_dir for this file. The -file-list-exec-source-files patch I
have was causing GDB to segfault because I assummed that the data would
always be there. I fixed the segfault so all should be good. I just
wanted to make sure I wasn't covering something up that was broken at a
deeper level.

Bob Rossi

More information about the Gdb mailing list