mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-3316 - PDB developer script to apply to empty program
This commit is contained in:
parent
3f13d99079
commit
815a38b4fe
2 changed files with 106 additions and 3 deletions
|
@ -355,9 +355,14 @@ public class FunctionSymbolApplier extends MsSymbolApplier {
|
|||
private Function createFunctionCommand(TaskMonitor monitor) {
|
||||
CreateFunctionCmd funCmd = new CreateFunctionCmd(address);
|
||||
if (!funCmd.applyTo(applicator.getProgram(), monitor)) {
|
||||
applicator.appendLogMsg("Failed to apply function at address " + address.toString() +
|
||||
"; attempting to use possible existing function");
|
||||
return applicator.getProgram().getListing().getFunctionAt(address);
|
||||
funCmd = new CreateFunctionCmd(null, address, new AddressSet(address, address),
|
||||
SourceType.DEFAULT);
|
||||
if (!funCmd.applyTo(applicator.getProgram(), monitor)) {
|
||||
applicator
|
||||
.appendLogMsg("Failed to apply function at address " + address.toString() +
|
||||
"; attempting to use possible existing function");
|
||||
return applicator.getProgram().getListing().getFunctionAt(address);
|
||||
}
|
||||
}
|
||||
return funCmd.getFunction();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue