From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15249 invoked by alias); 24 Jun 2003 14:47:06 -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 16490 invoked from network); 24 Jun 2003 13:39:33 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 24 Jun 2003 13:39:33 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Uo1y-0006Yw-00; Tue, 24 Jun 2003 08:40:18 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19Uo12-0008OM-00; Tue, 24 Jun 2003 09:39:20 -0400 Date: Tue, 24 Jun 2003 14:47:00 -0000 From: Daniel Jacobowitz To: Bernd Geiser Cc: gdb@sources.redhat.com Subject: Re: step into function fails Message-ID: <20030624133920.GA27720@nevyn.them.org> Mail-Followup-To: Bernd Geiser , gdb@sources.redhat.com References: <200306241005.09959.desasterman@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306241005.09959.desasterman@gmx.de> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00469.txt.bz2 On Tue, Jun 24, 2003 at 10:05:09AM +0200, Bernd Geiser wrote: > I experienced it is not possible to step into functions of an executable > with stabs-debug-info. Only "stepi" seems to help! A little research > showed that this test (in gdb/infrun.c) fails: > > /* If we have line number information for the function we > are thinking of stepping into, step into it. > > If there are several symtabs at that PC (e.g. with include > files), just want to know whether any of them have line > numbers. find_pc_line handles this. */ > { > struct symtab_and_line tmp_sal; > tmp_sal = find_pc_line (ecs->stop_func_start, 0); > ===> if (tmp_sal.line != 0) > { > step_into_function (ecs); > return; > } > } > > Consequently this one gets called: > > step_over_function (ecs); > > which is obviously wrong. > > I use gdb 5.3 and compiled the program with gcc 2.95.3 (both configured for a > MIPS-target, but also the ARM-target fails, when compiling with -gstabs). The > host is x86. This is a known bug in GCC 2.95.3. We added some code to GDB to try to work around it, and in some cases it works, but the debug info is just too messed up to get right reliably. Recommend not using that version :) 3.2 does not seem to suffer from this problem. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer