This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH/RFC handle missing DW_AT_comp_dir attribute
- From: Jim Blandy <jimb at redhat dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: binutils at sources dot redhat dot com, irickards at arm dot com,gdb-patches at sources dot redhat dot com
- Date: 17 Jul 2002 17:25:10 -0500
- Subject: Re: PATCH/RFC handle missing DW_AT_comp_dir attribute
- References: <200207171047.LAA03162@cam-mail2.cambridge.arm.com>
Richard Earnshaw <rearnsha@arm.com> writes:
> This problem was found by a colleague while using GDB with the ADS tools.
>
> These tools do not set the DW_AT_comp_dir attribute in a compilation unit
> entry, so GDB will crash trying to reference a NULL pointer.
>
> Regardless of whether ADS is correct not to generate this directive (the
> Dwarf spec appears not to require it to), GDB should not be falling over
> in this way. The following patch fixes the problem:
>
> <date> Ian Rickards <irickard@arm.com>
>
> * dwarf2.c (concat_filename): If we can't establish the directory
> just return the filename.
Sorry --- how does this patch fix a GDB crash? GDB doesn't use BFD to
read debugging information.