Closed weirdbeardgame closed 3 months ago
I'm not sure mdebug parsing may bring much value to spimdisasm.
My recommendation is to use an external tool to parse the mdebug section and generate a symbol_addrs file that spimdisasm can understand. This tool can parse some flavor of mdebug, you could try to adapt it to generate a symbol_addrs file: https://github.com/decompals/ultralib/blob/main/tools/libelf.py
Explain the feature
Advantage
MDebug has more detail then the ELF symbol table revealing more functions than the ELF Symbol table.
There's more detail about Symbols and Structs in PS2 MDebug as well
Example(s)
https://github.com/weirdbeardgame/Fatal-Frame-2/blob/main/Documentation/Types.h - An example of MDebug symbols read from a Tool called CCC created by ChaoticGD
Or his excellent implementation of CCC included in his Ghidra plugin - https://github.com/chaoticgd/ghidra-emotionengine-reloaded