GP-571: dbgeng schema implementation

This commit is contained in:
d-millar 2021-01-07 19:16:39 +00:00 committed by Dan
parent eb66a90f6c
commit c81a17405d
49 changed files with 397 additions and 80 deletions

View file

@ -45,6 +45,8 @@ import ghidra.dbg.target.TargetConsole.Channel;
import ghidra.dbg.target.TargetFocusScope.TargetFocusScopeListener;
import ghidra.dbg.target.TargetLauncher.TargetCmdLineLauncher;
import ghidra.dbg.target.TargetObject.TargetObjectListener;
import ghidra.dbg.target.schema.TargetObjectSchema;
import ghidra.dbg.target.schema.XmlSchemaContext;
import ghidra.dbg.util.AllTargetObjectListenerAdapter;
import ghidra.dbg.util.PathUtils;
import ghidra.program.model.address.Address;
@ -1067,4 +1069,22 @@ public abstract class AbstractModelForDbgTest
}).finish());
}
}
protected void init(ModelHost m) throws Throwable {
waitOn(m.init());
}
@Test
public void testSerializeSchema() throws Throwable {
try (ModelHost m = modelHost()) {
DebuggerObjectModel model = m.getModel();
init(m);
TargetObjectSchema rootSchema = model.getRootSchema();
String serialized = XmlSchemaContext.serialize(rootSchema.getContext());
System.out.println(serialized);
assertEquals("Debugger", rootSchema.getName().toString());
}
}
}