PDA

View Full Version : One Mystery solved



Dwood
February 19th, 2010, 12:44 PM
Well, kinda.

In respect to the "toolbeta.map/sapien.map" errors/debug that's thrown at us whenever we start the hek tools:



(From an inside source at Bungie)
I think those .map files are *memory* maps of some sort, not game-level maps. They're used for debugging the tools when the tools crash. I think. Since users don't need to debug our tools, we don't release those files

Kornman00
February 19th, 2010, 02:18 PM
Yeah, those .map files that they look for are what you call "linker address maps". The linker creates (http://msdn.microsoft.com/en-us/library/k7xkk3e2(VS.80).aspx)them when outputing the final PE file (exe/dll).

Con
February 19th, 2010, 08:57 PM
Oh, I think I understand. When you get a runtime error in Java it will tell you what line it happened on and in what class, and I figured it would have to create something to match parts of the compiled class to parts of the source .java to do this (although I have no clue where or when this happens). I suppose this is the equivalent for C++?

Kornman00
February 19th, 2010, 09:16 PM
Windows and .NET use a PDB file for program debug data. The PDB contains TONS of debug data and code descriptions (including source file information plus line/code mappings like you're talking about). Linker address maps are just as the same suggest: linker based. The linker (in the case of C++) deals with .OBJ and .LIB files, which are basically the intermediate format of compiled code. The address maps just describe each symbol (ie, a function, variable, compiler created data, etc) in the resulting PE file. Each symbol has information like a name, the address where it's located in the PE, the source OBJ/LIB file it originated from, etc.

If the tools shipped with their linker maps then all those times it asserts with a stack dump, it would walk the return addresses of the last few function calls that caused the instruction pointer to reach the current code at fault and try to find those addresses in the linker map. If it doesn't find the function's symbol based on the address range then it just writes ????? characters in the stack dump in debug.txt.

CrAsHOvErRide
February 20th, 2010, 03:49 AM
:O

Skarma
February 22nd, 2010, 09:36 PM
Symbol names would be awesome to have. Too bad no one at M$ was stupid enough to release a version of Halo with a PDB file :[ Arg.