Reputation: 2651
I'm trying to make sense out of some stacktraces of a game I'm working on. These are generated on Mac with Mono.
at Microsoft.Xna.Framework.Game.Run () [0x0002c] in <9fdab2ac823a429cb7b8525426626ccc>:0
This tells me the method name (Microsoft.Xna.Framework.Game.Run
) and the ILOffset (0x0002c
), but I have no idea what 9fdab2ac823a429cb7b8525426626ccc
is. It's not the metadata token, it's some sort of GUID.
Could any explain to me what this number is? It's my objective to combine these pieces of information together, then together with the original PDB/MDB files restructure a proper stacktrace.
As a workaround I made my own stacktrace method which also outputs the metadata token, but I would much rather work with the native stacktraces as thrown by Mono.
Upvotes: 1
Views: 519
Reputation: 74164
I have no idea what 9fdab2ac823a429cb7b8525426626ccc
The hash element (in between the <>
) is the module version ID (MVID
of the assembly module the method belongs to.
These are produced so a native crash (from an AOT'd application) can be symbolized via Mono's symbol directory that is produced during the compile/AOT of the application via
mono --aot=msym-dir=<msym dir> .....
or using mono-symbolicate
after the compile phase (you need all the original build artifacts):
mono-symbolicate store-symbols myExeWithDebugPDBsDirectory/msym-dir myExeWithDebugPDBsDirectory
This produces the dir (myEXEwithDebugPDBsDirectory/msym-dir
) that contains:
The symbol directory contains subfolder named as a MVID or AOTID
- MVID subfolders contain .dll/.exe and .mdb files.
- AOTID subfolder contain .msym files.
You can then later use mono-symbolicate
to symbolize your crash (using the msym-dir
from the matching application) to produce a "normal" managed code looking exception/stacktrace.
Note: You can also turn those Mono "compact" sequence points off by setting an env. var. before your run your exe:
MONO_DEBUG=no-compact-seq-points mono yourApp.exe
re: Why do my stack traces only include line numbers if the debugger is attached?
Upvotes: 2