From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24902 invoked by alias); 21 Jun 2004 17:59:32 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 24895 invoked from network); 21 Jun 2004 17:59:31 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Jun 2004 17:59:31 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BcT4q-0003Vn-NH; Mon, 21 Jun 2004 13:59:28 -0400 Date: Mon, 21 Jun 2004 17:59:00 -0000 From: Daniel Jacobowitz To: Otto Wyss Cc: gdb@sources.redhat.com Subject: Re: GDB doesn't show the correct line Message-ID: <20040621175928.GA13407@nevyn.them.org> Mail-Followup-To: Otto Wyss , gdb@sources.redhat.com References: <40D5E480.4A68163@orpatec.ch> <20040620202929.GA17216@nevyn.them.org> <40D7212F.E68A9D61@orpatec.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40D7212F.E68A9D61@orpatec.ch> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00211.txt.bz2 On Mon, Jun 21, 2004 at 07:55:59PM +0200, Otto Wyss wrote: > Daniel Jacobowitz wrote: > > > > On Sun, Jun 20, 2004 at 09:24:48PM +0200, Otto Wyss wrote: > > > Since a few days GDB (6.1-debian) offsets the shown line by about 3 > > > lines. when I set a breakpoint at a function name of a class (C++) it > > > stops and shows the line 3 more down. When I now step through (next) > > > > Not a known problem - test case? > > > My full source is here > "http://cvs.sourceforge.net/viewcvs.py/wyodesktop/wyoDesktop/loginapp/src/app.cpp?view=markup" > but it's probably not usable as a test case. The 3 line offset is from > the first function call "App::OnInit". > > > Usually this means you've confused GDB about what version of a source > > file it should be opening. > > > It's definitely not my source since I've built my app and all the > wxWidgets library again. Also I just tried another of my apps (with lots > of wxWidgets functions) and this behaves correctly. Well that means GDB > works correct except in one case. > > I can only speculate that it's because of one of the standard headers > which are unique to this program. But they are from an ordinary > Debian/sarge system. How can I detect further where the offset is introduced? The only things that I can recommend: - Look at the preprocessor output (gcc -E). See if there are missing #line directives (usually just "# " in preprocessor output). The syntax of these things is really hard to read. - Look at the debug info with readelf -wl and compare it to the object code. It sounds like it is more likely to be a problem with GCC's output than GDB's parsing. -- Daniel Jacobowitz