From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 995 invoked by alias); 16 Nov 2007 15:33:46 -0000 Received: (qmail 984 invoked by uid 22791); 16 Nov 2007 15:33:45 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 15:33:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 47A579835E; Fri, 16 Nov 2007 15:33:40 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 225389824E; Fri, 16 Nov 2007 15:33:40 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1It3CM-00026G-Rz; Fri, 16 Nov 2007 10:33:38 -0500 Date: Fri, 16 Nov 2007 15:33:00 -0000 From: Daniel Jacobowitz To: Robert Norton Cc: gdb@sourceware.org Subject: Re: Debugging with multiple sections in assembly files. Message-ID: <20071116153338.GA8036@caradoc.them.org> Mail-Followup-To: Robert Norton , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00164.txt.bz2 On Fri, Nov 16, 2007 at 05:14:54AM -0800, Robert Norton wrote: > The problem appears to be that in the case of the multi section asm file > gcc doesn't emit DW_AT_low_pc and DW_AT_high_pc for the assembly file > compile unit (try 'make dwarf.diff') because they don't make much sense > in that case. This means that gdb doesn't load the dwarf symbols for > that file and hence can't find source line information (as shown by > running 'info sources' before and after 'info line bar' -- try 'make > all'). s/gcc/gas/. gas needs to generate DW_AT_ranges, I would imagine. This looks to me like: 2006-08-08 Sterling Augustine * dwarf2dbg.c (out_debug_info): Add new parameter ranges_seg and emit DW_AT_ranges when code in compilation unit is not contiguous. (out_debug_abbrev): Emit DW_AT_ranges abbreviation if code in is not contiguous. (dwarf2_finish): Create and pass ranges_seg to out_debug_info. (out_debug_ranges): New function to emit .debug_ranges section when code is not contiguous. Is that patch in your assembler? If not, can you try a newer one? -- Daniel Jacobowitz CodeSourcery