This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How "can't compute CFA for this frame" and "no enough registers or memory available to further unwind" happen?
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb at sourceware dot org
- Cc: zhihua che <zhihua dot che at gmail dot com>
- Date: Mon, 31 Oct 2011 17:43:03 +0000
- Subject: Re: How "can't compute CFA for this frame" and "no enough registers or memory available to further unwind" happen?
- References: <CABexPfGFMUgzjRZ22nsB=A2RoQk2oYORHA+E2cX2y6=bU+Hgjw@mail.gmail.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.
> The codes seem work, but I
> can only exam registers or memory using "info reg" or "x" command,
> it's way unfriendly and time-consuming. I have searched a lot but
> don't figure out how these happen. I need your help. Thanks.
What's the output of "info all-registers"?
--
Pedro Alves