From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24138 invoked by alias); 16 Nov 2007 13:22:15 -0000 Received: (qmail 24128 invoked by uid 22791); 16 Nov 2007 13:22:15 -0000 X-Spam-Check-By: sourceware.org Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 13:22:09 +0000 Received: from [10.10.64.154] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.1)); Fri, 16 Nov 2007 05:21:59 -0800 X-Server-Uuid: 6B5CFB92-F616-4477-B110-55F967A57302 Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id ABDE42DD; Fri, 16 Nov 2007 05:14:57 -0800 (PST) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id 980F82EB for ; Fri, 16 Nov 2007 05:14:57 -0800 (PST) Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.10.64.146]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id FYN87947; Fri, 16 Nov 2007 05:14:57 -0800 (PST) Received: from NT-IRVA-0752.brcm.ad.broadcom.com ( nt-irva-0752.brcm.ad.broadcom.com [10.8.194.67]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id 1F10869CA3 for ; Fri, 16 Nov 2007 05:14:57 -0800 (PST) Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: Debugging with multiple sections in assembly files. Date: Fri, 16 Nov 2007 13:22:00 -0000 Message-ID: From: "Robert Norton" To: gdb@sourceware.org X-WSS-ID: 6B2346FD1S41868896-01-01 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C82852.AEAD86BA" 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/msg00162.txt.bz2 This is a multi-part message in MIME format. ------_=_NextPart_001_01C82852.AEAD86BA Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-length: 1127 Hi, The attached tar contains source and a Makefile for two test programs. One program includes an assembly file with two functions in the default .text section, and the other contains a file with one function in .text and another in a section 'foo'. With the first program gdb is able to find the source for the assembly functions, for the other it is not: (gdb) info line bar Line 3 of "test_nosections.S" starts at address 0x400490 and ends at 0x400491 . --- (gdb) info line bar No line number information available for address 0x400490 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'). Is this a known issue? Can it be fixed easily? I tested with fairly recent gdb and gcc, but not latest HEAD versions. Thanks, Robert ------_=_NextPart_001_01C82852.AEAD86BA Content-Type: application/x-gzip; name=asm_gdb.tar.gz Content-Transfer-Encoding: base64 Content-Description: asm_gdb.tar.gz Content-Disposition: attachment; filename=asm_gdb.tar.gz Content-length: 838 H4sIAEiVPUcAA+2X/WvaQBjH/dX7Kx5EoZMZLi8q2DrWpbYUKpXast9WYrxI WMyNS9INrP/7nrxpLWwORlI2ns8Pyb187+55znxzcep8FZ4fiEaFcJ3zgWXh 3eD9odngKYaV35HhwGjofKgPTd0wuJnqdMtoAK8yqJIkih0F0FChVLEMf6MT KqojoHqxL2/Or+bj3orZ9njluuzq4tN4tVww+3Y6u76ZjNsb294CXjPhFnoS 2h+h/YXdT+b3j6m6vcErSs7gDHCk5ofwDLEQqGMXn8/vLi8eprPx8rujvGWy /gY9hzFtdjexr28f5iNURvFjGAk39mUYFVVZ1hlzgqAQ4eQvejSZxPv2g9Zs LW3pex5jmaJTzOBqbl7oaHPWxKTyJLeFLJ2ok85QyDtFPqm0TLfUdrRslVKZ SnbJZpvxIc2f7UMplLtAs57X6eatrJkOgF6C+5zNA8+4oyoRjLmBcMIRa6o1 9IrR3cO9w5C7u73pFsu82JHD3z9PsNpn7Jj/8QVQ+J8PBv0+6vQBJ//XQiTw QVGOK3quXK+dcBmBDJkfehIimShXRHkl8EMBC0cddr119MTfUr4Wq1zjuP/1 0v+mZejZ+W+Q/2vhSfpL8KQ8SQvvThn6O4a144d5A2wYpLY/wS4AJeJEhaCf si1Z///g9ffHvII1jvof+wr/D3nfQJ3F+5z8XwfaKpALJ8iOdoaXURNNjiU8 71ejJmSVt46RqI7D/yRVuP9Pzn9z73+Lo87s63T+18Iv/K8VjwS08Nug9R5a zo8Wa9JrgSAIgiAIgiAIgiAIgiAI4p/hJwci4fcAKAAA ------_=_NextPart_001_01C82852.AEAD86BA--