GT-3112 - PDB Universal Reader/Analyzer - 121 commits

This commit is contained in:
ghizard 2020-09-09 16:24:02 -04:00
parent d09a5740e0
commit 1b9cf4a274
4 changed files with 7 additions and 11 deletions

View file

@ -43,7 +43,7 @@ public abstract class MsSymbolApplier {
*/ */
public MsSymbolApplier(PdbApplicator applicator, AbstractMsSymbolIterator iter) { public MsSymbolApplier(PdbApplicator applicator, AbstractMsSymbolIterator iter) {
Objects.requireNonNull(applicator, "applicator cannot be null"); Objects.requireNonNull(applicator, "applicator cannot be null");
Objects.requireNonNull(iter, "symbolGroup cannot be null"); Objects.requireNonNull(iter, "iter cannot be null");
this.applicator = applicator; this.applicator = applicator;
this.iter = iter; this.iter = iter;
currentOffset = iter.getCurrentOffset(); currentOffset = iter.getCurrentOffset();
@ -76,13 +76,12 @@ public abstract class MsSymbolApplier {
/** /**
* Applies logic of this class to another {@link MsSymbolApplier} instead of to * Applies logic of this class to another {@link MsSymbolApplier} instead of to
* "the program." * the program.
* @param applyToApplier the applier to which the logic of this class is applied. * @param applyToApplier the applier to which the logic of this class is applied.
* @throws PdbException if there was a problem processing the data. * @throws PdbException if there was a problem processing the data.
* @throws CancelledException upon user cancellation. * @throws CancelledException upon user cancellation.
*/ */
abstract void applyTo(MsSymbolApplier applyToApplier) abstract void applyTo(MsSymbolApplier applyToApplier) throws PdbException, CancelledException;
throws PdbException, CancelledException;
/** /**
* Manages block nesting for symbols/appliers that represent the beginning or end of blocks. * Manages block nesting for symbols/appliers that represent the beginning or end of blocks.

View file

@ -32,7 +32,7 @@ import mdemangler.*;
import mdemangler.object.MDObjectCPP; import mdemangler.object.MDObjectCPP;
/** /**
* This is a class for develop research into various areas. Anything in this class that needs to * This class is for developer research into various areas. Anything in this class that needs to
* end up as part of any usable output should be moved into another class. This class just * end up as part of any usable output should be moved into another class. This class just
* aggregates various items being investigated, and will eventually be eliminated from the code * aggregates various items being investigated, and will eventually be eliminated from the code
* base. * base.

View file

@ -253,7 +253,7 @@ public class PdbByteWriter {
public void putGUID(int data1, short data2, short data3, byte[] data4) { public void putGUID(int data1, short data2, short data3, byte[] data4) {
if (data4.length != 8) { if (data4.length != 8) {
String msg = "GUID invalid byte[] size... terminating"; String msg = "GUID invalid byte[] size... terminating";
Msg.error(null, msg); Msg.error(this, msg);
throw new AssertException(msg); throw new AssertException(msg);
} }
putInt(data1); putInt(data1);

View file

@ -16,6 +16,7 @@
package ghidra.app.util.bin.format.pdb2.pdbreader.symbol; package ghidra.app.util.bin.format.pdb2.pdbreader.symbol;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.math.BigInteger; import java.math.BigInteger;
@ -26,8 +27,6 @@ import generic.test.AbstractGenericTest;
import ghidra.app.util.bin.format.pdb2.pdbreader.*; import ghidra.app.util.bin.format.pdb2.pdbreader.*;
import ghidra.app.util.bin.format.pdb2.pdbreader.type.AbstractMsType; import ghidra.app.util.bin.format.pdb2.pdbreader.type.AbstractMsType;
import ghidra.app.util.bin.format.pdb2.pdbreader.type.DummyMsType; import ghidra.app.util.bin.format.pdb2.pdbreader.type.DummyMsType;
import ghidra.util.Msg;
import ghidra.util.exception.AssertException;
public class SymbolsTest extends AbstractGenericTest { public class SymbolsTest extends AbstractGenericTest {
@ -63,9 +62,7 @@ public class SymbolsTest extends AbstractGenericTest {
dummyPdb700.setItemRecord(4096, item); dummyPdb700.setItemRecord(4096, item);
} }
catch (Exception e) { catch (Exception e) {
String msg = "Error in static initialization of testt: " + e; fail("Error in static initialization of test: " + e);
Msg.error(null, msg);
throw new AssertException(msg);
} }
} }