From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20224 invoked by alias); 14 Jul 2005 08:54:53 -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 20199 invoked by uid 22791); 14 Jul 2005 08:54:48 -0000 Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 14 Jul 2005 08:54:48 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1DszUU-00013O-5U for gdb@sources.redhat.com; Thu, 14 Jul 2005 12:54:46 +0400 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1DszUQ-00012P-MN; Thu, 14 Jul 2005 12:54:42 +0400 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: problem debugging assembler functions Date: Thu, 14 Jul 2005 08:54:00 -0000 User-Agent: KMail/1.7.2 Cc: gdb@sources.redhat.com References: <200506141919.22749.ghost@cs.msu.su> <20050614152726.GA5039@nevyn.them.org> In-Reply-To: <20050614152726.GA5039@nevyn.them.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Shi1C5q1s1iy6F/" Message-Id: <200507141254.42149.ghost@cs.msu.su> X-SW-Source: 2005-07/txt/msg00166.txt.bz2 --Boundary-00=_Shi1C5q1s1iy6F/ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 537 On Tuesday 14 June 2005 19:27, Daniel Jacobowitz wrote: > > So, moving 'find_pc_line' above will reasult in extra lookup only if > > - the command is stepi/nexti, or > > - the first condition evaluates to true (which means we've entered > > undebuggable code) > > > > I have no idea is that's bad or not performance-wise, just clarifying > > what's going on. > > Hmm, that's encouraging! This might be a good improvement, then. So, is this change going in? I attach the patch I'm using locally for your reference. Thanks, Volodya --Boundary-00=_Shi1C5q1s1iy6F/ Content-Type: text/x-diff; charset="iso-8859-1"; name="debug_assembler_functions.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="debug_assembler_functions.diff" Content-length: 933 Index: gdb/infrun.c =================================================================== --- gdb/infrun.c (revision 1678) +++ gdb/infrun.c (revision 1679) @@ -2420,11 +2420,12 @@ } } + ecs->sal = find_pc_line (stop_pc, 0); /* NOTE: tausq/2004-05-24: This if block used to be done before all the trampoline processing logic, however, there are some trampolines that have no names, so we should do trampoline handling first. */ if (step_over_calls == STEP_OVER_UNDEBUGGABLE - && ecs->stop_func_name == NULL) + && ecs->sal.line == 0) { /* The inferior just stepped into, or returned to, an undebuggable function (where there is no symbol, not even a @@ -2461,9 +2462,7 @@ stop_stepping (ecs); return; } - - ecs->sal = find_pc_line (stop_pc, 0); - + if (ecs->sal.line == 0) { /* We have no line number information. That means to stop --Boundary-00=_Shi1C5q1s1iy6F/--