From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 979 invoked by alias); 29 Feb 2008 15:14:30 -0000 Received: (qmail 969 invoked by uid 22791); 29 Feb 2008 15:14:29 -0000 X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Feb 2008 15:14:01 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1JV6vs-0002ch-5P for frysk@sourceware.org; Fri, 29 Feb 2008 16:13:56 +0100 Subject: [patch] Don't crash on stepping "bad frame" From: Mark Wielaard To: frysk@sourceware.org Content-Type: text/plain Date: Fri, 29 Feb 2008 15:14:00 -0000 Message-Id: <1204298035.7826.37.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-1.fc8) Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) 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/msg00086.txt.bz2 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);