2

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

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
COMer
  • 1,117
  • 4
  • 14
  • 24
  • This http://stackoverflow.com/questions/3717988/why-does-the-debugger-need-symbols-to-reconstruct-the-stack/3718134#3718134 might help on the why. – Martin Ba Sep 15 '10 at 14:58

2 Answers2

5

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
  • 530,221
  • 131
  • 937
  • 1,214
  • why missing symbols may cause it incorrect? Still don't make sense after your edit. – COMer Sep 15 '10 at 12:46
  • Is there a way to know how many lines of assembly are executed between two breakpoints? – COMer Sep 15 '10 at 12:56
  • 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 Delroy Sep 15 '10 at 13:26
  • 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 Sep 15 '10 at 14:18
  • @Hans: of course not. But both *remove* stack frames that would otherwise be there. – Konrad Rudolph Sep 15 '10 at 14:45
0

Microsoft provides symbol files for most if not all of its OS DLLs. If you configure Visual Studio to load them, you can avoid the missing stack frame problem in the call stack display. See this article for more info: Link

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Ian
  • 111
  • 1
  • 3