This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Why are NOT the function parametters in the stack. They are in the register!
- From: Daniel Jacobowitz <drow at false dot org>
- To: MCG LU Fengcheng <Fengcheng dot LU at alcatel-sbell dot com dot cn>
- Cc: gdb at sourceware dot org
- Date: Wed, 2 Nov 2005 08:45:28 -0500
- Subject: Re: Why are NOT the function parametters in the stack. They are in the register!
- References: <7E98B33B3500C0409DBEC5C0E3FDEF120230B583@htmail.sbell.com.cn>
On Wed, Nov 02, 2005 at 02:07:26PM +0800, MCG LU Fengcheng wrote:
> (gdb) p &traceType
> Address requested for identifier "traceType" which is in register $eax
> (gdb) p &fmt
> Address requested for identifier "fmt" which is in register $eax
>
> gdb complains fmt and traceType are in the register eax. Why not in the stack. In fact, lineNo and filename are in the stack. Gdb can print their address out.
>
> I check the eax value. It is zero. I also check the stack. I found the fmt and traceType address were in the stack.
>
> It's the gdb issue? I can't understand it.
Usually this means they are no longer "available", but debug
information has failed to represent that fact. They were loaded
from the stack, used, and then not used after the current call returns.
Don't worry about it.
--
Daniel Jacobowitz
CodeSourcery, LLC