While analysing a core dump file, how do I see the values are optimized out? Is there a way to get the register they are stored in?
2
votes
1 Answers
0
votes
If you're at the point where you're looking at a core where certain values are optimized out if may be too late already. Easiest is if you can regularly reproduce the core in a build with debugging enabled.
However if you can't, one trick I've had moderate luck with is to move further up the call stack and try to get to the interesting data through more levels of indirection (for example, if you move up in the call stack, perhaps the pointer you need is in a memory location instead of in a register that has been lost).