From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31381 invoked by alias); 29 Feb 2008 16:03:03 -0000 Received: (qmail 31373 invoked by uid 22791); 29 Feb 2008 16:03:02 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Feb 2008 16:02:40 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m1TG2aGc017268; Fri, 29 Feb 2008 11:02:36 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1TG2aMm013780; Fri, 29 Feb 2008 11:02:36 -0500 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1TG2ZVW006806; Fri, 29 Feb 2008 11:02:36 -0500 Message-ID: <47C82C87.4090600@redhat.com> Date: Fri, 29 Feb 2008 16:03:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Mark Wielaard CC: frysk@sourceware.org Subject: Re: [patch] Don't crash on stepping "bad frame" References: <1204298035.7826.37.camel@dijkstra.wildebeest.org> In-Reply-To: <1204298035.7826.37.camel@dijkstra.wildebeest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00087.txt.bz2 Mark, Interesting work-around; I'll add some comments to explain exactly where/when this senario occures. And where/when it doesn't. For instance a step-out through a sigalt stack, whith a bad unwind, will make the wrong decision. Andrew Mark Wielaard wrote: > Hi, > > While working on #5259 I noticed that the stepping engine crashes and > burns on x86_64 when a bad frame without unwind info is being stepped > into. This patch handles that case gracefully. And you can now safely > next through simple examples programs like funit-hello as we did in the > last demo - you can still drop into the wrong frame till #5259 is fixed > though. > > frysk-core/frysk/stepping/ChangeLog > 2008-02-29 Mark Wielaard > > * StepOverTestState.java (handleUpdate): Don't crash when there is > a bad outer frame. > > Committed, > > Mark > > --- a/frysk-core/frysk/stepping/StepOverTestState.java > +++ b/frysk-core/frysk/stepping/StepOverTestState.java > @@ -86,6 +86,16 @@ public class StepOverTestState extends State { > * it exits - success! > */ > Frame frame = newFrame.getOuter(); > + if (frame == null) > + { > + // But urgh... Where did our outer frame go... > + // We need to just try to keep stepping till we are > + // able to get a solid frame again. > + tse.getSteppingEngine().continueForStepping(this.task, > + true); > + return this; > + } > + > tse.getSteppingEngine().setBreakpoint(this.task, > frame.getAddress()); > return new StepOverState(this.task); > > >