views:

69

answers:

1

In the Call Stack window of visual studio, it reports:

[Frames below may be incorrect and/or missing, no symbols loaded for IPCamera.ax]   

What does it mean by Frames, and why missing symbols may cause it incorrect?AFAIK,symbols are just for debugging info,missing symbols will only make the source invisible .

alt text

+5  A: 

Frames == stack frames.

A stack frame is a record that stores information for each function call on the call stack. It contains all parameters, local variables and potential return values of the function that got called.

For each function call that is currently running (i.e. that has not yet exited), there is an additional frame on the call stack.

Missing symbols may indeed cause incorrect display of the stack frames, mainly due to two phenomena:

  • Function inlining, and
  • Tail-call optimization.

In both cases, function calls in the actual code are transformed into something else, so stack frames are lost (because no call is generated, and hence no stack frame).

Konrad Rudolph
why missing symbols may cause it incorrect? Still don't make sense after your edit.
COMer
Is there a way to know how many lines of assembly are executed between two breakpoints?
COMer
As Konrad explained, conceptual boundaries between functions present in the source code may be blurred during optimisation and inlining. Even sans inlining, a compiler may generate executable code that jumps to one places from several distinct source-code functions, so it's not always possible to say "execution stopped at this address, so in function X". The call stack normally displays function parameters too, but interpretation is needed: is the value passed a bool, int, text, a pointer (to what?)? Inside a function without symbol information, you can't tell.
Tony
It is the 'Omit frame pointers' optimization that causes this problem. /Oy, it is unfortunately turned on in Microsoft code. Which is what the OP is looking at for his past 10 questions. Neither inlining nor tail call opt creates stack frames.
Hans Passant
@Hans: of course not. But both *remove* stack frames that would otherwise be there.
Konrad Rudolph