Re: Why are NOT the function parametters in the stack. They are in the register!

Jim Blandy
2005-11-02T18:28:36Z

"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).