From: Brian D. <br...@de...> - 2005-12-13 15:50:16
|
David Lamy-Charrier wrote: > I still can't figure out the difference between: > 1. an executable generated by MSVC6.0 without optimization and without > debug info (or debug info in an unknown format) and > 2. an executable generated by GCC without debug info and with > optimizations (-O2 -g) I don't understand your #2, because -g means to add debug information. As far as I understand it -- and someone please correct me if I am wrong -- is that regardles of if there is debug information present, and regardless of whether it's in a format that the debugger understands, that if the compiled binary: - uses standard function prologs/epilogs - uses standard calling conventions with the usual stack frame - does not have any strange thunks or trampolenes in place ... that any debugger on the face of the earth should be able to unwind the stack correctly. It may not be able to show function names, but it should at least be able to show a pretty reasonable approximation of the stack with raw memory addresses. So if it's not doing that, then either there is some kind of optimization in the code that makes it impossible, or the debugger has a bug. As a further data point you might try your code in a third party debugger such as OllyDbg just to see what happens there. Brian |