Skip to content

Ghidra is a software reverse engineering (SRE) framework

GT-2731 Changes from first review

ghizard5077563a3bd2
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractOffset.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractOffset.java
index b863173298..90023da2dd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractOffset.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractOffset.java
@@ -26,27 +26,37 @@ public abstract class AbstractOffset extends AbstractParsableItem {
//==============================================================================================
// Internals
//==============================================================================================
- protected long offsetVal;
+ protected int offsetVal;
//==============================================================================================
// API
//==============================================================================================
/**
* Returns the offset value.
- * @return Offset value.
+ * @return Offset value. Defaults to zero if not parsed.
*/
- public long get() {
+ public int get() {
return offsetVal;
}
+ /**
+ * Parses the offset value from the {@link PdbByteReader}.
+ * @param reader {@link PdbByteReader}.
+ * @throws PdbException Upon not enough data left to parse.
+ */
+ public void parse(PdbByteReader reader) throws PdbException {
+ offsetVal = doParse(reader);
+ }
+
//==============================================================================================
// Abstract Methods
//==============================================================================================
/**
* Parses the offset value from the {@link PdbByteReader}.
* @param reader {@link PdbByteReader}.
+ * @return the offset value.
* @throws PdbException Upon not enough data left to parse.
*/
- public abstract void parse(PdbByteReader reader) throws PdbException;
+ protected abstract int doParse(PdbByteReader reader) throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractPdb.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractPdb.java
index 6ee9e8d35e..d48f7d34c1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractPdb.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractPdb.java
@@ -384,15 +384,16 @@ public abstract class AbstractPdb implements AutoCloseable {
*/
public void pushDependencyStack(CategoryIndex dependeeCategoryIndex) {
- if ((dependeeCategoryIndex.getIndex() == 4774 ||
- dependeeCategoryIndex.getIndex() == 4775) &&
- dependeeCategoryIndex.getCategory() == CategoryIndex.Category.DATA) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if ((dependeeCategoryIndex.getIndex() == 4774 ||
+// dependeeCategoryIndex.getIndex() == 4775) &&
+// dependeeCategoryIndex.getCategory() == CategoryIndex.Category.DATA) {
+// int a = 1;
+// a = a + 1;
+// }
if (dependencyStack.isEmpty()) {
dependencyGraph.addValue(dependeeCategoryIndex);
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractString.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractString.java
index 2bccc6c75b..b9d3d4e55c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractString.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractString.java
@@ -33,7 +33,7 @@ public abstract class AbstractString extends AbstractParsableItem {
//==============================================================================================
/**
* Returns the string value.
- * @return {@link String} value.
+ * @return {@link String} value. Defaults to empty String if not parsed.
*/
public String get() {
return string;
@@ -44,14 +44,24 @@ public abstract class AbstractString extends AbstractParsableItem {
builder.append(string);
}
+ /**
+ * Parses the string from the {@link PdbByteReader}.
+ * @param reader {@link PdbByteReader}.
+ * @throws PdbException upon error parsing the string.
+ */
+ public void parse(PdbByteReader reader) throws PdbException {
+ string = doParse(reader);
+ }
+
//==============================================================================================
// Abstract Methods
//==============================================================================================
/**
* Parses the string from the {@link PdbByteReader}.
* @param reader {@link PdbByteReader}.
+ * @return the {@link String}.
* @throws PdbException upon error parsing the string.
*/
- public abstract void parse(PdbByteReader reader) throws PdbException;
+ protected abstract String doParse(PdbByteReader reader) throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeIndex.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeIndex.java
index 21fc53a1b5..f7ba7f6d6e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeIndex.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeIndex.java
@@ -33,20 +33,30 @@ public abstract class AbstractTypeIndex extends AbstractParsableItem {
//==============================================================================================
/**
* Returns the index value.
- * @return The value of the index.
+ * @return The value of the index. Defaults to zero if not parsed.
*/
public int get() {
return indexVal;
}
+ /**
+ * Parses the index value from the {@link PdbByteReader}.
+ * @param reader {@link PdbByteReader} from which to read the value.
+ * @throws PdbException Upon not enough data left to parse.
+ */
+ public void parse(PdbByteReader reader) throws PdbException {
+ indexVal = doParse(reader);
+ }
+
//==============================================================================================
// Abstract Methods
//==============================================================================================
/**
* Parses the index value from the {@link PdbByteReader}.
* @param reader {@link PdbByteReader} from which to read the value.
+ * @return the type index value.
* @throws PdbException Upon not enough data left to parse.
*/
- public abstract void parse(PdbByteReader reader) throws PdbException;
+ protected abstract int doParse(PdbByteReader reader) throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeProgramInterface.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeProgramInterface.java
index 49870685f8..d93829f66a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeProgramInterface.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/AbstractTypeProgramInterface.java
@@ -259,23 +259,26 @@ public abstract class AbstractTypeProgramInterface {
TypeParser parser = pdb.getTypeParser();
//System.out.println(reader.dump());
while (reader.hasMore()) {
- int index = reader.getIndex();
- //System.out.println("index: " + index);
- //System.out.println("record: " + recordNumber);
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- if (index == 18) {
- int a = 1;
- a = a + 1;
- }
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- if (recordNumber == 4096) {
- int a = 1;
- a = a + 1;
- }
+// // DO NOT REMOVE
+// int index = reader.getIndex();
+// //System.out.println("index: " + index);
+// //System.out.println("record: " + recordNumber);
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (index == 18) {
+// int a = 1;
+// a = a + 1;
+// }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (recordNumber == 4096) {
+// int a = 1;
+// a = a + 1;
+// }
recordLength = reader.parseUnsignedShortVal();
PdbByteReader recordReader = reader.getSubPdbByteReader(recordLength);
recordReader.markAlign(2);
@@ -304,14 +307,14 @@ public abstract class AbstractTypeProgramInterface {
builder.append("Record: ");
builder.append(recordNum);
builder.append("\n");
-
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- if (recordNum == -2) {
- int a = 1;
- a = a + 1;
- }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (recordNum == -2) {
+// int a = 1;
+// a = a + 1;
+// }
if (type != null) {
builder.append(type.getClass().getSimpleName());
builder.append("\n");
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/CategoryIndex.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/CategoryIndex.java
index 27ded85c3d..b8bb9774ed 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/CategoryIndex.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/CategoryIndex.java
@@ -16,7 +16,7 @@
package ghidra.pdb.pdbreader;
/**
- * The CategoryIndex is used for creating dependency order of types, items, and symbols.
+ * This class is used for creating dependency order of types, items, and symbols.
* Dependency order is not a PDB feature. It is something we added (and might be removed
* in the future) as we have investigated how to analyze and apply the PDB.
* <P>
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/DatabaseInterfaceNew.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/DatabaseInterfaceNew.java
index df2529a96a..bff14414e1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/DatabaseInterfaceNew.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/DatabaseInterfaceNew.java
@@ -222,14 +222,14 @@ public class DatabaseInterfaceNew extends AbstractDatabaseInterface {
*/
@SuppressWarnings("unused") // substreamReader
protected void processTypeServerMap(PdbByteReader reader, boolean skip) throws PdbException {
- // Following for developmental investigation. Set breakpoint on 'a = 1' line.
- if (lengthTypeServerMapSubstream != 0) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (lengthTypeServerMapSubstream != 0) {
+// int a = 1;
+// a = a + 1;
+// }
if (lengthTypeServerMapSubstream == 0) {
return;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/NameTable.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/NameTable.java
index e2661f7f9d..3bb5671946 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/NameTable.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/NameTable.java
@@ -75,7 +75,7 @@ public class NameTable {
}
/**
- * Returns an index of the name argument in the NameTable.
+ * Returns an index of the name argument in the {@link NameTable}.
* @param name Name to look up.
* @return Index of the name.
*/
@@ -87,7 +87,7 @@ public class NameTable {
/**
* Returns a name from the Name Table pertaining to the byte-offset in the block of names for
* the table.
- * @param offset Byte-offset of the name in the NameTable block.
+ * @param offset Byte-offset of the name in the {@link NameTable} block.
* @return Name found at offset.
*/
public String getNameStringFromOffset(int offset) {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset16.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset16.java
index b62b1295b1..4c52bfecfe 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset16.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset16.java
@@ -19,7 +19,7 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
/**
- * Class extending {@link AbstractOffset} that has has its value serialized as a 2-byte unsigned
+ * Class extending {@link AbstractOffset} that has has its value serialized as a 2-byte signed
* short.
*/
public class Offset16 extends AbstractOffset {
@@ -28,8 +28,8 @@ public class Offset16 extends AbstractOffset {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- offsetVal = reader.parseUnsignedShortVal();
+ protected int doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseUnsignedShortVal();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset32.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset32.java
index fef5deff43..fbd1afd825 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset32.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/Offset32.java
@@ -19,7 +19,7 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
/**
- * Class extending {@link AbstractOffset} that has has its value serialized as a 4-byte unsigned
+ * Class extending {@link AbstractOffset} that has has its value serialized as a 4-byte signed
* int.
*/
public class Offset32 extends AbstractOffset {
@@ -28,8 +28,8 @@ public class Offset32 extends AbstractOffset {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- offsetVal = reader.parseUnsignedIntVal();
+ protected int doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseInt();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SegmentMapDescription.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SegmentMapDescription.java
index c720f1c690..beaebe372b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SegmentMapDescription.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SegmentMapDescription.java
@@ -43,7 +43,7 @@ public class SegmentMapDescription {
// API
//==============================================================================================
/**
- * Deserializes the SegmentMapDescription.
+ * Deserializes the {@link SegmentMapDescription}.
* @param substreamReader {@link PdbByteReader} from which to deserialize the data.
* @throws PdbException Upon not enough data left to parse.
*/
@@ -62,7 +62,7 @@ public class SegmentMapDescription {
// Package-Protected Internals
//==============================================================================================
/**
- * Dumps the SegmentMapDescription. This method is for debugging only.
+ * Dumps the {@link SegmentMapDescription}. This method is for debugging only.
* @return {@link String} of pretty output.
*/
protected String dump() {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringNt.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringNt.java
index 84aef09c04..d2834fedae 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringNt.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringNt.java
@@ -27,8 +27,8 @@ public class StringNt extends AbstractString {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- string = reader.parseNullTerminatedString();
+ protected String doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseNullTerminatedString();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringSt.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringSt.java
index 31d924d946..473aeb5694 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringSt.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringSt.java
@@ -28,8 +28,8 @@ public class StringSt extends AbstractString {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- string = reader.parseByteLengthPrefixedString();
+ protected String doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseByteLengthPrefixedString();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8Nt.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8Nt.java
index 831376330f..5b0ac45a9c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8Nt.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8Nt.java
@@ -27,8 +27,8 @@ public class StringUtf8Nt extends AbstractString {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- string = reader.parseNullTerminatedUtf8String();
+ protected String doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseNullTerminatedUtf8String();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8St.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8St.java
index 225b5be509..ad5bd7a2ab 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8St.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringUtf8St.java
@@ -28,8 +28,8 @@ public class StringUtf8St extends AbstractString {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- string = reader.parseByteLengthPrefixedUtf8String();
+ protected String doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseByteLengthPrefixedUtf8String();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringWcharNt.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringWcharNt.java
index 4a38d6d636..f5dc04e4ef 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringWcharNt.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/StringWcharNt.java
@@ -28,8 +28,8 @@ public class StringWcharNt extends AbstractString {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- string = reader.parseNullTerminatedWcharString();
+ protected String doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseNullTerminatedWcharString();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolParser.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolParser.java
index bea69f963b..31216626d2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolParser.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolParser.java
@@ -295,32 +295,35 @@ public class SymbolParser {
*/
private AbstractMsSymbol parseRecord(int symbolTypeId, PdbByteReader reader)
throws PdbException {
- //System.out.println(reader.dump(0x200));
- if (symbolTypeId == 0x204) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- if (symbolTypeId >= 0x1000 && symbolTypeId < 0x1100) {
- if (symbolTypeId != 0x1012) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
+// //System.out.println(reader.dump(0x200));
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (symbolTypeId == 0x204) {
+// int a = 1;
+// a = a + 1;
+// }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (symbolTypeId >= 0x1000 && symbolTypeId < 0x1100) {
+// if (symbolTypeId != 0x1012) {
+// int a = 1;
+// a = a + 1;
+// }
+// }
if (!symbolTypesSeen.contains(symbolTypeId)) {
newSymbolTypesSeen.add(symbolTypeId);
- //System.out.println(String.format("Symbol Type not seen before: %04x", symbolTypeId));
- // Set break point on instruction below to trigger on any symbol types that we
- // have not seen in real data. Then step through the parsing for these new
- // symbol types to confirm that our parsing and the real data agree. Also, comment
- // in the line above to show the ID for this type whenever desired.
- int a = 1;
- a = a + 1;
+// //System.out.println(String.format("Symbol Type not seen before: %04x", symbolTypeId));
+// // DO NOT REMOVE
+// // Set break point on instruction below to trigger on any symbol types that we
+// // have not seen in real data. Then step through the parsing for these new
+// // symbol types to confirm that our parsing and the real data agree. Also, comment
+// // in the line above to show the ID for this type whenever desired.
+// int a = 1;
+// a = a + 1;
}
AbstractMsSymbol symbol = null;
@@ -632,9 +635,9 @@ public class SymbolParser {
// case Label32MsSymbol.PDB_ID:
// symbol = new Label32MsSymbol(pdb, reader);
// break;
-// case RegisterMsSymbol.PDB_ID:
-// symbol = new RegisterMsSymbol(pdb, reader);
-// break;
+ case RegisterMsSymbol.PDB_ID:
+ symbol = new RegisterMsSymbol(pdb, reader);
+ break;
// case ConstantMsSymbol.PDB_ID:
// symbol = new ConstantMsSymbol(pdb, reader);
// break;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolRecords.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolRecords.java
index 8f1c2883e3..94dc37646e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolRecords.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/SymbolRecords.java
@@ -50,7 +50,7 @@ public class SymbolRecords {
//==============================================================================================
/**
* Constructor.
- * @param pdb {@link AbstractPdb} to which the SymbolRecords belong.
+ * @param pdb {@link AbstractPdb} to which the {@link SymbolRecords} belong.
*/
public SymbolRecords(AbstractPdb pdb) {
this.pdb = pdb;
@@ -155,16 +155,17 @@ public class SymbolRecords {
SymbolParser parser = pdb.getSymbolParser();
List<AbstractMsSymbol> mySymbolList = new ArrayList<>();
while (reader.hasMore()) {
+// //System.out.println("Symbol Record: " + recordNumber);
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// if (recordNumber == 839) {
+// int a = 1;
+// a = a + 1;
+// //System.out.println(reader.dump(0x200));
+// }
// Including length in byte array for alignment purposes.
- //System.out.println("Symbol Record: " + recordNumber);
- if (recordNumber == 839) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- //System.out.println(reader.dump(0x200));
- }
int recordLength = reader.parseUnsignedShortVal();
PdbByteReader recordReader = reader.getSubPdbByteReader(recordLength);
pdb.pushDependencyStack(
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex16.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex16.java
index 8109ff262c..0db1c70b6f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex16.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex16.java
@@ -28,8 +28,8 @@ public class TypeIndex16 extends AbstractTypeIndex {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- indexVal = reader.parseUnsignedShortVal();
+ protected int doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseUnsignedShortVal();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex32.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex32.java
index 95145cb1ee..2b3776f69d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex32.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeIndex32.java
@@ -19,11 +19,12 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
/**
- * Class extending {@link AbstractTypeIndex} that has has its value serialized as a 4-byte int.
+ * Class extending {@link AbstractTypeIndex} that has has its value serialized as a 4-byte signed
+ * int.
* <P>
- * In reality, it should probably be a 4-byte unsigned int, but we would have to store this
- * value in a java long, and java indexes by integers instead of longs, so we made this
- * concession.
+ * In reality, according to the API, it should be a 4-byte unsigned int, but we would have to
+ * store this value in a java long, and java indexes by integers instead of longs, so we made
+ * this concession.
*/
public class TypeIndex32 extends AbstractTypeIndex {
@@ -31,8 +32,8 @@ public class TypeIndex32 extends AbstractTypeIndex {
// Abstract Methods
//==============================================================================================
@Override
- public void parse(PdbByteReader reader) throws PdbException {
- indexVal = reader.parseInt();
+ protected int doParse(PdbByteReader reader) throws PdbException {
+ return reader.parseInt();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeParser.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeParser.java
index 382836f80e..cf779fff57 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeParser.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeParser.java
@@ -244,13 +244,14 @@ public class TypeParser {
if (!dataTypesSeen.contains(dataTypeId)) {
newDataTypesSeen.add(dataTypeId);
- //System.out.println(String.format("Data Type not seen before: %04x", dataTypeId));
- // Set break point on instruction below to trigger on any data types that we
- // have not seen in real data. Then step through the parsing for these new
- // data types to confirm that our parsing and the real data agree. Also, comment
- // in the line above to show the ID for this type whenever desired.
- int a = 1;
- a = a + 1;
+// //System.out.println(String.format("Data Type not seen before: %04x", dataTypeId));
+// // DO NOT REMOVE
+// // Set break point on instruction below to trigger on any data types that we
+// // have not seen in real data. Then step through the parsing for these new
+// // data types to confirm that our parsing and the real data agree. Also, comment
+// // in the line above to show the ID for this type whenever desired.
+// int a = 1;
+// a = a + 1;
}
AbstractMsType type = null;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface200.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface200.java
index 317a89babb..d41991a241 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface200.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface200.java
@@ -78,7 +78,7 @@ public class TypeProgramInterface200 extends AbstractTypeProgramInterface {
* Note: not all values are initialized. This is a dummy constructor used to create a dummy
* {@link AbstractTypeProgramInterface}.
* Note: not all values are initialized.
- * @param pdb {@link AbstractPdb} that owns this TypeProgramInterface.
+ * @param pdb {@link AbstractPdb} that owns this {@link AbstractTypeProgramInterface}.
* @param typeIndexMin The IndexMin to set/use.
* @param typeIndexMaxExclusive One greater than the MaxIndex to set/use.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface500.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface500.java
index 0506dc6f7a..0c5c83cdd1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface500.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterface500.java
@@ -74,9 +74,9 @@ public class TypeProgramInterface500 extends AbstractTypeProgramInterface {
/**
* IMPORTANT: This method is for testing only. It allows us to set a basic object.
* Note: not all values are initialized. This is a dummy constructor used to create a dummy
- * AbstractTypeProgramInterface.
+ * {@link AbstractTypeProgramInterface}.
* Note: not all values are initialized.
- * @param pdb {@link AbstractPdb} that owns this TypeProgramInterface.
+ * @param pdb {@link AbstractPdb} that owns this {@link AbstractTypeProgramInterface}.
* @param typeIndexMin The IndexMin to set/use.
* @param typeIndexMaxExclusive One greater than the MaxIndex to set/use.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterfaceParser.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterfaceParser.java
index 96a7520574..3aef29ae65 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterfaceParser.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/TypeProgramInterfaceParser.java
@@ -47,11 +47,12 @@ public class TypeProgramInterfaceParser {
// API
//==============================================================================================
/**
- * Parses information to determine the version of TypeProgramInterface to create.
- * @param pdb {@link AbstractPdb} that owns this TypeProgramInterface.
+ * Parses information to determine the version of {@link AbstractTypeProgramInterface} to
+ * create.
+ * @param pdb {@link AbstractPdb} that owns this {@link AbstractTypeProgramInterface}.
* @param monitor {@link TaskMonitor} used for checking cancellation.
- * @return AbstractTypeProgramInterface of the appropriate TypeProgramInterface, or null
- * if the stream does not have enough information to be parsed.
+ * @return the appropriate {@link AbstractTypeProgramInterface} or null if the stream does
+ * not have enough information to be parsed.
* @throws IOException On file seek or read, invalid parameters, bad file configuration, or
* inability to read required bytes.
* @throws PdbException Upon error in processing components.
@@ -73,9 +74,9 @@ public class TypeProgramInterfaceParser {
int versionNumber = AbstractTypeProgramInterface.deserializeVersionNumber(reader);
// TODO: we do not know where the line should be drawn for each of these
- // TypeProgramInterface instantiations. Had a TI50_ID that was not an 800 instead
- // of a 500. Also believe that TI42_ID was seen to have 500. Rest is guess until
- // we can validate with real data.
+ // AbstractTypeProgramInterface instantiations. Had a TI50_ID that was not an 800
+ // instead of a 500. Also believe that TI42_ID was seen to have 500. Rest is guess
+ // until we can validate with real data.
switch (versionNumber) {
case TI20_ID:
case TI40_ID:
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractMsSymbol.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractMsSymbol.java
index 80bb765b90..e3ddbad55e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractMsSymbol.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractMsSymbol.java
@@ -20,9 +20,25 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
/**
- * This class extends {@link AbstractParsableItem} as is the base class for PDB Symbol units.
+ * This is the abstract class for PDB Symbol units.
+ * <P>
+ * For more information about PDBs, consult the Microsoft PDB API, see
+ * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
+ * What's inside a PDB File</a>.
+ * <P>
+ * To track back to the documented API, search the above URL for where the documentation is
+ * located as "code." Use the value of the PDB_ID for any class derived from this class to
+ * search the API code, being careful to look for symbol types instead of data types. (Note
+ * that "PDB_ID" is not API terminology.) Once found, you can use the defined label to find
+ * the structure that describes the layout of the serialized data; searching for that structure
+ * name can sometimes lead to methods that output information about these structures (a buffer
+ * pointer is cast to the structure pointer, leading to the ability to interpret the fields).
+ * <P>
+ * Enjoy!!!
*/
public abstract class AbstractMsSymbol extends AbstractParsableItem {
+ // The following commented-out code is used when trying to discern which SYMBOL types were
+ // not yet implemented.
//private static final Class[] parameterTypes = { StringBuilder.class };
protected AbstractPdb pdb;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractRegisterMsSymbol.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractRegisterMsSymbol.java
index 720591c82d..af5ac0204c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractRegisterMsSymbol.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractRegisterMsSymbol.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB symbol types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>
- */
public abstract class AbstractRegisterMsSymbol extends AbstractMsSymbol {
protected AbstractTypeIndex typeIndex;
@@ -44,7 +37,7 @@ public abstract class AbstractRegisterMsSymbol extends AbstractMsSymbol {
typeIndex.parse(reader);
pdb.pushDependencyStack(new CategoryIndex(CategoryIndex.Category.DATA, typeIndex.get()));
pdb.popDependencyStack();
- parseRegister(reader);
+ register = parseRegister(reader);
name.parse(reader);
reader.align4();
}
@@ -62,15 +55,18 @@ public abstract class AbstractRegisterMsSymbol extends AbstractMsSymbol {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex} and {@link #name}.
*/
protected abstract void create();
/**
* Parses the register field for this symbol.
* @param reader {@link PdbByteReader} from which the data is parsed.
+ * @return The register field.
* @throws PdbException Upon not enough data left to parse.
*/
- protected abstract void parseRegister(PdbByteReader reader) throws PdbException;
+ protected abstract RegisterName parseRegister(PdbByteReader reader) throws PdbException;
/**
* Emits the register information to the {@link StringBuilder}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractUnknownMsSymbol.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractUnknownMsSymbol.java
index c1b314d498..c5a2bb2241 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractUnknownMsSymbol.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/AbstractUnknownMsSymbol.java
@@ -18,16 +18,6 @@ package ghidra.pdb.pdbreader.symbol;
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB symbol types that share certain information.
- * <P>
- * This class represents all symbols that are not documented in the API; this gives us a way
- * to represent them as a class.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>
- */
public abstract class AbstractUnknownMsSymbol extends AbstractMsSymbol {
/**
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/BadMsSymbol.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/BadMsSymbol.java
index 3f87a954a7..e1dffe1dfc 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/BadMsSymbol.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/BadMsSymbol.java
@@ -18,8 +18,6 @@ package ghidra.pdb.pdbreader.symbol;
import ghidra.pdb.pdbreader.AbstractPdb;
/**
- * This class extends {@link AbstractMsSymbol}.
- * <P>
* Important: This is not a real symbol. This "Bad" symbol takes the place of a symbol that has
* encountered a parsing issue vis-a-vis a PdbException.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterMsSymbol.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterMsSymbol.java
index 56e6bb7363..4e2bccea9f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterMsSymbol.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterMsSymbol.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB symbol type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>
- */
public class RegisterMsSymbol extends AbstractRegisterMsSymbol {
public static final int PDB_ID = 0x1106;
@@ -52,8 +45,8 @@ public class RegisterMsSymbol extends AbstractRegisterMsSymbol {
}
@Override
- protected void parseRegister(PdbByteReader reader) throws PdbException {
- register = new RegisterName(pdb, reader.parseUnsignedShortVal());
+ protected RegisterName parseRegister(PdbByteReader reader) throws PdbException {
+ return new RegisterName(pdb, reader.parseUnsignedShortVal());
}
@Override
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterName.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterName.java
index 403ab61821..2e9413ccfe 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterName.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/symbol/RegisterName.java
@@ -23,12 +23,6 @@ import ghidra.pdb.pdbreader.AbstractPdb;
/**
* Register Name component for certain PDB symbols.
- * <P>
- * Class describes the function return method.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>
*/
public class RegisterName extends AbstractParsableItem {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractAliasMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractAliasMsType.java
index 7564dda50e..f683542136 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractAliasMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractAliasMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractAliasMsType extends AbstractMsType {
protected AbstractTypeIndex underlyingTypeIndex;
@@ -59,6 +52,8 @@ public abstract class AbstractAliasMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArgumentsListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArgumentsListMsType.java
index edf6750f79..64f4e4db2d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArgumentsListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArgumentsListMsType.java
@@ -15,22 +15,14 @@
*/
package ghidra.pdb.pdbreader.type;
-import java.util.ArrayList;
import java.util.List;
import ghidra.pdb.*;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractArgumentsListMsType extends AbstractMsType {
- protected List<AbstractTypeIndex> argTypeIndexList = new ArrayList<>();
+ protected List<AbstractTypeIndex> argTypeIndexList;
/**
* Constructor for this type.
@@ -40,7 +32,7 @@ public abstract class AbstractArgumentsListMsType extends AbstractMsType {
*/
public AbstractArgumentsListMsType(AbstractPdb pdb, PdbByteReader reader) throws PdbException {
super(pdb, reader);
- parseTypeIndexList(reader);
+ argTypeIndexList = parseTypeIndexList(reader);
for (AbstractTypeIndex index : argTypeIndexList) {
pdb.pushDependencyStack(new CategoryIndex(CategoryIndex.Category.DATA, index.get()));
pdb.popDependencyStack();
@@ -48,8 +40,8 @@ public abstract class AbstractArgumentsListMsType extends AbstractMsType {
}
/**
- * Returns List<AbstractTypeIndex> of indices in the argument list.
- * @return List<AbstractTypeIndex>
+ * Returns {@link List}<{@link AbstractTypeIndex}> of indices in the argument list.
+ * @return Indices of arguments in the arguments list.
*/
public List<AbstractTypeIndex> getArgTypeIndexList() {
return argTypeIndexList;
@@ -69,8 +61,10 @@ public abstract class AbstractArgumentsListMsType extends AbstractMsType {
/**
* Abstract internal method to parse the type index list.
* @param reader {@link PdbByteReader} that is deserialized.
+ * @return Type indices.
* @throws PdbException Upon not enough data left to parse.
*/
- protected abstract void parseTypeIndexList(PdbByteReader reader) throws PdbException;
+ protected abstract List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader)
+ throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArrayMsType.java
index fca4d9947e..2451b97b11 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractArrayMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractArrayMsType extends AbstractMsType {
protected AbstractTypeIndex elementTypeIndex;
@@ -120,6 +113,9 @@ public abstract class AbstractArrayMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #elementTypeIndex}, {@link #indexTypeIndex},
+ * and {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBaseClassMsType.java
index a8c3e754c7..313d23f0ef 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBaseClassMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractBaseClassMsType extends AbstractMsType {
protected AbstractTypeIndex baseClassIndex;
@@ -61,11 +54,16 @@ public abstract class AbstractBaseClassMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #baseClassIndex}.
*/
protected abstract void create();
/**
* Parses the fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attribute}; also parse {@link #baseClassIndex} and {@link #offset}.
* @param reader {@link PdbByteReader} from which data is parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBasicArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBasicArrayMsType.java
index c4fea24ec1..f890d6832e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBasicArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBasicArrayMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractBasicArrayMsType extends AbstractMsType {
protected AbstractTypeIndex underlyingTypeIndex;
@@ -66,6 +59,8 @@ public abstract class AbstractBasicArrayMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #underlyingTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBitfieldMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBitfieldMsType.java
index 0792e8ce46..48a353b1ca 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBitfieldMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractBitfieldMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractBitfieldMsType extends AbstractMsType {
protected AbstractTypeIndex elementTypeIndex;
@@ -84,11 +77,16 @@ public abstract class AbstractBitfieldMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #elementTypeIndex}.
*/
protected abstract void create();
/**
* Parses the fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #elementTypeIndex}, {@link #length}, and {@link #position}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractClassMsType.java
index 1a953310d6..eda056788c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractClassMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractClassMsType extends AbstractCompositeMsType {
private static final String TYPE_STRING = "class";
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCobol0MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCobol0MsType.java
index f1d51ded7e..9c9453699a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCobol0MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCobol0MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractCobol0MsType extends AbstractMsType {
protected AbstractTypeIndex parentTypeIndex;
@@ -65,6 +58,8 @@ public abstract class AbstractCobol0MsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #parentTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCompositeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCompositeMsType.java
index 7b79f2be79..a8207f364a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCompositeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractCompositeMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractCompositeMsType extends AbstractMsType {
protected int count;
@@ -136,9 +129,6 @@ public abstract class AbstractCompositeMsType extends AbstractMsType {
* @return {@link AbstractMsType} type of the field type or null if none.
*/
public AbstractMsType getFieldDescriptorListType() {
- if (fieldDescriptorListTypeIndex.get() == 0) {
- return null;
- }
return pdb.getTypeRecord(fieldDescriptorListTypeIndex.get());
}
@@ -155,17 +145,29 @@ public abstract class AbstractCompositeMsType extends AbstractMsType {
myBuilder.append(property);
myBuilder.append(">");
AbstractMsType fieldType = getFieldDescriptorListType();
- if (fieldType != null) {
- myBuilder.append(fieldType);
- }
+ myBuilder.append(fieldType);
myBuilder.append(" ");
builder.insert(0, myBuilder);
}
+ /**
+ * Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #fieldDescriptorListTypeIndex}, {@link #name},
+ * and {@link #mangledName}. It can optionally initialize {@link #derivedFromListTypeIndex}
+ * and {@link #vShapeTableTypeIndex}, but if it does, it must also make sure they are
+ * parsed in {@link #parseFields(PdbByteReader)}.
+ */
protected abstract void create();
/**
* Parsed the fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #property}; also parse {@link #count}, {@link #fieldDescriptorListTypeIndex},
+ * and {@link #size}; and optionally parse, if non-pad data present--and in the appropriate
+ * interspersed order, {@link #derivedFromListTypeIndex}, {@link #vShapeTableTypeIndex},
+ * {@link #name}, and {@link #mangledName}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException upon error parsing a field.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDefaultArgumentsMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDefaultArgumentsMsType.java
index 6ef4374af4..daec73462b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDefaultArgumentsMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDefaultArgumentsMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDefaultArgumentsMsType extends AbstractMsType {
protected AbstractTypeIndex typeIndex;
@@ -56,6 +49,8 @@ public abstract class AbstractDefaultArgumentsMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex} and {@link #expression}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDerivedClassListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDerivedClassListMsType.java
index 1f32c9b53d..0f54d7f70d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDerivedClassListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDerivedClassListMsType.java
@@ -15,22 +15,14 @@
*/
package ghidra.pdb.pdbreader.type;
-import java.util.ArrayList;
import java.util.List;
import ghidra.pdb.*;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDerivedClassListMsType extends AbstractMsType {
- protected List<AbstractTypeIndex> typeIndexList = new ArrayList<>();
+ protected List<AbstractTypeIndex> typeIndexList;
/**
* Constructor for this type.
@@ -41,7 +33,7 @@ public abstract class AbstractDerivedClassListMsType extends AbstractMsType {
public AbstractDerivedClassListMsType(AbstractPdb pdb, PdbByteReader reader)
throws PdbException {
super(pdb, reader);
- parseTypeIndexList(reader);
+ typeIndexList = parseTypeIndexList(reader);
for (AbstractTypeIndex typeIndex : typeIndexList) {
pdb.pushDependencyStack(
new CategoryIndex(CategoryIndex.Category.DATA, typeIndex.get()));
@@ -61,8 +53,10 @@ public abstract class AbstractDerivedClassListMsType extends AbstractMsType {
/**
* Parses the Type Index List.
* @param reader {@link PdbByteReader} that is deserialized.
+ * @return Type indices.
* @throws PdbException Upon not enough data left to parse.
*/
- protected abstract void parseTypeIndexList(PdbByteReader reader) throws PdbException;
+ protected abstract List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader)
+ throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsLowerUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsLowerUpperMsType.java
index e17d2a8a2e..25f8dafde3 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsLowerUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsLowerUpperMsType.java
@@ -19,15 +19,10 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDimensionedArrayConstBoundsLowerUpperMsType extends AbstractMsType {
+ // Appears to be number of dimensions--independence of which cannot be guaranteed to determine
+ // a true "rank."
protected int rank;
protected AbstractTypeIndex typeIndex;
// TODO: dimData is unknown. Needs analysis and implementation break-out.
@@ -48,6 +43,15 @@ public abstract class AbstractDimensionedArrayConstBoundsLowerUpperMsType extend
pdb.pushDependencyStack(new CategoryIndex(CategoryIndex.Category.DATA, typeIndex.get()));
pdb.popDependencyStack();
// TODO: fix all of this once we know the true size of each (assuming it is fixed).
+ /**
+ * For now, we are assuming that the amount of data left will be a multiple of 2 times
+ * (one of {@link lowerBound} and one for {@link upperBound}--see
+ * {@link AbstractDimensionedArrayConstBoundsUpperMsType} for 1 times) the size of the
+ * integral element containing the value. We do not know the size of the integral
+ * element, so we: assert on the assumption of "a multiple," then we determine the number
+ * of bytes of the integrals type (the {@link size}), and we switch on that size to parse
+ * the values.
+ */
byte[] remainingData = reader.parseBytesRemaining();
PdbByteReader boundsReader = new PdbByteReader(remainingData);
int length = remainingData.length;
@@ -100,11 +104,16 @@ public abstract class AbstractDimensionedArrayConstBoundsLowerUpperMsType extend
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex}.
*/
protected abstract void create();
/**
* Parsed the beginning fields of this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #rank} and {@link #typeIndex}.
* @param reader {@link PdbByteReader} from which the data is parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsUpperMsType.java
index f69ffa4e94..7703e7d065 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayConstBoundsUpperMsType.java
@@ -19,15 +19,10 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDimensionedArrayConstBoundsUpperMsType extends AbstractMsType {
+ // Appears to be number of dimensions--independence of which cannot be guaranteed to determine
+ // a true "rank."
protected int rank;
protected AbstractTypeIndex typeIndex;
// TODO: dimData is unknown. Needs analysis and implementation break-out.
@@ -47,6 +42,14 @@ public abstract class AbstractDimensionedArrayConstBoundsUpperMsType extends Abs
pdb.pushDependencyStack(new CategoryIndex(CategoryIndex.Category.DATA, typeIndex.get()));
pdb.popDependencyStack();
// TODO: fix all of this once we know the true size of each (assuming it is fixed).
+ /**
+ * For now, we are assuming that the amount of data left will be a multiple of 1 times
+ * (the {@link upperBound}--see {@link AbstractDimensionedArrayConstBoundsLowerUpperMsType}
+ * for 2 times) the size of the integral element containing the value. We do not know the
+ * size of the integral element, so we: assert on the assumption of "a multiple" (mod 0),
+ * then we determine the number of bytes of the integrals type (the {@link size}), and
+ * we switch on that size to parse the values.
+ */
byte[] remainingData = reader.parseBytesRemaining();
PdbByteReader boundsReader = new PdbByteReader(remainingData);
int length = remainingData.length;
@@ -92,11 +95,16 @@ public abstract class AbstractDimensionedArrayConstBoundsUpperMsType extends Abs
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #rank} and {@link #typeIndex}.
* @param reader {@link PdbByteReader} from which the beginning fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayMsType.java
index d36c2ea323..bcde766973 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDimensionedArrayMsType extends AbstractMsType {
protected AbstractTypeIndex elementTypeIndex;
@@ -96,6 +89,9 @@ public abstract class AbstractDimensionedArrayMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #elementTypeIndex}, {@link #dimensionInformation},
+ * and {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsLowerUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsLowerUpperMsType.java
index daabc8231f..5777ccbcb5 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsLowerUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsLowerUpperMsType.java
@@ -22,15 +22,10 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDimensionedArrayVarBoundsLowerUpperMsType extends AbstractMsType {
+ // Appears to be number of dimensions--independence of which cannot be guaranteed to determine
+ // a true "rank."
protected int rank;
protected AbstractTypeIndex typeIndex;
// TODO: dim is unknown. Needs analysis and implementation break-out.
@@ -83,11 +78,16 @@ public abstract class AbstractDimensionedArrayVarBoundsLowerUpperMsType extends
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #rank} and {@link #typeIndex}.
* @param reader {@link PdbByteReader} from which the beginning fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsUpperMsType.java
index c19ca5a14d..d3270474e2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractDimensionedArrayVarBoundsUpperMsType.java
@@ -22,15 +22,10 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractDimensionedArrayVarBoundsUpperMsType extends AbstractMsType {
+ // Appears to be number of dimensions--independence of which cannot be guaranteed to determine
+ // a true "rank."
protected int rank;
protected AbstractTypeIndex typeIndex;
// TODO: dim is unknown. Needs analysis and implementation break-out.
@@ -75,11 +70,16 @@ public abstract class AbstractDimensionedArrayVarBoundsUpperMsType extends Abstr
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #typeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #rank} and {@link #typeIndex}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumMsType.java
index 45934eb169..2f38bbae74 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractEnumMsType extends AbstractMsType {
protected int numElements;
@@ -117,11 +110,18 @@ public abstract class AbstractEnumMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #fieldDescriptorListTypeIndex},
+ * {@link #underlyingTypeIndex}, and {@link #name}.
*/
protected abstract void create();
/**
* Parses the fields of the enum type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #property}; also parse {@link #numElements}, {@link #underlyingTypeIndex},
+ * {@link #fieldDescriptorListTypeIndex}, and {@link #name}.
* @param reader {@link PdbByteReader} from which to parse the fields.
* @throws PdbException upon error parsing a field.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumerateMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumerateMsType.java
index 7d8d837fc8..8870ea15ea 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumerateMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractEnumerateMsType.java
@@ -22,13 +22,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractString;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractEnumerateMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -79,6 +72,8 @@ public abstract class AbstractEnumerateMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFieldListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFieldListMsType.java
index 8c28a963aa..92fe237aa7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFieldListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFieldListMsType.java
@@ -21,13 +21,6 @@ import java.util.List;
import ghidra.pdb.*;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractFieldListMsType extends AbstractMsType {
private List<AbstractMsType> nameSpaceList = new ArrayList<>();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendClassMsType.java
index e42fe79b54..5027165942 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendClassMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractFriendClassMsType extends AbstractMsType {
protected AbstractTypeIndex friendClassTypeIndex;
@@ -55,6 +48,8 @@ public abstract class AbstractFriendClassMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #friendClassTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendFunctionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendFunctionMsType.java
index a517057da8..a4eafc195d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendFunctionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractFriendFunctionMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractFriendFunctionMsType extends AbstractMsType {
protected AbstractTypeIndex friendTypeIndex;
@@ -58,11 +51,16 @@ public abstract class AbstractFriendFunctionMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #friendTypeIndex} and {@link #name}.
*/
protected abstract void create();
/**
* Parsed the fields of this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #friendTypeIndex} and {@link #name}.
* @param reader {@link PdbByteReader} from which to parse the fields.
* @throws PdbException upon error parsing a field.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndexMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndexMsType.java
index b336f7561e..358e2687fb 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndexMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndexMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractTypeIndex;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractIndexMsType extends AbstractMsType {
protected AbstractTypeIndex referencedTypeIndex;
@@ -53,11 +46,16 @@ public abstract class AbstractIndexMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #referencedTypeIndex}.
*/
protected abstract void create();
/**
* Parses fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #referencedTypeIndex} and optional padding.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndirectVirtualBaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndirectVirtualBaseClassMsType.java
index cd1b256483..90a0eb88fd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndirectVirtualBaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractIndirectVirtualBaseClassMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractIndirectVirtualBaseClassMsType extends AbstractMsType {
protected AbstractTypeIndex directVirtualBaseClassTypeIndex;
@@ -79,11 +72,18 @@ public abstract class AbstractIndirectVirtualBaseClassMsType extends AbstractMsT
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #directVirtualBaseClassTypeIndex} and
+ * {@link #virtualBasePointerTypeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attribute}; also parse {@link #directVirtualBaseClassTypeIndex} and
+ * {@link #virtualBasePointerTypeIndex}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractManagedMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractManagedMsType.java
index 39264a363c..83a0899f3f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractManagedMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractManagedMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractString;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractManagedMsType extends AbstractMsType {
protected AbstractString name;
@@ -52,6 +45,8 @@ public abstract class AbstractManagedMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberFunctionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberFunctionMsType.java
index 9700b7b2c0..28d8cd61e2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberFunctionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberFunctionMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractMemberFunctionMsType extends AbstractMsType {
protected AbstractTypeIndex returnValueTypeIndex;
@@ -169,6 +162,10 @@ public abstract class AbstractMemberFunctionMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #returnValueTypeIndex},
+ * {@link #containingClassTypeIndex}, {@link #thisPointerTypeIndex}, and
+ * {@link #argListTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberModifyMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberModifyMsType.java
index 211de42e43..4f052067d9 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberModifyMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberModifyMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractMemberModifyMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -64,6 +57,8 @@ public abstract class AbstractMemberModifyMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberMsType.java
index b48b0d2c73..580ef24634 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMemberMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractMemberMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -101,11 +94,16 @@ public abstract class AbstractMemberMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #fieldTypeRecordIndex} and {@link #name}.
*/
protected abstract void create();
/**
* Parses the inital fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attribute}; also parse {@link #fieldTypeRecordIndex}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodListMsType.java
index ec72259f1e..c6fd8285b8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodListMsType.java
@@ -21,16 +21,9 @@ import java.util.List;
import ghidra.pdb.*;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractMethodListMsType extends AbstractMsType {
- protected List<AbstractMethodRecordMs> list = new ArrayList<>();
+ protected List<AbstractMethodRecordMs> methodRecords = new ArrayList<>();
/**
* Constructor for this type.
@@ -42,7 +35,7 @@ public abstract class AbstractMethodListMsType extends AbstractMsType {
super(pdb, reader);
while (reader.hasMore()) {
AbstractMethodRecordMs record = parseOneRecord(pdb, reader);
- list.add(record);
+ methodRecords.add(record);
}
}
@@ -51,7 +44,7 @@ public abstract class AbstractMethodListMsType extends AbstractMsType {
* @return Size of the methods.
*/
public int getListSize() {
- return list.size();
+ return methodRecords.size();
}
@Override
@@ -59,7 +52,7 @@ public abstract class AbstractMethodListMsType extends AbstractMsType {
// Making this up; no API for output.
DelimiterState ds = new DelimiterState("", ",");
builder.append("{");
- for (AbstractMethodRecordMs record : list) {
+ for (AbstractMethodRecordMs record : methodRecords) {
builder.append(ds.out(true, record.toString()));
}
builder.append("}");
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodRecordMs.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodRecordMs.java
index 6e67d2d1f0..320173db49 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodRecordMs.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMethodRecordMs.java
@@ -19,11 +19,7 @@ import ghidra.pdb.*;
import ghidra.pdb.pdbreader.*;
/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
+ * An abstract class for Method Record attributes used for various specific PDB data type.
*/
public abstract class AbstractMethodRecordMs extends AbstractParsableItem {
@@ -63,11 +59,16 @@ public abstract class AbstractMethodRecordMs extends AbstractParsableItem {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #procedureRecordNumber}.
*/
protected abstract void create();
/**
* Parses the fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attributes}; also parse {@link #procedureRecordNumber} and {@link #optionalOffset}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractModifierMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractModifierMsType.java
index 173d51525d..6e0748bf68 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractModifierMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractModifierMsType.java
@@ -19,16 +19,11 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractModifierMsType extends AbstractMsType {
protected AbstractTypeIndex modifiedTypeIndex;
+ protected int attributes;
+
protected boolean isConst;
protected boolean isVolatile;
protected boolean isUnaligned;
@@ -43,6 +38,7 @@ public abstract class AbstractModifierMsType extends AbstractMsType {
super(pdb, reader);
create();
parseFields(reader);
+ processAttributes(attributes);
pdb.pushDependencyStack(
new CategoryIndex(CategoryIndex.Category.DATA, modifiedTypeIndex.get()));
pdb.popDependencyStack();
@@ -78,11 +74,15 @@ public abstract class AbstractModifierMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #modifiedTypeIndex}.
*/
protected abstract void create();
/**
* Parses the fields for this type.
+ * <P>
+ * Implementing class must initialize {@link #modifiedTypeIndex} and {@link #attributes}.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
@@ -90,14 +90,14 @@ public abstract class AbstractModifierMsType extends AbstractMsType {
/**
* Internal method to process the integer attributes value into individual components.
- * @param attributes Attributes field to be parsed/processed.
+ * @param atts Attributes field to be parsed/processed.
*/
- protected void processAttributes(int attributes) {
- isConst = ((attributes & 0x0001) == 0x0001);
- attributes >>= 1;
- isVolatile = ((attributes & 0x0001) == 0x0001);
- attributes >>= 1;
- isUnaligned = ((attributes & 0x0001) == 0x0001);
+ protected void processAttributes(int atts) {
+ isConst = ((atts & 0x0001) == 0x0001);
+ atts >>= 1;
+ isVolatile = ((atts & 0x0001) == 0x0001);
+ atts >>= 1;
+ isUnaligned = ((atts & 0x0001) == 0x0001);
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMsType.java
index 488be58cd1..1e1f17d4b2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractMsType.java
@@ -21,6 +21,20 @@ import ghidra.pdb.pdbreader.AbstractPdb;
/**
* This is the abstract class for PDB Data Type units.
+ * <P>
+ * For more information about PDBs, consult the Microsoft PDB API, see
+ * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
+ * What's inside a PDB File</a>.
+ * <P>
+ * To track back to the documented API, search the above URL for where the documentation is
+ * located as "code." Use the value of the PDB_ID for any class derived from this class to
+ * search the API code, being careful to look for data types instead of symbol types. (Note
+ * that "PDB_ID" is not API terminology.) Once found, you can use the defined label to find
+ * the structure that describes the layout of the serialized data; searching for that structure
+ * name can sometimes lead to methods that output information about these structures (a buffer
+ * pointer is cast to the structure pointer, leading to the ability to interpret the fields).
+ * <P>
+ * Enjoy!!!
*/
public abstract class AbstractMsType extends AbstractParsableItem {
protected AbstractPdb pdb;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeExtMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeExtMsType.java
index 924625a7a1..f12372a410 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeExtMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeExtMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractNestedTypeExtMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -65,6 +58,8 @@ public abstract class AbstractNestedTypeExtMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeMsType.java
index 34ea1bca75..456814f3c3 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractNestedTypeMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractNestedTypeMsType extends AbstractMsType {
protected AbstractTypeIndex nestedTypeDefinitionIndex;
@@ -66,11 +59,15 @@ public abstract class AbstractNestedTypeMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #nestedTypeDefinitionIndex} and {@link #name}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, if pertinent to itself, parse padding.
* @param reader {@link PdbByteReader } from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOemDefinableStringMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOemDefinableStringMsType.java
index e4973b0cf0..9f6752d83c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOemDefinableStringMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOemDefinableStringMsType.java
@@ -15,7 +15,6 @@
*/
package ghidra.pdb.pdbreader.type;
-import java.util.ArrayList;
import java.util.List;
import ghidra.pdb.PdbByteReader;
@@ -23,18 +22,11 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractTypeIndex;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractOemDefinableStringMsType extends AbstractMsType {
protected int msAssignedOEMIdentifier;
protected int oemAssignedTypeIdentifier;
- protected List<AbstractTypeIndex> typeIndexList = new ArrayList<>();
+ protected List<AbstractTypeIndex> typeIndexList;
protected byte[] remainingBytes;
/**
@@ -48,7 +40,7 @@ public abstract class AbstractOemDefinableStringMsType extends AbstractMsType {
super(pdb, reader);
msAssignedOEMIdentifier = reader.parseUnsignedShortVal();
oemAssignedTypeIdentifier = reader.parseUnsignedShortVal();
- parseTypeIndexList(reader);
+ typeIndexList = parseTypeIndexList(reader);
//TODO: We do not know what "OEM-defined" data remains. For now, just grabbing rest.
remainingBytes = reader.parseBytesRemaining();
}
@@ -70,8 +62,10 @@ public abstract class AbstractOemDefinableStringMsType extends AbstractMsType {
/**
* Parses the Type Index List.
* @param reader {@link PdbByteReader} that is deserialized.
+ * @return Type indices.
* @throws PdbException Upon not enough data left to parse.
*/
- protected abstract void parseTypeIndexList(PdbByteReader reader) throws PdbException;
+ protected abstract List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader)
+ throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOneMethodMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOneMethodMsType.java
index d02d5a9933..0be0e2b768 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOneMethodMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOneMethodMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractOneMethodMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -72,6 +65,8 @@ public abstract class AbstractOneMethodMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #procedureTypeRecordIndex} and {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOverloadedMethodMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOverloadedMethodMsType.java
index abd8ee285e..a95e60e192 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOverloadedMethodMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractOverloadedMethodMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractOverloadedMethodMsType extends AbstractMsType {
protected int count;
@@ -63,6 +56,8 @@ public abstract class AbstractOverloadedMethodMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #methodListIndex} and {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPointerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPointerMsType.java
index c6e78bbc15..0c5126c439 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPointerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPointerMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractPointerMsType extends AbstractMsType {
private static final int TYPE_NEAR = 0x00; // 16-bit pointer
@@ -464,11 +457,17 @@ public abstract class AbstractPointerMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #underlyingTypeIndex},
+ * {@link #memberPointerContainingClassIndex}, {@link #baseSymbol}, and {@link #name}.
*/
protected abstract void create();
/**
* Parses the pointer body.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, call
+ * {@link #parseAttributes(PdbByteReader)} and parse {@link #underlyingTypeIndex}.
* @param reader {@link PdbByteReader} from which the data is parsed.
* @throws PdbException Upon not enough data left to parse.
*/
@@ -476,7 +475,12 @@ public abstract class AbstractPointerMsType extends AbstractMsType {
/**
* Parses the attributes of the pointer.
- * @param reader {@link PdbByteReader} frmo which the attributes are parsed.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * certain attributes, which at a minimum will fill in {@link #pointerTypeAttribute},
+ * {@link #pointerModeAttribute}, {@link #isFlat}, {@link #isVolatile}, {@link #isConst},
+ * and {@link #isUnaligned}.
+ * @param reader {@link PdbByteReader} from which the attributes are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
protected abstract void parseAttributes(PdbByteReader reader) throws PdbException;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPrecompiledTypeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPrecompiledTypeMsType.java
index 46a805f890..a0f4355451 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPrecompiledTypeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractPrecompiledTypeMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractPrecompiledTypeMsType extends AbstractMsType {
protected AbstractTypeIndex start;
@@ -56,11 +49,16 @@ public abstract class AbstractPrecompiledTypeMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #start} and {@link #name}.
*/
protected abstract void create();
/**
* Parses the fields of this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, parse
+ * {@link #start}, {@link #count}, {@link #signature}, and {@link #name}.
* @param reader {@link PdbByteReader} from which to parse the fields.
* @throws PdbException upon error parsing a field.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractProcedureMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractProcedureMsType.java
index 1d45d63425..526c2e8ebf 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractProcedureMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractProcedureMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractProcedureMsType extends AbstractMsType {
protected AbstractTypeIndex returnValueTypeIndex;
@@ -125,6 +118,9 @@ public abstract class AbstractProcedureMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #returnValueTypeIndex} and
+ * {@link #argListTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractSkipMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractSkipMsType.java
index 86db7c9f7c..fde9c8f10e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractSkipMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractSkipMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractTypeIndex;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractSkipMsType extends AbstractMsType {
protected AbstractTypeIndex nextValidTypeIndex;
@@ -53,6 +46,8 @@ public abstract class AbstractSkipMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #nextValidTypeIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStaticMemberMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStaticMemberMsType.java
index b1ee14360e..c759811d01 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStaticMemberMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStaticMemberMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractStaticMemberMsType extends AbstractMsType {
protected ClassFieldMsAttributes attribute;
@@ -66,6 +59,9 @@ public abstract class AbstractStaticMemberMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attribute}; also parse {@link #fieldTypeRecordIndex}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStructureMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStructureMsType.java
index a13d95ee9a..33c90c878c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStructureMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractStructureMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractStructureMsType extends AbstractCompositeMsType {
private static final String TYPE_STRING = "struct";
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractTypeServerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractTypeServerMsType.java
index d72e23527e..22daa60533 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractTypeServerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractTypeServerMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractString;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractTypeServerMsType extends AbstractMsType {
protected long signature;
@@ -56,6 +49,8 @@ public abstract class AbstractTypeServerMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #name}.
*/
protected abstract void create();
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractUnionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractUnionMsType.java
index 1f73dff883..64e3d602b6 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractUnionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractUnionMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractUnionMsType extends AbstractCompositeMsType {
private static final String TYPE_STRING = "union";
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualBaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualBaseClassMsType.java
index 3f1504fe49..a8bfe88dac 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualBaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualBaseClassMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractVirtualBaseClassMsType extends AbstractMsType {
protected AbstractTypeIndex directVirtualBaseClassTypeIndex;
@@ -79,11 +72,18 @@ public abstract class AbstractVirtualBaseClassMsType extends AbstractMsType {
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #directVirtualBaseClassTypeIndex} and
+ * {@link #virtualBasePointerTypeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, in the appropriate order pertinent to itself, allocate/parse
+ * {@link #attribute}; also parse {@link #directVirtualBaseClassTypeIndex} and
+ * {@link #virtualBasePointerTypeIndex}.
* @param reader {@link PdbByteReader} from which the data is parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePathMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePathMsType.java
index d618c7ad25..6893881621 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePathMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePathMsType.java
@@ -15,7 +15,6 @@
*/
package ghidra.pdb.pdbreader.type;
-import java.util.ArrayList;
import java.util.List;
import ghidra.pdb.PdbByteReader;
@@ -23,16 +22,9 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.AbstractTypeIndex;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractVirtualFunctionTablePathMsType extends AbstractMsType {
- protected List<AbstractTypeIndex> bases = new ArrayList<>();
+ protected List<AbstractTypeIndex> bases;
/**
* Constructor for this type.
@@ -43,7 +35,7 @@ public abstract class AbstractVirtualFunctionTablePathMsType extends AbstractMsT
public AbstractVirtualFunctionTablePathMsType(AbstractPdb pdb, PdbByteReader reader)
throws PdbException {
super(pdb, reader);
- parseFields(reader);
+ bases = parseBases(reader);
}
// Note: MSFT output API not documented.
@@ -58,8 +50,9 @@ public abstract class AbstractVirtualFunctionTablePathMsType extends AbstractMsT
/**
* Abstract internal method to parse fields in the deserialization process.
* @param reader {@link PdbByteReader} that is deserialized.
+ * @return bases information.
* @throws PdbException Upon not enough data left to parse.
*/
- protected abstract void parseFields(PdbByteReader reader) throws PdbException;
+ protected abstract List<AbstractTypeIndex> parseBases(PdbByteReader reader) throws PdbException;
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerMsType.java
index 272e4d0e37..34069590d1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractVirtualFunctionTablePointerMsType extends AbstractMsType {
protected AbstractTypeIndex pointerTypeIndex;
@@ -55,11 +48,15 @@ public abstract class AbstractVirtualFunctionTablePointerMsType extends Abstract
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #pointerTypeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, if pertinent to itself, parse padding.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerWithOffsetMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerWithOffsetMsType.java
index 892d73dc9d..47fb8fa57c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerWithOffsetMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AbstractVirtualFunctionTablePointerWithOffsetMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * An abstract class for a number of specific PDB data types that share certain information.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public abstract class AbstractVirtualFunctionTablePointerWithOffsetMsType extends AbstractMsType {
protected AbstractTypeIndex pointerTypeIndex;
@@ -59,11 +52,15 @@ public abstract class AbstractVirtualFunctionTablePointerWithOffsetMsType extend
/**
* Creates subcomponents for this class, which can be deserialized later.
+ * <P>
+ * Implementing class must initialize {@link #pointerTypeIndex}.
*/
protected abstract void create();
/**
* Parses the initial fields for this type.
+ * <P>
+ * Implementing class must, if pertinent to itself, parse padding.
* @param reader {@link PdbByteReader} from which the fields are parsed.
* @throws PdbException Upon not enough data left to parse.
*/
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasMsType.java
index 56c11ea11b..9c80c1e854 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringNt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class AliasMsType extends AbstractAliasMsType {
public static final int PDB_ID = 0x150a;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasStMsType.java
index fb5726ee40..6949accc6a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/AliasStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringSt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class AliasStMsType extends AbstractAliasMsType {
public static final int PDB_ID = 0x1010;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsList16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsList16MsType.java
index 6c5d606646..e9c8aca052 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsList16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsList16MsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ArgumentsList16MsType extends AbstractArgumentsListMsType {
public static final int PDB_ID = 0x0201;
@@ -46,13 +42,15 @@ public class ArgumentsList16MsType extends AbstractArgumentsListMsType {
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ List<AbstractTypeIndex> argTypeIndices = new ArrayList<>();
int count = reader.parseUnsignedShortVal();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex16();
typeIndex.parse(reader);
- argTypeIndexList.add(typeIndex);
+ argTypeIndices.add(typeIndex);
}
+ return argTypeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsListMsType.java
index e8ca23a58c..e49d23304e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArgumentsListMsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ArgumentsListMsType extends AbstractArgumentsListMsType {
public static final int PDB_ID = 0x1201;
@@ -46,13 +42,15 @@ public class ArgumentsListMsType extends AbstractArgumentsListMsType {
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ List<AbstractTypeIndex> argTypeIndices = new ArrayList<>();
int count = reader.parseInt();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex32();
typeIndex.parse(reader);
- argTypeIndexList.add(typeIndex);
+ argTypeIndices.add(typeIndex);
}
+ return argTypeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Array16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Array16MsType.java
index 52c23ab6d3..491b8d9f76 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Array16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Array16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Array16MsType extends AbstractArrayMsType {
public static final int PDB_ID = 0x0003;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayMsType.java
index 4ba22850db..b06a01ee40 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ArrayMsType extends AbstractArrayMsType {
public static final int PDB_ID = 0x1503;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayStMsType.java
index aa778a96a0..73491d967f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ArrayStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ArrayStMsType extends AbstractArrayMsType {
public static final int PDB_ID = 0x1003;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClass16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClass16MsType.java
index 4aff3aa5dc..abf0d83b57 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClass16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClass16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BaseClass16MsType extends AbstractBaseClassMsType {
public static final int PDB_ID = 0x0400;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClassMsType.java
index 85da6b18b0..892ce7fadc 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseClassMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BaseClassMsType extends AbstractBaseClassMsType {
public static final int PDB_ID = 0x1400;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseInterfaceMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseInterfaceMsType.java
index 805a72bc40..32bf6a262e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseInterfaceMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BaseInterfaceMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BaseInterfaceMsType extends AbstractMsType {
public static final int PDB_ID = 0x151a;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArray16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArray16MsType.java
index 5a71483229..8d32a785d4 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArray16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArray16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BasicArray16MsType extends AbstractBasicArrayMsType {
public static final int PDB_ID = 0x000d;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArrayMsType.java
index 2f61409480..181318d8fd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BasicArrayMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BasicArrayMsType extends AbstractBasicArrayMsType {
public static final int PDB_ID = 0x100b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Bitfield16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Bitfield16MsType.java
index b308085c8a..ba928fa3c2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Bitfield16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Bitfield16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Bitfield16MsType extends AbstractBitfieldMsType {
public static final int PDB_ID = 0x0206;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BitfieldMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BitfieldMsType.java
index 7c8ea994a3..de4aec6d9c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BitfieldMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BitfieldMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BitfieldMsType extends AbstractBitfieldMsType {
public static final int PDB_ID = 0x1205; // Note: this is not 0x1000 from Bitfield_16's ID.
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BuildInfoMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BuildInfoMsType.java
index 4c7d2eab25..650ca7d222 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BuildInfoMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/BuildInfoMsType.java
@@ -22,13 +22,6 @@ import ghidra.pdb.*;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.CategoryIndex;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class BuildInfoMsType extends AbstractMsType {
public static final int PDB_ID = 0x1603;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Class16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Class16MsType.java
index 1b9164fa15..360c199c9c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Class16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Class16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Class16MsType extends AbstractClassMsType {
public static final int PDB_ID = 0x0004;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassFieldMsAttributes.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassFieldMsAttributes.java
index 1b10de9c19..5ae3c6a12c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassFieldMsAttributes.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassFieldMsAttributes.java
@@ -19,10 +19,6 @@ import ghidra.pdb.*;
/**
* Class field attributes used on fields within specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
*/
public class ClassFieldMsAttributes extends AbstractParsableItem {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassMsType.java
index 3affadcf75..3f3feac552 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
@@ -76,13 +70,14 @@ public class ClassMsType extends AbstractClassMsType {
//System.out.println(mangledName);
}
}
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassStMsType.java
index dc2960bdfc..013f66bf5a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ClassStMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
@@ -75,21 +69,23 @@ public class ClassStMsType extends AbstractClassMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol016MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol016MsType.java
index b02166f4eb..04b9ed2ab7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol016MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol016MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Cobol016MsType extends AbstractCobol0MsType {
public static final int PDB_ID = 0x000b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol0MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol0MsType.java
index 5bd0ecc55c..352c57f1f8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol0MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol0MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Cobol0MsType extends AbstractCobol0MsType {
public static final int PDB_ID = 0x100a;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol1MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol1MsType.java
index 0a78a92efa..984d91a3f7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol1MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Cobol1MsType.java
@@ -18,13 +18,6 @@ package ghidra.pdb.pdbreader.type;
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Cobol1MsType extends AbstractMsType {
public static final int PDB_ID = 0x000c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArguments16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArguments16MsType.java
index f3c3440f8a..c9b252c8f2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArguments16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArguments16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DefaultArguments16MsType extends AbstractDefaultArgumentsMsType {
public static final int PDB_ID = 0x0202;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsMsType.java
index 2254f83718..a35fddaa8b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DefaultArgumentsMsType extends AbstractDefaultArgumentsMsType {
public static final int PDB_ID = 0x150b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsStMsType.java
index 378cf68881..4f118d66b8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DefaultArgumentsStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DefaultArgumentsStMsType extends AbstractDefaultArgumentsMsType {
public static final int PDB_ID = 0x1202;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassList16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassList16MsType.java
index 8b5df36194..1c7813592d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassList16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassList16MsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DerivedClassList16MsType extends AbstractDerivedClassListMsType {
public static final int PDB_ID = 0x0205;
@@ -46,13 +42,15 @@ public class DerivedClassList16MsType extends AbstractDerivedClassListMsType {
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
int count = reader.parseUnsignedShortVal();
+ List<AbstractTypeIndex> classTypeIndices = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex16();
typeIndex.parse(reader);
- typeIndexList.add(typeIndex);
+ classTypeIndices.add(typeIndex);
}
+ return classTypeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassListMsType.java
index e85381ae1d..debc4962ed 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DerivedClassListMsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DerivedClassListMsType extends AbstractDerivedClassListMsType {
public static final int PDB_ID = 0x1204;
@@ -46,13 +42,15 @@ public class DerivedClassListMsType extends AbstractDerivedClassListMsType {
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
int count = reader.parseInt();
+ List<AbstractTypeIndex> classTypeIndices = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex32();
typeIndex.parse(reader);
- typeIndexList.add(typeIndex);
+ classTypeIndices.add(typeIndex);
}
+ return classTypeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArray16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArray16MsType.java
index efc98eeeba..9b7232dc11 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArray16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArray16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArray16MsType extends AbstractDimensionedArrayMsType {
public static final int PDB_ID = 0x0011;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpper16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpper16MsType.java
index b2684d6b13..84c8301593 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpper16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpper16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayConstBoundsLowerUpper16MsType
extends AbstractDimensionedArrayConstBoundsLowerUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpperMsType.java
index 728c2cfae7..596e444a3d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsLowerUpperMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayConstBoundsLowerUpperMsType
extends AbstractDimensionedArrayConstBoundsLowerUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpper16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpper16MsType.java
index 8b5eaafa73..a6da82cafd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpper16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpper16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayConstBoundsUpper16MsType
extends AbstractDimensionedArrayConstBoundsUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpperMsType.java
index e0ca0ba57a..6609e83b4d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayConstBoundsUpperMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayConstBoundsUpperMsType
extends AbstractDimensionedArrayConstBoundsUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayMsType.java
index 138e8b6e8d..8f39bc6272 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayMsType extends AbstractDimensionedArrayMsType {
public static final int PDB_ID = 0x1508;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayStMsType.java
index 5a258a6f6f..cbdaa639a4 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayStMsType extends AbstractDimensionedArrayMsType {
public static final int PDB_ID = 0x100c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpper16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpper16MsType.java
index bc5821d6fe..533d9aa495 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpper16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpper16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayVarBoundsLowerUpper16MsType
extends AbstractDimensionedArrayVarBoundsLowerUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpperMsType.java
index 4b447fd8a4..8c8b291910 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsLowerUpperMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayVarBoundsLowerUpperMsType
extends AbstractDimensionedArrayVarBoundsLowerUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpper16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpper16MsType.java
index 9ffaa7c3bb..96af9bb221 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpper16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpper16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayVarBoundsUpper16MsType
extends AbstractDimensionedArrayVarBoundsUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpperMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpperMsType.java
index d97eaf8fc3..24f66b2163 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpperMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DimensionedArrayVarBoundsUpperMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class DimensionedArrayVarBoundsUpperMsType
extends AbstractDimensionedArrayVarBoundsUpperMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DummyMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DummyMsType.java
index cbf360fdcc..b62bfcfdb0 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DummyMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/DummyMsType.java
@@ -19,8 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
/**
- * This class extends {@link AbstractMsType}.
- * <P>
* Important: This is not a real type. This "Dummy" type has been created to help with testing.
*/
public class DummyMsType extends AbstractMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EndPrecompiledTypeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EndPrecompiledTypeMsType.java
index 6ed8132245..7ad83ea4e8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EndPrecompiledTypeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EndPrecompiledTypeMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class EndPrecompiledTypeMsType extends AbstractMsType {
public static final int PDB_ID = 0x0014;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Enum16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Enum16MsType.java
index 1bd3f0c67d..a3ed4919b7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Enum16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Enum16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Enum16MsType extends AbstractEnumMsType {
public static final int PDB_ID = 0x0007;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumMsType.java
index 30b4c7d8e8..3449be7661 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class EnumMsType extends AbstractEnumMsType {
public static final int PDB_ID = 0x1507;
@@ -60,6 +53,7 @@ public class EnumMsType extends AbstractEnumMsType {
fieldDescriptorListTypeIndex = new TypeIndex32();
underlyingTypeIndex = new TypeIndex32();
name = new StringNt();
+ // Additional initialization
mangledName = new StringNt();
}
@@ -73,24 +67,27 @@ public class EnumMsType extends AbstractEnumMsType {
name.parse(reader);
//System.out.println(name);
if (reader.hasMoreNonPad()) {
+ // Additional parsing
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
// name.parse(reader);
// mangledName.parse(reader);
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumStMsType.java
index 4a14a79787..59124b4bce 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class EnumStMsType extends AbstractEnumMsType {
public static final int PDB_ID = 0x1007;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateMsType.java
index be263f5bba..ee89af26e4 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringNt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class EnumerateMsType extends AbstractEnumerateMsType {
public static final int PDB_ID = 0x1502;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateStMsType.java
index 0e4f53db03..3570c8158c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/EnumerateStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringSt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class EnumerateStMsType extends AbstractEnumerateMsType {
public static final int PDB_ID = 0x0403;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldList16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldList16MsType.java
index 8cfa16367f..1a328f24ff 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldList16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldList16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FieldList16MsType extends AbstractFieldListMsType {
public static final int PDB_ID = 0x0204;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldListMsType.java
index 51c675f668..400d6f7d9a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FieldListMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FieldListMsType extends AbstractFieldListMsType {
public static final int PDB_ID = 0x1203;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClass16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClass16MsType.java
index 6625d4ef73..db6e93398b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClass16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClass16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FriendClass16MsType extends AbstractFriendClassMsType {
public static final int PDB_ID = 0x040b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClassMsType.java
index 6af9c87594..3e9d7569ec 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendClassMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FriendClassMsType extends AbstractFriendClassMsType {
public static final int PDB_ID = 0x140a;
@@ -54,7 +47,7 @@ public class FriendClassMsType extends AbstractFriendClassMsType {
@Override
protected void parseInitialFields(PdbByteReader reader) throws PdbException {
- reader.parseBytes(2); // Throw away 2 bytes.
+ reader.parseBytes(2); // Padding. Throw away 2 bytes.
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunction16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunction16MsType.java
index 218afe121d..de1ae30f5c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunction16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunction16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FriendFunction16MsType extends AbstractFriendFunctionMsType {
public static final int PDB_ID = 0x0404;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionMsType.java
index 25e83841ee..ea3d4d6af2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FriendFunctionMsType extends AbstractFriendFunctionMsType {
public static final int PDB_ID = 0x150c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionStMsType.java
index 6285e75e16..fd617b2bf5 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FriendFunctionStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FriendFunctionStMsType extends AbstractFriendFunctionMsType {
public static final int PDB_ID = 0x1403;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionIdMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionIdMsType.java
index ec2c924170..fc95ed2a9f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionIdMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionIdMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class FunctionIdMsType extends AbstractMsType {
public static final int PDB_ID = 0x1601;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionMsAttributes.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionMsAttributes.java
index 5210890dd3..bd148932e2 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionMsAttributes.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/FunctionMsAttributes.java
@@ -19,10 +19,6 @@ import ghidra.pdb.*;
/**
* Function attributes used on functions within specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
*/
public class FunctionMsAttributes extends AbstractParsableItem {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/HighLevelShaderLanguageMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/HighLevelShaderLanguageMsType.java
index 187c1665c7..2c9f178b99 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/HighLevelShaderLanguageMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/HighLevelShaderLanguageMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class HighLevelShaderLanguageMsType extends AbstractMsType {
public static final int PDB_ID = 0x1517;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Index16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Index16MsType.java
index dcc2609b7b..26682e91c1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Index16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Index16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Index16MsType extends AbstractIndexMsType {
public static final int PDB_ID = 0x0405;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndexMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndexMsType.java
index cccd358633..6b337e45c8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndexMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndexMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class IndexMsType extends AbstractIndexMsType {
public static final int PDB_ID = 0x1404;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClass16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClass16MsType.java
index ae9be660ca..16f5e8decf 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClass16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClass16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class IndirectVirtualBaseClass16MsType extends AbstractIndirectVirtualBaseClassMsType {
public static final int PDB_ID = 0x0402;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClassMsType.java
index e624b53465..0221370a4d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/IndirectVirtualBaseClassMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class IndirectVirtualBaseClassMsType extends AbstractIndirectVirtualBaseClassMsType {
public static final int PDB_ID = 0x1402;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/InterfaceMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/InterfaceMsType.java
index db0418913f..8b69558a37 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/InterfaceMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/InterfaceMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
@@ -64,9 +58,7 @@ public class InterfaceMsType extends AbstractCompositeMsType {
myBuilder.append(property);
myBuilder.append(">");
AbstractMsType fieldType = getFieldDescriptorListType();
- if (fieldType != null) {
- myBuilder.append(fieldType);
- }
+ myBuilder.append(fieldType);
myBuilder.append(" ");
builder.insert(0, myBuilder);
}
@@ -96,21 +88,23 @@ public class InterfaceMsType extends AbstractCompositeMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/LabelMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/LabelMsType.java
index 45ca81f884..cbfe63cdd7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/LabelMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/LabelMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class LabelMsType extends AbstractMsType {
public static final int PDB_ID = 0x000e;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ListMsType.java
index d1f414e21d..d98cb50e07 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ListMsType.java
@@ -18,13 +18,6 @@ package ghidra.pdb.pdbreader.type;
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ListMsType extends AbstractMsType {
public static final int PDB_ID = 0x0203;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedMsType.java
index 715657eb79..cbcd34a43d 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringUtf8Nt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ManagedMsType extends AbstractManagedMsType {
public static final int PDB_ID = 0x1514;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedStMsType.java
index 4a0707c413..274784f7a5 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ManagedStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringUtf8St;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ManagedStMsType extends AbstractManagedMsType {
public static final int PDB_ID = 0x140f;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MatrixMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MatrixMsType.java
index 48669b0bee..1d8e52914c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MatrixMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MatrixMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MatrixMsType extends AbstractMsType {
public static final int PDB_ID = 0x151c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Member16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Member16MsType.java
index 12d3c1c258..39a5e54f40 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Member16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Member16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Member16MsType extends AbstractMemberMsType {
public static final int PDB_ID = 0x0406;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunction16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunction16MsType.java
index 9d0fab2449..9126f43d1e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunction16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunction16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberFunction16MsType extends AbstractMemberFunctionMsType {
public static final int PDB_ID = 0x0009;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionIdMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionIdMsType.java
index 2abb997e8d..57eff8949a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionIdMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionIdMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberFunctionIdMsType extends AbstractMsType {
public static final int PDB_ID = 0x1602;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionMsType.java
index b0f8a643e6..3fb819000b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberFunctionMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberFunctionMsType extends AbstractMemberFunctionMsType {
public static final int PDB_ID = 0x1009;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyMsType.java
index 93718af339..075df994ae 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringNt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberModifyMsType extends AbstractMemberModifyMsType {
public static final int PDB_ID = 0x1513;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyStMsType.java
index dd58326abe..2c467f5da6 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberModifyStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringSt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberModifyStMsType extends AbstractMemberModifyMsType {
public static final int PDB_ID = 0x140e;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberMsType.java
index 6835f74013..fcd8290148 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberMsType extends AbstractMemberMsType {
public static final int PDB_ID = 0x150d;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberStMsType.java
index 4fca92f2bc..701de534dd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MemberStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MemberStMsType extends AbstractMemberMsType {
public static final int PDB_ID = 0x1405;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodList16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodList16MsType.java
index e96fc292f3..3b393d5ed9 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodList16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodList16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MethodList16MsType extends AbstractMethodListMsType {
public static final int PDB_ID = 0x0207;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodListMsType.java
index 2728b68c30..4d2d8b76b1 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodListMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MethodListMsType extends AbstractMethodListMsType {
public static final int PDB_ID = 0x1206;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecord16Ms.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecord16Ms.java
index cd10768e7b..5fe4c4bdee 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecord16Ms.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecord16Ms.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MethodRecord16Ms extends AbstractMethodRecordMs {
/**
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecordMs.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecordMs.java
index 85c11cbb0a..66eda258ed 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecordMs.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MethodRecordMs.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class MethodRecordMs extends AbstractMethodRecordMs {
/**
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Modifier16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Modifier16MsType.java
index 138bb1af5a..7de4e30ce5 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Modifier16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Modifier16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Modifier16MsType extends AbstractModifierMsType {
public static final int PDB_ID = 0x0001;
@@ -54,8 +47,7 @@ public class Modifier16MsType extends AbstractModifierMsType {
@Override
// Different size type index, different order.
protected void parseFields(PdbByteReader reader) throws PdbException {
- int attributes = reader.parseUnsignedShortVal();
- processAttributes(attributes);
+ attributes = reader.parseUnsignedShortVal();
modifiedTypeIndex.parse(reader);
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierExMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierExMsType.java
index 91edd9a47b..a9db2d8e87 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierExMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierExMsType.java
@@ -22,13 +22,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ModifierExMsType extends AbstractMsType {
public static final int PDB_ID = 0x1518;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierMsType.java
index 1a773babec..ea8ab70eca 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ModifierMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ModifierMsType extends AbstractModifierMsType {
public static final int PDB_ID = 0x1001;
@@ -55,8 +48,7 @@ public class ModifierMsType extends AbstractModifierMsType {
// Different size type index, different order.
protected void parseFields(PdbByteReader reader) throws PdbException {
modifiedTypeIndex.parse(reader);
- int attributes = reader.parseUnsignedShortVal();
- processAttributes(attributes);
+ attributes = reader.parseUnsignedShortVal();
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MsProperty.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MsProperty.java
index 8bd46657e7..c694f03bae 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MsProperty.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/MsProperty.java
@@ -19,10 +19,6 @@ import ghidra.pdb.*;
/**
* Property attributes used for various specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
*/
public class MsProperty extends AbstractParsableItem {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedType16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedType16MsType.java
index c60b01ed46..9dc9d026af 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedType16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedType16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NestedType16MsType extends AbstractNestedTypeMsType {
public static final int PDB_ID = 0x0409;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtMsType.java
index 523e6397e4..bc82efebe4 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringNt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NestedTypeExtMsType extends AbstractNestedTypeExtMsType {
public static final int PDB_ID = 0x1512;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtStMsType.java
index 8a3b617467..5b45a4ba09 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeExtStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringSt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NestedTypeExtStMsType extends AbstractNestedTypeExtMsType {
public static final int PDB_ID = 0x140d;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeMsType.java
index 8d20be064b..13aad328f8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NestedTypeMsType extends AbstractNestedTypeMsType {
public static final int PDB_ID = 0x1510;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeStMsType.java
index 3563d1c121..e438bae5d7 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NestedTypeStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NestedTypeStMsType extends AbstractNestedTypeMsType {
public static final int PDB_ID = 0x1408;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NotTranMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NotTranMsType.java
index 1cffe4be2b..d01ddb6a96 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NotTranMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NotTranMsType.java
@@ -18,13 +18,6 @@ package ghidra.pdb.pdbreader.type;
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NotTranMsType extends AbstractMsType {
public static final int PDB_ID = 0x0010;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NullMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NullMsType.java
index 03ebad6cd4..b5d5cd530f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NullMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/NullMsType.java
@@ -18,13 +18,6 @@ package ghidra.pdb.pdbreader.type;
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class NullMsType extends AbstractMsType {
public static final int PDB_ID = 0x000f;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString16MsType.java
index 58c318be6a..7db336dd9e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString16MsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OemDefinableString16MsType extends AbstractOemDefinableStringMsType {
public static final int PDB_ID = 0x0015;
@@ -46,13 +42,15 @@ public class OemDefinableString16MsType extends AbstractOemDefinableStringMsType
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
int count = reader.parseUnsignedShortVal();
+ List<AbstractTypeIndex> typeIndices = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex16();
typeIndex.parse(reader);
- typeIndexList.add(typeIndex);
+ typeIndices.add(typeIndex);
}
+ return typeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString2MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString2MsType.java
index 1f118a6827..3eac86ea40 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString2MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableString2MsType.java
@@ -23,13 +23,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OemDefinableString2MsType extends AbstractMsType {
public static final int PDB_ID = 0x1011;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableStringMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableStringMsType.java
index 2bb88d01a1..792c6502c6 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableStringMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OemDefinableStringMsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OemDefinableStringMsType extends AbstractOemDefinableStringMsType {
public static final int PDB_ID = 0x100f;
@@ -46,13 +42,15 @@ public class OemDefinableStringMsType extends AbstractOemDefinableStringMsType {
}
@Override
- protected void parseTypeIndexList(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseTypeIndexList(PdbByteReader reader) throws PdbException {
int count = reader.parseInt();
+ List<AbstractTypeIndex> typeIndices = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex32();
typeIndex.parse(reader);
- typeIndexList.add(typeIndex);
+ typeIndices.add(typeIndex);
}
+ return typeIndices;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethod16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethod16MsType.java
index 3d3f089623..b42bc8d7cd 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethod16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethod16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OneMethod16MsType extends AbstractOneMethodMsType {
public static final int PDB_ID = 0x040c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodMsType.java
index 6e38c648c0..75eb9cfcbf 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OneMethodMsType extends AbstractOneMethodMsType {
public static final int PDB_ID = 0x1511;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodStMsType.java
index 72e60a0094..02b20d1638 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OneMethodStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OneMethodStMsType extends AbstractOneMethodMsType {
public static final int PDB_ID = 0x140b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethod16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethod16MsType.java
index c0113be33f..40ced80c63 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethod16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethod16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OverloadedMethod16MsType extends AbstractOverloadedMethodMsType {
public static final int PDB_ID = 0x0408;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodMsType.java
index d26127b088..3a51afca54 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OverloadedMethodMsType extends AbstractOverloadedMethodMsType {
public static final int PDB_ID = 0x150f;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodStMsType.java
index dbc36cf025..bfb11b21e5 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/OverloadedMethodStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class OverloadedMethodStMsType extends AbstractOverloadedMethodMsType {
public static final int PDB_ID = 0x1407;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Pointer16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Pointer16MsType.java
index b3422803bc..b8b13d532a 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Pointer16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Pointer16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Pointer16MsType extends AbstractPointerMsType {
public static final int PDB_ID = 0x0002;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PointerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PointerMsType.java
index 3ed7e81a14..7ca20a83b4 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PointerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PointerMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class PointerMsType extends AbstractPointerMsType {
public static final int PDB_ID = 0x1002;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledType16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledType16MsType.java
index f8fbb19f01..73d6cfe0b8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledType16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledType16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class PrecompiledType16MsType extends AbstractPrecompiledTypeMsType {
public static final int PDB_ID = 0x0013;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeMsType.java
index 3f432fbaa0..893c1b021f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class PrecompiledTypeMsType extends AbstractPrecompiledTypeMsType {
public static final int PDB_ID = 0x1509;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeStMsType.java
index 635e0d7127..f12f598f65 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrecompiledTypeStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class PrecompiledTypeStMsType extends AbstractPrecompiledTypeMsType {
public static final int PDB_ID = 0x100e;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrimitiveMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrimitiveMsType.java
index 4760507855..e8b9213cc8 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrimitiveMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/PrimitiveMsType.java
@@ -20,10 +20,6 @@ import ghidra.pdb.pdbreader.AbstractPdb;
/**
* A class for a specific PDB data type--In this case one of many possible primitive types,
* specified by the record number.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
*/
public class PrimitiveMsType extends AbstractMsType {
@@ -88,6 +84,14 @@ public class PrimitiveMsType extends AbstractMsType {
return typeSize;
}
+ /**
+ * Indicates whether the type is a T_NOTYPE.
+ * @return Indicates whether T_NOTYPE.
+ */
+ public boolean isNoType() {
+ return recordNumber == 0;
+ }
+
//==============================================================================================
private void processType() {
switch (recordNumber) {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Procedure16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Procedure16MsType.java
index 58b7c6a4e6..33a3aba316 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Procedure16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Procedure16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Procedure16MsType extends AbstractProcedureMsType {
public static final int PDB_ID = 0x0008;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ProcedureMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ProcedureMsType.java
index 26aa340b23..6077b984ba 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ProcedureMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ProcedureMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ProcedureMsType extends AbstractProcedureMsType {
public static final int PDB_ID = 0x1008;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ReferencedSymbolMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ReferencedSymbolMsType.java
index b917fc0101..84d16f4865 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ReferencedSymbolMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/ReferencedSymbolMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.symbol.AbstractMsSymbol;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class ReferencedSymbolMsType extends AbstractMsType {
public static final int PDB_ID = 0x020c;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Skip16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Skip16MsType.java
index d881f9d3b1..4582ba7c82 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Skip16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Skip16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Skip16MsType extends AbstractSkipMsType {
public static final int PDB_ID = 0x0200;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SkipMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SkipMsType.java
index 6fb14710eb..b7ac2a1280 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SkipMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SkipMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class SkipMsType extends AbstractSkipMsType {
public static final int PDB_ID = 0x1200;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMember16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMember16MsType.java
index c5e2d5ca5e..86c3365606 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMember16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMember16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class StaticMember16MsType extends AbstractStaticMemberMsType {
public static final int PDB_ID = 0x0407;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberMsType.java
index 76d857a507..ed54592d41 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class StaticMemberMsType extends AbstractStaticMemberMsType {
public static final int PDB_ID = 0x150e;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberStMsType.java
index 423061b3f2..35b2615541 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StaticMemberStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class StaticMemberStMsType extends AbstractStaticMemberMsType {
public static final int PDB_ID = 0x1406;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StridedArrayMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StridedArrayMsType.java
index 3b814b116a..893756eaf9 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StridedArrayMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StridedArrayMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* We decided to make this a derivation of {@link AbstractArrayMsType}. Could make it its own
* if we decide to do that.
* <P>
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StringIdMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StringIdMsType.java
index f64c32a6f1..7debf7ef09 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StringIdMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StringIdMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.CategoryIndex;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class StringIdMsType extends AbstractMsType {
public static final int PDB_ID = 0x1605;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Structure16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Structure16MsType.java
index d5bfc6c566..bd5e56aa29 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Structure16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Structure16MsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureMsType.java
index 6d62298881..bd4a075d2c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
@@ -75,21 +69,23 @@ public class StructureMsType extends AbstractStructureMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureStMsType.java
index 3c38c0d144..9fe08ce0d0 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/StructureStMsType.java
@@ -20,12 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- * <P>
* Note that class, struct, and interface are very closed related and have many of the same
* constructs and parsing procedures. However, they are separate. If any of the internals
* of one of these is changed, it is highly suggested that the others be changed as well as
@@ -75,21 +69,23 @@ public class StructureStMsType extends AbstractStructureMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SubstringListMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SubstringListMsType.java
index db9202765f..d77fd4422c 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SubstringListMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/SubstringListMsType.java
@@ -22,13 +22,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class SubstringListMsType extends AbstractMsType {
public static final int PDB_ID = 0x1604;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServer2MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServer2MsType.java
index 1c8505e39c..83f8f5aa6e 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServer2MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServer2MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class TypeServer2MsType extends AbstractMsType {
public static final int PDB_ID = 0x1515;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerMsType.java
index c7ae183807..badca31487 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringNt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class TypeServerMsType extends AbstractTypeServerMsType {
public static final int PDB_ID = 0x1501;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerStMsType.java
index ca2b9e67ef..97fa8f7389 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/TypeServerStMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.StringSt;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class TypeServerStMsType extends AbstractTypeServerMsType {
public static final int PDB_ID = 0x0016;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Union16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Union16MsType.java
index 649abbf61b..7b8cbe9cac 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Union16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/Union16MsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class Union16MsType extends AbstractUnionMsType {
public static final int PDB_ID = 0x0006;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionMsType.java
index bdf79c0904..cc1ef64d51 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class UnionMsType extends AbstractUnionMsType {
public static final int PDB_ID = 0x1506;
@@ -65,21 +58,23 @@ public class UnionMsType extends AbstractUnionMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionStMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionStMsType.java
index 545590b228..faecdb2190 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionStMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UnionStMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class UnionStMsType extends AbstractUnionMsType {
public static final int PDB_ID = 0x1006;
@@ -65,21 +58,23 @@ public class UnionStMsType extends AbstractUnionMsType {
mangledName.parse(reader);
//System.out.println(mangledName);
}
- else if (reader.hasMore()) {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
- }
- }
- else {
- // The following code is for developmental investigations;
- // set break point on "int a = 1;" instead of a
- // conditional break point.
- int a = 1;
- a = a + 1;
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else if (reader.hasMore()) {
+// int a = 1;
+// a = a + 1;
+// }
}
+// // DO NOT REMOVE
+// // The following code is for developmental investigations;
+// // set break point on "int a = 1;" instead of a
+// // conditional break point.
+// else {
+// int a = 1;
+// a = a + 1;
+// }
reader.skipPadding();
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeModuleSourceAndLineMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeModuleSourceAndLineMsType.java
index 10bc056cdd..03be2438ab 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeModuleSourceAndLineMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeModuleSourceAndLineMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class UserDefinedTypeModuleSourceAndLineMsType extends AbstractMsType {
public static final int PDB_ID = 0x1607;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeSourceAndLineMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeSourceAndLineMsType.java
index c3bd8dfbae..057d926084 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeSourceAndLineMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/UserDefinedTypeSourceAndLineMsType.java
@@ -19,13 +19,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class UserDefinedTypeSourceAndLineMsType extends AbstractMsType {
public static final int PDB_ID = 0x1606;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VectorMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VectorMsType.java
index 9e88d90898..b9bd6bef7f 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VectorMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VectorMsType.java
@@ -21,13 +21,6 @@ import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VectorMsType extends AbstractMsType {
public static final int PDB_ID = 0x151b;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClass16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClass16MsType.java
index d0fd730127..00b83ce4fe 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClass16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClass16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualBaseClass16MsType extends AbstractVirtualBaseClassMsType {
public static final int PDB_ID = 0x0401;
@@ -42,14 +35,14 @@ public class VirtualBaseClass16MsType extends AbstractVirtualBaseClassMsType {
}
@Override
- protected void create() {
- directVirtualBaseClassTypeIndex = new TypeIndex16();
- virtualBasePointerTypeIndex = new TypeIndex16();
+ public int getPdbId() {
+ return PDB_ID;
}
@Override
- public int getPdbId() {
- return PDB_ID;
+ protected void create() {
+ directVirtualBaseClassTypeIndex = new TypeIndex16();
+ virtualBasePointerTypeIndex = new TypeIndex16();
}
@Override
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClassMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClassMsType.java
index 942902077f..a98a558444 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClassMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualBaseClassMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualBaseClassMsType extends AbstractVirtualBaseClassMsType {
public static final int PDB_ID = 0x1401;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTableMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTableMsType.java
index 63cbb9475a..9cf4e664ba 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTableMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTableMsType.java
@@ -22,13 +22,6 @@ import ghidra.pdb.*;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.CategoryIndex;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTableMsType extends AbstractMsType {
public static final int PDB_ID = 0x151d;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePath16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePath16MsType.java
index 778d35b1b8..42e94d67dc 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePath16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePath16MsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePath16MsType extends AbstractVirtualFunctionTablePathMsType {
public static final int PDB_ID = 0x0012;
@@ -47,14 +43,15 @@ public class VirtualFunctionTablePath16MsType extends AbstractVirtualFunctionTab
}
@Override
- protected void parseFields(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseBases(PdbByteReader reader) throws PdbException {
int count = reader.parseUnsignedShortVal();
+ List<AbstractTypeIndex> myBases = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex16();
typeIndex.parse(reader);
- bases.add(typeIndex);
+ myBases.add(typeIndex);
}
-
+ return myBases;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePathMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePathMsType.java
index 29d38a59a2..9902a97363 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePathMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePathMsType.java
@@ -15,17 +15,13 @@
*/
package ghidra.pdb.pdbreader.type;
+import java.util.ArrayList;
+import java.util.List;
+
import ghidra.pdb.PdbByteReader;
import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.*;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePathMsType extends AbstractVirtualFunctionTablePathMsType {
public static final int PDB_ID = 0x100d;
@@ -47,14 +43,15 @@ public class VirtualFunctionTablePathMsType extends AbstractVirtualFunctionTable
}
@Override
- protected void parseFields(PdbByteReader reader) throws PdbException {
+ protected List<AbstractTypeIndex> parseBases(PdbByteReader reader) throws PdbException {
int count = reader.parseInt();
+ List<AbstractTypeIndex> myBases = new ArrayList<>();
for (int i = 0; i < count; i++) {
AbstractTypeIndex typeIndex = new TypeIndex32();
typeIndex.parse(reader);
- bases.add(typeIndex);
+ myBases.add(typeIndex);
}
-
+ return myBases;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointer16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointer16MsType.java
index 07aa8339a2..7480bd1348 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointer16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointer16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePointer16MsType extends AbstractVirtualFunctionTablePointerMsType {
public static final int PDB_ID = 0x040a;
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerMsType.java
index 39d0b1a3c1..618fbe1ae6 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePointerMsType extends AbstractVirtualFunctionTablePointerMsType {
public static final int PDB_ID = 0x1409;
@@ -55,7 +48,7 @@ public class VirtualFunctionTablePointerMsType extends AbstractVirtualFunctionTa
@Override
protected void parseInitialFields(PdbByteReader reader) throws PdbException {
- reader.parseBytes(2); // Throw away 2 bytes.
+ reader.parseBytes(2); // Documented padding. Throw away 2 bytes.
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffset16MsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffset16MsType.java
index 26baca2a4e..06d2ebfa82 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffset16MsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffset16MsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex16;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePointerWithOffset16MsType
extends AbstractVirtualFunctionTablePointerWithOffsetMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffsetMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffsetMsType.java
index 9edc4ffd95..a910c39792 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffsetMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VirtualFunctionTablePointerWithOffsetMsType.java
@@ -20,13 +20,6 @@ import ghidra.pdb.PdbException;
import ghidra.pdb.pdbreader.AbstractPdb;
import ghidra.pdb.pdbreader.TypeIndex32;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VirtualFunctionTablePointerWithOffsetMsType
extends AbstractVirtualFunctionTablePointerWithOffsetMsType {
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeDescriptorMsProperty.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeDescriptorMsProperty.java
index 00b7739441..22411c449b 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeDescriptorMsProperty.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeDescriptorMsProperty.java
@@ -15,117 +15,48 @@
*/
package ghidra.pdb.pdbreader.type;
-import ghidra.pdb.AbstractParsableItem;
+import java.util.HashMap;
+import java.util.Map;
/**
* VTShape Descriptor Property used on VtShapeMsType PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
*/
-public class VtShapeDescriptorMsProperty extends AbstractParsableItem {
-
- private static final int NEAR = 0;
- private static final int FAR = 1;
- private static final int THIN = 2;
- private static final int OUTER = 3;
- private static final int META = 4;
- private static final int NEAR32 = 5;
- private static final int FAR32 = 6;
- private static final int UNUSED = 7;
-
- private static final String[] VTS_STRING = new String[8];
+public enum VtShapeDescriptorMsProperty {
+
+ NEAR("near", 0),
+ FAR("far", 1),
+ THIN("thin", 2),
+ OUTER("outer", 3),
+ META("meta", 4),
+ NEAR32("near32", 5),
+ FAR32("far32", 6),
+ UNUSED("unused", 7);
+
+ private static final Map<Integer, VtShapeDescriptorMsProperty> BY_VALUE = new HashMap<>();
static {
- VTS_STRING[0] = "near";
- VTS_STRING[1] = "far";
- VTS_STRING[2] = "thin";
- VTS_STRING[3] = "outer";
- VTS_STRING[4] = "meta";
- VTS_STRING[5] = "near32";
- VTS_STRING[6] = "far32";
- VTS_STRING[7] = "";
- }
-
- //==============================================================================================
- private int value;
-
- //==============================================================================================
- /**
- * Constructor for the VtShapeDescriptorMsProperty
- * @param value Value of the property.
- */
- public VtShapeDescriptorMsProperty(int value) {
- this.value = value;
- }
-
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isNear() {
- return (value == NEAR);
- }
-
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isFar() {
- return (value == FAR);
+ for (VtShapeDescriptorMsProperty val : values()) {
+ BY_VALUE.put(val.value, val);
+ }
}
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isThin() {
- return (value == THIN);
- }
-
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isOuter() {
- return (value == OUTER);
- }
-
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isMeta() {
- return (value == META);
- }
+ public final String label;
+ public final int value;
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isNear32() {
- return (value == NEAR32);
- }
-
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isFar32() {
- return (value == FAR32);
+ @Override
+ public String toString() {
+ return label;
}
- /**
- * Tells whether the property is true.
- * @return Truth about the property.
- */
- public boolean isUnused() {
- return (value >= UNUSED);
+ public static VtShapeDescriptorMsProperty fromValue(int val) {
+ if (val < 0 || val >= 7) {
+ val = 7;
+ }
+ return BY_VALUE.get(val);
}
- @Override
- public void emit(StringBuilder builder) {
- builder.append(VTS_STRING[value]);
+ private VtShapeDescriptorMsProperty(String label, int value) {
+ this.label = label;
+ this.value = value;
}
}
diff --git a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeMsType.java b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeMsType.java
index a88146ae73..1fe2451272 100644
--- a/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeMsType.java
+++ b/Ghidra/Features/PDB/src/main/java/ghidra/pdb/pdbreader/type/VtShapeMsType.java
@@ -21,13 +21,6 @@ import java.util.List;
import ghidra.pdb.*;
import ghidra.pdb.pdbreader.AbstractPdb;
-/**
- * A class for a specific PDB data type.
- * <P>
- * For more information about PDBs, consult the Microsoft PDB API, see
- * <a href="https://devblogs.microsoft.com/cppblog/whats-inside-a-pdb-file">
- * What's inside a PDB File</a>.
- */
public class VtShapeMsType extends AbstractMsType {
public static final int PDB_ID = 0x000a;
@@ -57,7 +50,7 @@ public class VtShapeMsType extends AbstractMsType {
else {
value = byteVal & 0x0f;
}
- VtShapeDescriptorMsProperty descriptor = new VtShapeDescriptorMsProperty(value);
+ VtShapeDescriptorMsProperty descriptor = VtShapeDescriptorMsProperty.fromValue(value);
descriptorList.add(descriptor);
}
reader.skipPadding();
@@ -74,7 +67,7 @@ public class VtShapeMsType extends AbstractMsType {
DelimiterState ds = new DelimiterState("", ",");
builder.append("vtshape: {");
for (VtShapeDescriptorMsProperty descriptor : descriptorList) {
- builder.append(ds.out(true, descriptor));
+ builder.append(ds.out(true, descriptor.toString()));
}
builder.append(")");
}