|
17 | 17 |
|
18 | 18 | import ghidra.app.cmd.function.CreateFunctionCmd;
|
19 | 19 | import ghidra.app.cmd.label.DemanglerCmd;
|
20 |
| -import ghidra.app.plugin.core.analysis.AutoAnalysisManager; |
21 | 20 | import ghidra.app.script.GhidraScript;
|
22 |
| -import ghidra.app.services.AnalysisPriority; |
23 | 21 | import ghidra.app.util.demangler.Demangled;
|
24 | 22 | import ghidra.framework.model.DomainFolder;
|
25 | 23 | import ghidra.program.database.data.DataTypeUtilities;
|
@@ -54,7 +52,7 @@ public AnalysisMode getScriptAnalysisMode() {
|
54 | 52 | private DataType dtUint8, dtUint16, dtUint32, dtUint64;
|
55 | 53 | private DataType dtInt8, dtInt16, dtInt32, dtInt64;
|
56 | 54 | private DataType dtInt, dtLong, dtULong, dtSizeT;
|
57 |
| - private DataType dtString, dtFStream, dtMutex, dtConditionVariable, dtFuture, dtVectorBool, dtDeque; |
| 55 | + private DataType dtString, dtFStream, dtMutex, dtConditionVariable, dtFuture, dtFsPath, dtVectorBool, dtDeque; |
58 | 56 | private Structure classTypeInfo, subClassTypeInfo, vmiClassTypeInfo;
|
59 | 57 | private Address classVTable, subClassVTable, vmiClassVTable;
|
60 | 58 | private int baseClassPadding;
|
@@ -430,6 +428,7 @@ private void createStdDataTypes() throws Exception {
|
430 | 428 | var mutexDataType = new StructureDataType("mutex", 0);
|
431 | 429 | var conditionVariableDataType = new StructureDataType("conditionVariable", 0);
|
432 | 430 | var futureDataType = new StructureDataType("future", 0);
|
| 431 | + var fsPathDataType = new StructureDataType("fsPath", 0); |
433 | 432 | var dequeDataType = new StructureDataType("deque", 0);
|
434 | 433 | stringDataType.setToDefaultAligned();
|
435 | 434 | stringDataType.setPackingEnabled(true);
|
@@ -563,6 +562,10 @@ private void createStdDataTypes() throws Exception {
|
563 | 562 | stringDataType.add(dtSizeT, "_Mysize", null);
|
564 | 563 | stringDataType.add(dtSizeT, "_Myres", null);
|
565 | 564 |
|
| 565 | + fsPathDataType.add(createDataType(dtcStd, stringVal), "_Bx", null); |
| 566 | + fsPathDataType.add(dtSizeT, "_Mysize", null); |
| 567 | + fsPathDataType.add(dtSizeT, "_Myres", null); |
| 568 | + |
566 | 569 | bitVecDataType.setExplicitMinimumAlignment(currentProgram.getDefaultPointerSize());
|
567 | 570 | bitVecDataType.add(Undefined.getUndefinedDataType(4 * currentProgram.getDefaultPointerSize()));
|
568 | 571 |
|
@@ -592,6 +595,7 @@ private void createStdDataTypes() throws Exception {
|
592 | 595 | this.dtMutex = createDataType(dtcStd, mutexDataType);
|
593 | 596 | this.dtConditionVariable = createDataType(dtcStd, conditionVariableDataType);
|
594 | 597 | this.dtFuture = createDataType(dtcStd, futureDataType);
|
| 598 | + this.dtFsPath = createDataType(dtcStd, fsPathDataType); |
595 | 599 | this.dtString = createDataType(dtcStd, stringDataType);
|
596 | 600 | this.dtVectorBool = createDataType(dtcStd, bitVecDataType);
|
597 | 601 | this.dtDeque = createDataType(dtcStd, dequeDataType);
|
@@ -1491,6 +1495,8 @@ private DataType getDataType(TypeDef.Field f) throws Exception {
|
1491 | 1495 | return dtConditionVariable;
|
1492 | 1496 | case "stl-future":
|
1493 | 1497 | return dtFuture;
|
| 1498 | + case "stl-fs-path": |
| 1499 | + return dtFsPath; |
1494 | 1500 | }
|
1495 | 1501 | break;
|
1496 | 1502 | case "container":
|
|
0 commit comments