From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30041 invoked by alias); 17 Jul 2002 22:25:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30027 invoked from network); 17 Jul 2002 22:25:12 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 17 Jul 2002 22:25:12 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 086AC5EA11; Wed, 17 Jul 2002 17:25:10 -0500 (EST) To: Richard.Earnshaw@arm.com Cc: binutils@sources.redhat.com, irickards@arm.com, gdb-patches@sources.redhat.com Subject: Re: PATCH/RFC handle missing DW_AT_comp_dir attribute References: <200207171047.LAA03162@cam-mail2.cambridge.arm.com> From: Jim Blandy Date: Wed, 17 Jul 2002 15:41:00 -0000 In-Reply-To: <200207171047.LAA03162@cam-mail2.cambridge.arm.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-07/txt/msg00375.txt.bz2 Richard Earnshaw 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: > > Ian Rickards > > * 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.