Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #63 #14

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions src/main/java/kaiju/tools/fse/FnSetExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,35 +181,7 @@ private void computeFnSet(ProjectData currentData) {

if (fnhashmap != null) {

FnHashSaveable prop = null;
Class<?> c = null;
try {
c = Class.forName("ghidra.program.model.util.ObjectPropertyMap");
} catch (ClassNotFoundException e) {
//TODO
return;
}

try
{
// the get() function was introduced in Ghidra 10.2
c.getDeclaredMethod("get");
try {
prop = (FnHashSaveable) c.getDeclaredMethod("get").invoke(function.getEntryPoint());
} catch (Exception e) {
//TODO
return;
}
} catch(NoSuchMethodException e) {
// before Ghidra 10.2, it was getObject()
try {
prop = (FnHashSaveable) c.getDeclaredMethod("getObject").invoke(function.getEntryPoint());
} catch (Exception e2) {
//TODO
return;
}
}
//FnHashSaveable prop = (FnHashSaveable) fnhashmap.getObject(function.getEntryPoint());
FnHashSaveable prop = (FnHashSaveable) fnhashmap.get(function.getEntryPoint());

if (prop != null) {
// TODO: make it configurable which type of hash to use here
Expand Down