From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 892 invoked by alias); 27 Jan 2008 16:17:45 -0000 Received: (qmail 884 invoked by uid 22791); 27 Jan 2008 16:17:45 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 27 Jan 2008 16:17:27 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m0RG3Qrn023825; Sun, 27 Jan 2008 17:03:26 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m0RG3PJ1010994; Sun, 27 Jan 2008 17:03:25 +0100 (CET) Date: Sun, 27 Jan 2008 16:17:00 -0000 Message-Id: <200801271603.m0RG3PJ1010994@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: cseo@linux.vnet.ibm.com, jimb@codesourcery.com, gdb@sourceware.org In-reply-to: <20080127153802.GA3449@caradoc.them.org> (message from Daniel Jacobowitz on Sun, 27 Jan 2008 10:38:02 -0500) Subject: Re: expand-symtabs.exp References: <200801271528.m0RFSMo6032355@brahms.sibelius.xs4all.nl> <20080127153802.GA3449@caradoc.them.org> 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: 2008-01/txt/msg00278.txt.bz2 > Date: Sun, 27 Jan 2008 10:38:02 -0500 > From: Daniel Jacobowitz > > On Sun, Jan 27, 2008 at 04:28:22PM +0100, Mark Kettenis wrote: > > The new expand-psymtabs.exp consistently fails on all systems I try it > > on with something like: > > > > > > (gdb) break 32 > > No line 32 in file "../../../../src/gdb/gdb/testsuite/gdb.base/expand-psymtabs.c". > > (gdb) FAIL: gdb.base/expand-psymtabs.exp: Expand psymtabs > > > > > > Looking at the source code for this test, GDB's respnse here is quite > > reasonable, since line 32 is the line withe the comment /* Break here > > */ in the code fragment below: > > GDB's historical behavior in that case is to set a breakpoint on the > next line, and there ought to be code for the next line (the > epilogue). It looks like you're hitting the bug the testcase was > written for. Does break 32 work with -readnow? Nope. And there is no line number info for the epilogue. As far as I know, GCC never generated such info, so it must be something that's new in GCC 4. (gdb) disas foo Dump of assembler code for function foo: 0x00000000004007e0 : push %rbp 0x00000000004007e1 : mov %rsp,%rbp 0x00000000004007e4 : leaveq 0x00000000004007e5 : retq End of assembler dump. ... $ readelf -wl expand-symtabs ... Line Number Statements: Extended opcode 2: set Address to 0x4007e0 Advance Line by 30 to 31 Copy Special opcode 61: advance Address by 4 to 0x4007e4 and Line by 0 to 31 Advance PC by 2 to 4007e6 Extended opcode 1: End of Sequence