From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7434 invoked by alias); 4 May 2006 01:23:02 -0000 Received: (qmail 7424 invoked by uid 22791); 4 May 2006 01:23:01 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 May 2006 01:22:59 +0000 Received: from localhost ([127.0.0.1] ident=amavis) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1FbSYU-0006pX-09; Wed, 03 May 2006 18:22:58 -0700 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26015-02; Wed, 3 May 2006 18:22:57 -0700 (PDT) Received: from nose.hq.tensilica.com ([192.168.10.147]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1FbSYT-0006pR-K6; Wed, 03 May 2006 18:22:57 -0700 Message-ID: <44595771.1070907@tensilica.com> Date: Thu, 04 May 2006 01:23:00 -0000 From: Ross Morley User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2 MIME-Version: 1.0 To: GDB List Subject: Source info in discontiguous hand asm files Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00015.txt.bz2 Hello, gdb 6.1, as 2.15.92.0.2, gcc 3.4.2 per FC3 distro. GDB fails to display source file and line info for functions in two different sections in a hand-assembly source file. A simple test-case that demonstrates the problem follows: > cat test.S .text .globl foo foo: nop .globl main #ifdef DIFFERENT_TEXT_SECTION .section .text.with.another.name,"ax",@progbits #endif main: nop > gcc test.S -Wa,--gdwarf2 > gdb a.out ... (gdb) b main Breakpoint 1 at 0x804834f: file test.S, line 13. (gdb) b foo Breakpoint 2 at 0x8048347: file test.S, line 5. (gdb) quit > gcc test.S -Wa,--gdwarf2 -DDIFFERENT_TEXT_SECTION > gdb a.out ... (gdb) b main Breakpoint 1 at 0x804834f (gdb) b foo Breakpoint 2 at 0x8048347 (gdb) The DWARF .debug_aranges section seems to have enough information to deal with this, but GDB doesn't use it. We'd like to find a fix for this. Any enlightenment is appreciated. Regards, Ross Morley Tensilica, Inc.