From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18469 invoked by alias); 30 Dec 2006 21:31:43 -0000 Received: (qmail 18460 invoked by uid 22791); 30 Dec 2006 21:31:43 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 30 Dec 2006 21:31:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H0lng-000786-Dn; Sat, 30 Dec 2006 16:31:32 -0500 Date: Sat, 30 Dec 2006 21:31:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: pedro_alves@portugalmail.pt, gdb-patches@sourceware.org Subject: Re: [PATCH] i386_skip_prologue. Message-ID: <20061230213132.GA27379@nevyn.them.org> Mail-Followup-To: Mark Kettenis , pedro_alves@portugalmail.pt, gdb-patches@sourceware.org References: <455EE79E.6000109@portugalmail.pt> <455EF845.40902@portugalmail.pt> <455F2754.5060703@portugalmail.pt> <20061118163738.GA14800@nevyn.them.org> <457B1D40.7060302@portugalmail.pt> <20061230204826.GD25539@nevyn.them.org> <200612302120.kBULKqOJ031833@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200612302120.kBULKqOJ031833@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00376.txt.bz2 On Sat, Dec 30, 2006 at 10:20:52PM +0100, Mark Kettenis wrote: > I'm sorry. I tend to suffer from packet loss at my side. No problem - that's what I'm here for :-) > > Is there a general philosophy we could adopt that would apply to most > > or all targets? > > > > Here's a proposal to get us started: when skipping the prologue to > > place a breakpoint or finish single stepping (skip_prologue), try to > > skip to the end of the first sal. But some targets may optionally run > > their prologue analyzer and make sure it doesn't see anything it > > objects to - like jumps. That would mean the i386 prologue analyzer > > would need to know about this new call to __main. When scanning the > > prologue to build frame unwind information, ignore sals entirely. > > Scan until we hit the saved PC or until we believe we understand > > the entire frame. > > The last time I tried using sals on i386, I simply encountered too > many cases where the line number information couldn't be trusted and > putting a breakpoint on a function that was defenitely called never > hit. Yeah. That's definitely the biggest risk. I think the first step, for Pedro's specific problem, should be to recognize the call to __main as special and skippable. We can play with sals later. -- Daniel Jacobowitz CodeSourcery