Ghidra is a software reverse engineering (SRE) framework
Distinguish between same-named functions.
Solomon Uckoe8ed3a28ae10
diff --git a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/component/hover/FunctionSignatureDecompilerHover.java b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/component/hover/FunctionSignatureDecompilerHover.javaindex 5c0872040b..bc9afe8616 100644--- a/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/component/hover/FunctionSignatureDecompilerHover.java+++ b/Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/component/hover/FunctionSignatureDecompilerHover.java@@ -83,18 +83,9 @@ public class FunctionSignatureDecompilerHover extends AbstractConfigurableHoverClangToken token = ((ClangTextField) field).getToken(fieldLocation);if (token instanceof ClangFuncNameToken) {- // Obvious function reference- String name = token.getText();- Symbol symbol = getSymbolForLocation(program, name);- if (symbol == null) {- return null;- }-- if (symbol.getSymbolType() == SymbolType.FUNCTION) {- Function function = program.getFunctionManager().getFunctionAt(symbol.getAddress());- String content = ToolTipUtils.getToolTipText(function, false);- return createTooltipComponent(content);- }+ Function function = ((ClangFuncNameToken)token).getHighFunction().getFunction();+ String content = ToolTipUtils.getToolTipText(function, false);+ return createTooltipComponent(content);}else if (token instanceof ClangVariableToken) {@@ -144,15 +135,4 @@ public class FunctionSignatureDecompilerHover extends AbstractConfigurableHoverreturn null;}- private Symbol getSymbolForLocation(Program program, String symName) {- SymbolTable symTable = program.getSymbolTable();- SymbolIterator symbols = symTable.getSymbols(symName);- for (Symbol symbol : symbols) {- if (symbol.getSymbolType() == SymbolType.FUNCTION) {- return symbol;- }- }- return null;- }-}