Using AfxDumpStack() in release build

Smugindividual
Smugindividual used Ask the Experts™
on
Is there an explanation why AfxDumpStack doesnt work properly in release build when MSDN says that it should work for both builds?  The exception is in the same place for both runs.  I've fiddled around with the compile options for my release build to try and include "symbolic info", but havent been able to produce anything differently.  

"There's a new AfxDumpStack function that dumps a stack image as TRACE output or to the clipboard or debugger. It works in both release and debug builds, but unless your program has symbolic info, all you get is a bunch of hex gobbleygook. Remember, as John Robbins (also known as Mr. Bugslayer) has pointed out, there's no reason you can't use symbolic info in a release build. " -MSDN
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/1098/vc6/vc6.htm&nav=/msj/1098/newnav.htm



What i get in debug(what I expected from both builds)

=== begin AfxDumpStack output ===
77F9741F: WINNT\System32\ntdll.dll! NtGetContextThread + 11 bytes
00473DFF: Projects\ITOS\Documentation\Supporting\Code\Server\Debug\Execut!void resetModems(void) + 31 bytesvoid resetModems(void) + 31 bytes
004748CB: Projects\ITOS\Documentation\Supporting\Code\Server\Debug\Execut!static unsigned int ServerSocket::ServerThread(void *) + 843 bytesstatic unsigned int ServerSocket::ServerThread(void *) + 843 bytes
0052D945: Projects\ITOS\Documentation\Supporting\Code\Server\Debug\Execut!unsigned int _AfxThreadEntry(void *) + 693 bytesunsigned int _AfxThreadEntry(void *) + 693 bytes
004C8993: Projects\ITOS\Documentation\Supporting\Code\Server\Debug\Execut!__beginthreadex + 307 bytes__beginthreadex + 307 bytes
77E8758A: WINNT\system32\KERNEL32.dll! SetFilePointer + 394 bytes
=== end AfxDumpStack() output ===



what i get from release build

=== begin AfxDumpStack output ===
77F9741F: WINNT\System32\ntdll.dll! NtGetContextThread + 11 bytes
004533C7: Projects\ITOS\Documentation\Supporting\Code\Server\Release\Exec!<no symbol><no symbol>
004A59AE: Projects\ITOS\Documentation\Supporting\Code\Server\Release\Exec!<no symbol><no symbol>
0047A18D: Projects\ITOS\Documentation\Supporting\Code\Server\Release\Exec!<no symbol><no symbol>
77E8758A: WINNT\system32\KERNEL32.dll! SetFilePointer + 394 bytes
=== end AfxDumpStack() output ===



Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
jkr
Top Expert 2012

Commented:
Have you called 'SymInitialize()'?

Author

Commented:
nope, looking into what it does right now.

Author

Commented:
you got an include file for SymInitialize()?

The MS pages say that it's Dbghelp.h
so far not working for me
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Top Expert 2012
Commented:
Try 'imagehlp.h'

Author

Commented:
Yup, that worked...first time tryed produced a call stack but it doesnt look like the call stack i was expecting.
Need to figure out which options to set.  

Author

Commented:
I need to back up and reaproach the problem.  And I dont think that SymInitialize is going to be the solution.  

Commented:
This question didn't show any activity for more than 21 days. I will ask Community Support to close it unless you finalize it yourself within 7 days.
You can always request to keep this question open. But remember, experts can only help if you provide feedback to their comments.
Unless there is objection or further activity,  I will suggest to accept

    "jkr"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
========
Werner
jkr
Top Expert 2012

Commented:
>>Need to figure out which options to set.  

Be sure to have the debug info ready - that is about it...
Force accepted

** Mindphaser - Community Support Moderator **

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial