Posted by Christopher Diggins, 30 May 2011 8:00 pm
Autodesk is pleased to announce the public availability of debug symbols for 3ds Max 2012 via a symbol server to help our SDK users create better plug-ins in less time. The symbols are available via http://symbols.autodesk.com/symbols.
Why free public symbols
Autodesk is committed to encourage and help the development of plug-ins for 3ds Max. By making the 3ds Max public symbols freely available, Autodesk fulfills one of the top requests of its 3rd party plug-in developer community as reported in the annual 3ds Max SDK Survey.
What are symbols?
Symbols or Program Database Files (PDBs) are a by-product of the build process and contain debugging information for specific binary modules (e.g. exe or dll files).
By default, a C++ PDB file contains the following information:
A lot of the information contained in a PDB is useful only when the source code of the corresponding module is available. Stripping out this information keeps them small while allowing the debugger to reconstruct the callstack and still preserving our intellectual property. By default, stripped PDB files contain the following information:
Using the Autodesk symbol server
The Autodesk symbol server is available at http://symbols.autodesk.com/symbols. You can access the symbol server in one of two ways.
1) Enter the server address directly in Visual Studio: from the Tools menu, choose Options, then choose Debugging, and then choose Symbols.
2) Use the _NT_SYMBOL_PATH environment variable. This is used by all debugging tools. It is also used by Visual Studio, and is read and decoded when Visual Studio opens.
This environment variable allows you to specify multiple symbol servers — for example, an internal private symbol server. It also allows you to specify a local cache directory to store PDBs for all symbols that you look up from symbol servers, both internally and over the Internet:
set _NT_SYMBOL_PATH = srv*c:worklocalsymbols*NearbyServerstore*http://symbols.autodesk.com/symbols
Unstripped PDBs for 3ds Max
Autodesk Developer Network (ADN) members can download unstripped PDBs for a wide range of releases of 3ds Max through the ADN member’s only website http://adnsparks.autodesk.com/. For more information on ADN, becoming a member, and ADN mentoring services visit the Autodesk Development Center http://www.autodesk.com/developer.
Debugging with symbols
The version of 3ds Max 2012 that you have installed has been built in release mode and linked against the release version of the CC++ and other run-time libraries. In order to avoid memory corruptions, you should also link your plug-in against the release version of the CC++, etc. run-time libraries, but compile it with optimizations turned off and with debug information enabled. The 3ds Max SDK sample plug-ins have a configuration named “Hybrid” that corresponds to this setup.
To see the symbols in action, place a breakpoint in your plug-in’s source and start debugging it.
As the debugger loads 3ds Max’s module, it will locate the symbols on the symbol server, download them to your local symbol cache and load them. Starting the debug session will take a bit of time when the 3ds Max symbols are downloaded from the Autodesk symbol server, but subsequent debug sessions should start much faster since the symbols will be loaded from the local cache.
When the debugger hits your breakpoint, you should be able to see a full callstack which includes functions from 3ds Max calling each other and your plug-in.
The following example shows a call-stack for the Geosphere's Clone method running in 3ds Max 2012 x64
For more information see the following
Thanks to Attila Szabo, principal developer on the 3ds Max development team for contributing this blog entry!
Please only report comments that are spam or abusive.