diff --git a/Il2CppInspector.Common/Outputs/JSONMetadata.cs b/Il2CppInspector.Common/Outputs/JSONMetadata.cs index b9c2dfd..f491d5f 100644 --- a/Il2CppInspector.Common/Outputs/JSONMetadata.cs +++ b/Il2CppInspector.Common/Outputs/JSONMetadata.cs @@ -39,6 +39,7 @@ namespace Il2CppInspector.Outputs writeFunctions(); writeMetadata(); writeExports(); + writeSymbols(); }, "Address map of methods, internal functions, type pointers and string literals in the binary file" ); @@ -185,6 +186,20 @@ namespace Il2CppInspector.Outputs }, "Exports"); } + private void writeSymbols() { + var symbols = model.Package.BinaryImage.GetSymbolTable().Values; + + writeArray("symbols", () => { + foreach (var symbol in symbols) { + writeObject(() => { + writeName(symbol.VirtualAddress, symbol.Name); + writer.WriteString("demangledName", symbol.DemangledName); + writer.WriteString("type", symbol.Type.ToString()); + }); + } + }, "Symbol table"); + } + private void writeObject(Action objectWriter) => writeObject(null, objectWriter); private void writeObject(string name, Action objectWriter, string description = null) {