mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/GP-0_d-millar_fix_for_ISF_test_failures'
This commit is contained in:
@@ -44,7 +44,7 @@ public abstract class AbstractIsfWriter implements Closeable {
|
||||
protected JsonArray objects = new JsonArray();
|
||||
|
||||
public AbstractIsfWriter(Writer baseWriter) throws IOException {
|
||||
if (writer != null) {
|
||||
if (baseWriter != null) {
|
||||
this.writer = new JsonWriter(baseWriter);
|
||||
writer.setIndent(" ");
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ public class IsfDataTypeWriter extends AbstractIsfWriter {
|
||||
|
||||
private List<Address> requestedAddresses = new ArrayList<>();
|
||||
private List<String> requestedSymbols = new ArrayList<>();
|
||||
// private List<String> requestedTypes = new ArrayList<>();
|
||||
private List<DataType> requestedDataTypes = new ArrayList<>();
|
||||
private boolean skipSymbols = false;
|
||||
private boolean skipTypes = false;
|
||||
@@ -99,6 +98,7 @@ public class IsfDataTypeWriter extends AbstractIsfWriter {
|
||||
*/
|
||||
public IsfDataTypeWriter(DataTypeManager dtm, List<DataType> target, Writer baseWriter) throws IOException {
|
||||
super(baseWriter);
|
||||
this.baseWriter = baseWriter;
|
||||
this.dtm = dtm;
|
||||
if (dtm != null) {
|
||||
dataOrganization = dtm.getDataOrganization();
|
||||
@@ -113,10 +113,15 @@ public class IsfDataTypeWriter extends AbstractIsfWriter {
|
||||
enums = new JsonObject();
|
||||
functions = new JsonObject();
|
||||
symbols = new JsonObject();
|
||||
requestedDataTypes = target;
|
||||
requestedDataTypes = target == null ? new ArrayList<>() : target;
|
||||
STRICT = true;
|
||||
}
|
||||
|
||||
public JsonObject getRootObject(TaskMonitor monitor) throws CancelledException, IOException {
|
||||
genRoot(monitor);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void genRoot(TaskMonitor monitor) throws CancelledException, IOException {
|
||||
genMetadata();
|
||||
|
||||
@@ -19,6 +19,8 @@ import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import ghidra.program.model.data.Array;
|
||||
import ghidra.program.model.data.BitFieldDataType;
|
||||
import ghidra.program.model.data.BuiltInDataType;
|
||||
@@ -50,6 +52,11 @@ public class ExtIsfDataTypeWriter extends IsfDataTypeWriter {
|
||||
STRICT = false;
|
||||
}
|
||||
|
||||
public JsonObject getRootObject(TaskMonitor monitor) throws CancelledException, IOException {
|
||||
genRoot(monitor);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void genRoot(TaskMonitor monitor) throws CancelledException, IOException {
|
||||
super.genRoot(monitor);
|
||||
|
||||
Reference in New Issue
Block a user