public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: frysk@sourceware.org
Subject: Re: [patch] Don't crash on stepping "bad frame"
Date: Fri, 29 Feb 2008 16:03:00 -0000	[thread overview]
Message-ID: <47C82C87.4090600@redhat.com> (raw)
In-Reply-To: <1204298035.7826.37.camel@dijkstra.wildebeest.org>

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  <mwielaard@redhat.com>
>
>     * 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);
>
>
>   

  reply	other threads:[~2008-02-29 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 15:14 Mark Wielaard
2008-02-29 16:03 ` Andrew Cagney [this message]
2008-03-02 12:34   ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C82C87.4090600@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).