From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5056 invoked by alias); 21 Jun 2004 18:15:18 -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 4867 invoked from network); 21 Jun 2004 18:15:15 -0000 Received: from unknown (HELO mail.xor.ch) (212.55.210.163) by sourceware.org with SMTP; 21 Jun 2004 18:15:15 -0000 Received: from orpatec.ch (217.162.130.125) by mail.xor.ch with MERCUR Mailserver (v4.02.30 NjYtMjMxMS00NjIy) for ; Mon, 21 Jun 2004 20:19:07 +0200 Message-ID: <40D725AF.FC2AAF3A@orpatec.ch> Date: Mon, 21 Jun 2004 18:15:00 -0000 From: Otto Wyss Reply-To: otto.wyss@orpatec.ch MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb@sources.redhat.com Subject: Re: GDB doesn't show the correct line References: <40D5E480.4A68163@orpatec.ch> <20040620202929.GA17216@nevyn.them.org> <40D7212F.E68A9D61@orpatec.ch> <20040621175928.GA13407@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00212.txt.bz2 Daniel Jacobowitz wrote: > > > 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. > Not a very nice prospect, I guess I won't be able to detect anything useful within resonable time :-( > It sounds like it is more likely to be a problem with GCC's output than > GDB's parsing. > I just inserted a syntax error in my source, at least GCC reports the correct line number. Can't this line number problem somehow detected within GDB? Sorry if I ask this as someone without knowing any internals but IMO this would be the best solution. My app is now working so I'm not in a hurry but a good debugger is _essential_ for any development. O. Wyss -- See a huge pile of work at "http://wyodesktop.sourceforge.net/"