Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: zhihua che <zhihua.che@gmail.com>
To: gdb <gdb@sourceware.org>
Subject: Fwd: How "can't compute CFA for this frame" and "no enough registers or memory available to further unwind" happen?
Date: Mon, 31 Oct 2011 21:36:00 -0000	[thread overview]
Message-ID: <CABexPfGLwJ=VivsPrG=PsMC5u9u+itGfWw5X9M_zmU9HV5SpnQ@mail.gmail.com> (raw)
In-Reply-To: <201110311946.50273.pedro@codesourcery.com>

---------- Forwarded message ----------
From: Pedro Alves <pedro@codesourcery.com>
Date: 2011/11/1
Subject: Re: How "can't compute CFA for this frame" and "no enough
registers or memory available to further unwind" happen?
To: zhihua che <zhihua.che@gmail.com>


On Monday 31 October 2011 18:45:09, zhihua che wrote:
> 2011/11/1 Pedro Alves <pedro@codesourcery.com>:
> > On Monday 31 October 2011 17:25:46, zhihua che wrote:
> >> Hi, everyone
> >>
> >>        I'm not sure this is right place for the help. I'm writing a
> >> toy os and coding with mixed assembly and C language, debugging with
> >> GDB. But I'm trapped with an annoying problem. This is my situation:
> >> During the os booting time, after the os control transfers from real
> >> mode assembly codes to real mode C codes, I wish I can exam the stack
> >> frames and local variable as I do in regular application program, but
> >> I always get "can't compute CFA for this frame" or "No enough
> >> registers or memory available to further unwind" if I issue "print
> >> xxx" or "backtrace" command respectivelly.
> >
> > You'll need to debug gdb.  Check what is it that gdb is finding
> > unavailable.  Put a breakpoint at `throw_error' and then do that
> > "print XXX".  You should hit a call like `throw_error (NOT_AVAILABLE_ERROR...'.
> > Get a backtrace.  Do "continue" on the top gdb, and see if further
> > hits appear.  GDB has an exception handling mechanism, and that
> > exception may be thrown more than once during a command run.
>
> I've tried debugging the GDB under "print xxx" circumstance, and I
> find it doesn't satisfy an comparison in dwarf2_frame_cfa() which is
> like the below:
>       if (! frame_unwinder_is(this_frame, &dwarf2_frame_unwinder))
>            error(_("can't compute CFA for this frame"))
> the frame_unwinder_is() tests if this_frame->unwind is equal with
> &dwarf2_frame_unwind. And I further find out this_frame->unwind is
> equal with &sentinel_frame_unwind instead in this situation

This code changed recently.  You should try mainline gdb, or a
recent cvs snapshop.  What's the gdb version you're using BTW?

And what's the gdb backtrace at that point?

--
Pedro Alves


  parent reply	other threads:[~2011-10-31 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 17:43 zhihua che
2011-10-31 20:54 ` Pedro Alves
     [not found]   ` <CABexPfH0HLsP1mR2oxR1HfSxOUkULL6pErB2QiVfR0es+G=qqw@mail.gmail.com>
2011-10-31 21:35     ` Fwd: " zhihua che
     [not found]     ` <201110311946.50273.pedro@codesourcery.com>
2011-10-31 21:36       ` zhihua che [this message]
     [not found]       ` <CABexPfFbrt6hv5fBvXMYXxVCaD_x7KFvUq-DV1X8EvWQaVsonQ@mail.gmail.com>
     [not found]         ` <CABexPfEFdc10NEVtJREy6NoryHNXFWt55+kMHoKpqO_ggQKvOg@mail.gmail.com>
2011-11-01 11:58           ` zhihua che

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='CABexPfGLwJ=VivsPrG=PsMC5u9u+itGfWw5X9M_zmU9HV5SpnQ@mail.gmail.com' \
    --to=zhihua.che@gmail.com \
    --cc=gdb@sourceware.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