• 1/2

Debug Symbol Server for 3ds Max 2012

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:

  • Public symbols (typically all functions, static and global variables)
  • A list of object files that are responsible for sections of code in the executable
  • Frame pointer optimization information (FPO)
  • Name and type information for local variables and data structures
  • Source file and line number 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:

  • Public symbols (typically only non-static functions and global variables)
  • A list of object files that are responsible for sections of code in the executable
  • Frame pointer optimization information (FPO)

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

Resources

For more information see the following

Acknowledgements

Thanks to Attila Szabo, principal developer on the 3ds Max development team for contributing this blog entry!

2 Comments

Chris Johnson

Posted 24 September 2011 3:00 am

Note, Chris that you didn't download symbols for the Microsoft DLL user32.dll, thus everything below that in your stack frame may be incorrect....

Mike Owen

Posted 11 September 2013 8:13 am

Would it be possible for 2013/2014 PDB's to be made available on this server and also other external, related apps such as InfoCenter? Really need WSCommCntr4.pdb
Thanks!

Add Your Comment

You must be logged in to post a comment.

Please only report comments that are spam or abusive.