28 lines
956 B
Java
28 lines
956 B
Java
// @category _Reman3
|
|
// @menupath Reman3.Test
|
|
// @importpackage org.sqlite
|
|
|
|
import java.util.List;
|
|
|
|
import ghidra.app.script.GhidraScript;
|
|
import re3lib.FunctionDatabase;
|
|
import re3lib.RemanConfig;
|
|
|
|
public class Test extends GhidraScript {
|
|
@Override
|
|
public void run() throws Exception {
|
|
RemanConfig.INSTANCE = new RemanConfig(this);
|
|
|
|
// Example SQLite usage
|
|
try (FunctionDatabase db = new FunctionDatabase(this)) {
|
|
List<FunctionDatabase.FunctionEntry> entries = db.loadAllEntries();
|
|
for (FunctionDatabase.FunctionEntry entry : entries) {
|
|
println("entry.name: " + entry.name + " entry.address: " + entry.address + " entry.type: " + entry.type
|
|
+ " calling_convention: " + entry.callingConvention + " return_type: " + entry.returnType);
|
|
if (!entry.parameterNames.isEmpty()) {
|
|
println(" parameters: " + entry.parameterNames + " | types: " + entry.parameterTypes);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |