Skip to content

Commit

Permalink
import_df_structures update
Browse files Browse the repository at this point in the history
updated linux 32-bit sizes, other minor changes
  • Loading branch information
ab9rf committed Aug 6, 2023
1 parent 9c9b10a commit 17329e0
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions ghidra/import_df_structures.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ protected void run() throws Exception {
labelGlobals();
annotateGlobalTable();
cleanUpDemangler();

// updateProgressMajor("Waiting for auto analysis...");
// var am = AutoAnalysisManager.getAnalysisManager(currentProgram);
// am.setIgnoreChanges(false); // change from SUSPENDED to ENABLED mode
// am.reAnalyzeAll(null); // force full program analysis
// am.waitForAnalysis(AnalysisPriority.CODE_ANALYSIS.priority(), monitor);

// setThunkNamespaces();
}

private void updateProgressMajor(String message) throws Exception {
Expand Down Expand Up @@ -368,16 +360,15 @@ private void createStdDataTypes() throws Exception {
dequeDataType.setExplicitMinimumAlignment(currentProgram.getDefaultPointerSize());
dequeDataType.add(Undefined.getUndefinedDataType(10 * currentProgram.getDefaultPointerSize()));

// sizes for these types obtained using gcc 10.5 via godbolt, which only has gcc-x86 compilers for 64 bit
// thus this code will be _wrong_ for 32-bit compilers, although we probably don't care
// sizes for these types obtained using gcc 10.5 via godbolt
mutexDataType.setExplicitMinimumAlignment(currentProgram.getDefaultPointerSize());
mutexDataType.add(Undefined.getUndefinedDataType(40)); // likely incorrect for 32 bit
mutexDataType.add((currentProgram.getDefaultPointerSize() == 8) ? 40 : 24);

conditionVariableDataType.setExplicitMinimumAlignment(currentProgram.getDefaultPointerSize());
conditionVariableDataType.add(Undefined.getUndefinedDataType(48)); // likely incorrect for 32 bit
conditionVariableDataType.add(Undefined.getUndefinedDataType(48));

futureDataType.setExplicitMinimumAlignment(currentProgram.getDefaultPointerSize());
futureDataType.add(Undefined.getUndefinedDataType(16)); // likely incorrect for 32 bit
futureDataType.add(Undefined.getUndefinedDataType(2 * currentProgram.getDefaultPointerSize()));

this.baseClassPadding = 1;

Expand Down

0 comments on commit 17329e0

Please sign in to comment.