Skip to content

Commit ef71270

Browse files
author
astrelsky
committed
vs analysis fix
1 parent 8c24276 commit ef71270

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/main/java/cppclassanalyzer/analysis/AbstractCppClassAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public boolean added(Program program, AddressSetView set, TaskMonitor monitor, M
111111
throw e;
112112
} catch (Exception e) {
113113
e.printStackTrace();
114-
log.appendMsg("Ghidra-Cpp-Class-Analyzer", e.getMessage());
114+
log.appendException(e);
115115
return false;
116116
}
117117
}

src/main/java/cppclassanalyzer/analysis/vs/VsVftableAnalysisCmd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ private void setupFunctions(Vtable vftable) throws CancelledException {
6464
monitor.checkCanceled();
6565
for (Function f : functionTable) {
6666
monitor.checkCanceled();
67-
if (f.isThunk()) {
67+
CppClassAnalyzerUtils.createThunkFunctions(f);
68+
while (f.isThunk()) {
6869
f = f.getThunkedFunction(true);
6970
}
7071
if (f.isExternal()) {
@@ -73,7 +74,6 @@ private void setupFunctions(Vtable vftable) throws CancelledException {
7374
if (!CppClassAnalyzerUtils.isDefaultFunction(f) || isPureVirtual(f)) {
7475
continue;
7576
}
76-
CppClassAnalyzerUtils.createThunkFunctions(f);
7777
ClassTypeInfoUtils.setClassFunction(type, f);
7878
}
7979
}

src/main/java/cppclassanalyzer/data/manager/VsClassTypeInfoManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public ClassTypeInfoDB getType(GhidraClass gc) {
6969

7070
@Override
7171
public TypeInfo getTypeInfo(Address address, boolean resolve) {
72-
TypeInfo ti = super.getTypeInfo(address);
72+
TypeInfo ti = super.getTypeInfo(address, resolve);
7373
if (ti == null) {
7474
TypeDescriptorModel model =
7575
new TypeDescriptorModel(program, address, VsClassTypeInfo.DEFAULT_OPTIONS);

src/main/java/cppclassanalyzer/plugin/typemgr/node/AbstractSortedNode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ public final void addNode(GTreeNode node) {
1717
index = Collections.binarySearch(kids, node);
1818
}
1919
if (index >= 0) {
20-
String msg = "Child node "+node.getName()+" already exists in "+getName();
21-
throw new AssertException(msg);
20+
//String msg = "Child node "+node.getName()+" already exists in "+getName();
21+
//throw new AssertException(msg);
22+
//TODO fixme
23+
return;
2224
}
2325
addNode(-(index + 1), node);
2426
}

src/main/java/ghidra/app/cmd/data/rtti/gcc/ClassTypeInfoUtils.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ public static void setClassFunction(ClassTypeInfo type, Function function) {
283283
try {
284284
function.setParentNamespace(type.getGhidraClass());
285285
function.setCallingConvention(GenericCallingConvention.thiscall.getDeclarationName());
286-
// necessary due to ghidra bug.
287-
//function.setCustomVariableStorage(true);
288-
//function.setCustomVariableStorage(false);
289286
success = true;
290287
} catch (Exception e) {
291288
throw new AssertException(String.format(

0 commit comments

Comments
 (0)