John Pruitt(deleted)
|
local symbol info for struct fools the debugger
|
John Pruitt(deleted)
09/17/2010 1:01 PM
post67754
|
local symbol info for struct fools the debugger
We are using the arm-le compiler for ti omap-l138 processors. qnx 6.5
We had a function that was returning a structure and had a local variable of the type that was going to be returned. The
debugger showed one set of values for a struct variable but the values were not correct. Looking at the disassembled
code, it was obvious that the debugger was looking at a different spot on the stack than what the compiler was actually
using.
I added static to the local variable so it was no longer on the stack and then the debugger and compiler seemed to agree
about where the variable really was.
I don't have a small example but suspect that returning a struct was contributing to the problem. Maybe the compiler
told the debugger the variable was in one place but used the ultimate return point as some kind of optimization.
Hope this helps.
|
|
|