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: Jim Blandy <jimb at redhat dot com>
- To: "MCG LU Fengcheng" <Fengcheng dot LU at alcatel-sbell dot com dot cn>
- Cc: <gdb at sourceware dot org>
- Date: Wed, 02 Nov 2005 10:28:17 -0800
- Subject: Re: Why are NOT the function parametters in the stack. They are in the register!
- References: <7E98B33B3500C0409DBEC5C0E3FDEF120230B583@htmail.sbell.com.cn>
"MCG LU Fengcheng" <Fengcheng.LU@alcatel-sbell.com.cn> writes:
> Hello all
> In the PrintTrace, traceType and fmt are both NULL. It's impossible. I always give the valid pointer for the traceType and fmt.
Did you compile your code with optimization? Try compiling without
optimization and see if things behave more reasonably.
When the optimizer changes the program's code, it doesn't always
accurately describe to GDB what it has done. When this happens, GDB
can run into troubles finding variables' values (among other things).