Skip to content

Commit 3bb9d19

Browse files
committed
Show symbol info for FunctionPtrNodes.
1 parent d975f47 commit 3bb9d19

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Nodes/BaseFunctionPtrNode.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ protected int Draw(ViewInfo view, int x, int y, string type, string name)
5353

5454
x = AddComment(view, x, y);
5555

56+
if (Program.Settings.ShowCommentSymbol)
57+
{
58+
#if WIN64
59+
var value = view.Memory.ReadObject<UInt64FloatDoubleData>(Offset);
60+
#else
61+
var value = view.Memory.ReadObject<UInt32FloatData>(Offset);
62+
#endif
63+
64+
var module = view.Memory.Process.GetModuleToPointer(value.IntPtr);
65+
if (module != null)
66+
{
67+
var symbols = view.Memory.Process.Symbols.GetSymbolsForModule(module);
68+
if (symbols != null)
69+
{
70+
var symbol = symbols.GetSymbolString(value.IntPtr, module);
71+
if (!string.IsNullOrEmpty(symbol))
72+
{
73+
x = AddText(view, x, y, Program.Settings.OffsetColor, HotSpot.NoneId, symbol) + view.Font.Width;
74+
}
75+
}
76+
}
77+
}
78+
5679
if (levelsOpen[view.Level])
5780
{
5881
var ptr = view.Memory.ReadObject<IntPtr>(Offset);

0 commit comments

Comments
 (0)