mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/caheckman_UndefinedFunction' into Ghidra_9.2
This commit is contained in:
commit
165a767365
4 changed files with 26 additions and 8 deletions
|
@ -79,14 +79,15 @@ public class HighFunction extends PcodeSyntaxTree {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the id with the associated function symbol, if it exists
|
||||
* @return the id or 0 otherwise
|
||||
* Get the id with the associated function symbol, if it exists.
|
||||
* Otherwise return a dynamic id based on the entry point.
|
||||
* @return the symbol id, or possibly a dynamic id
|
||||
*/
|
||||
public long getID() {
|
||||
if (func instanceof FunctionDB) {
|
||||
return func.getSymbol().getID();
|
||||
}
|
||||
return 0;
|
||||
return func.getProgram().getSymbolTable().getDynamicSymbolID(func.getEntryPoint());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,6 +55,7 @@ public class HighFunctionShellSymbol extends HighSymbol {
|
|||
@Override
|
||||
public void saveXML(StringBuilder buf) {
|
||||
buf.append("<function");
|
||||
SpecXmlUtils.encodeUnsignedIntegerAttribute(buf, "id", getId());
|
||||
SpecXmlUtils.xmlEscapeAttribute(buf, "name", name);
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(buf, "size", 1);
|
||||
buf.append(">\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue