In the Call Stack window of Visual Studio 2010, what does the byte offset refer to next to the line number?
Test.exe!__tmainCRTStartup() Line 547 + 0x2c bytes
How come some stack frames have a byte offset and others don’t?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The debugger in general has only the addresses of public symbols, like __tmainCRTStartup(). But code may be executing inside of that function at any offset from the start of the function. Without any symbol for that. So you are seeing the offset from the address of the symbol.
Notable too are cases where you are debugging release build code, you may be seeing a large offset due to code executing inside a function whose symbol didn’t make it into the .pdb file. The line number would then also be missing, very typical for release build code since line numbers get meaningless after the code optimizer moved code around. The line numbers were stripped from the .pdb file by the linker’s /PDBSTRIPPED option.
An offset like +0x2c is a pretty reliable indication that it is actually inside the named function. Odds go down progressively the larger the offset. The symbol you see for, say, a +0x2000 offset is almost certainly unreliable. Not uncommon when you debug with the symbol files for the Windows system DLLs.
Long story short: you see the offset of the executing instruction from the start of the function.