mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-571: Additional fixes for schemas and dbgeng
This commit is contained in:
parent
c81a17405d
commit
8fa549119d
18 changed files with 166 additions and 69 deletions
|
@ -16,6 +16,7 @@
|
|||
package agent.dbgmodel.model.impl;
|
||||
|
||||
import ghidra.dbg.target.TargetAggregate;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
|
||||
public class DbgModel2DefaultTargetModelRoot extends DbgModel2TargetObjectImpl
|
||||
implements TargetAggregate {
|
||||
|
@ -23,4 +24,9 @@ public class DbgModel2DefaultTargetModelRoot extends DbgModel2TargetObjectImpl
|
|||
public DbgModel2DefaultTargetModelRoot(DbgModel2Impl model, String typeHint) {
|
||||
super(model, null, null, typeHint);
|
||||
}
|
||||
|
||||
public DbgModel2DefaultTargetModelRoot(DbgModel2Impl model, String typeHint,
|
||||
TargetObjectSchema schema) {
|
||||
super(model, null, null, typeHint, schema);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class DbgModel2Impl extends AbstractDbgModel {
|
|||
|
||||
public DbgModel2Impl() {
|
||||
this.dbg = new DbgManager2Impl();
|
||||
this.root = new DbgModel2TargetRootImpl(this);
|
||||
this.root = new DbgModel2TargetRootImpl(this, null);
|
||||
this.completedRoot = CompletableFuture.completedFuture(root);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import ghidra.dbg.target.TargetAccessConditioned.TargetAccessibility;
|
|||
import ghidra.dbg.target.TargetBreakpointContainer.TargetBreakpointKindSet;
|
||||
import ghidra.dbg.target.TargetBreakpointSpec.TargetBreakpointKind;
|
||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.dbg.util.PathUtils.TargetObjectKeyComparator;
|
||||
import ghidra.util.Msg;
|
||||
|
@ -72,7 +73,12 @@ public class DbgModel2TargetObjectImpl extends DefaultTargetObject<TargetObject,
|
|||
|
||||
public DbgModel2TargetObjectImpl(AbstractDbgModel model, TargetObject parent, String name,
|
||||
String typeHint) {
|
||||
super(model, parent, name, typeHint);
|
||||
super(model, parent, name, typeHint, null);
|
||||
}
|
||||
|
||||
public DbgModel2TargetObjectImpl(AbstractDbgModel model, TargetObject parent, String name,
|
||||
String typeHint, TargetObjectSchema schema) {
|
||||
super(model, parent, name, typeHint, schema);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,6 +32,7 @@ import ghidra.async.TypeSpec;
|
|||
import ghidra.dbg.target.*;
|
||||
import ghidra.dbg.target.TargetBreakpointContainer.TargetBreakpointListener;
|
||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
|
@ -67,6 +68,29 @@ public class DbgModel2TargetRootImpl extends DbgModel2DefaultTargetModelRoot
|
|||
impl.getManager().addEventsListener(this);
|
||||
}
|
||||
|
||||
public DbgModel2TargetRootImpl(DbgModel2Impl impl, TargetObjectSchema schema) {
|
||||
super(impl, "Debugger", schema);
|
||||
this.impl = impl;
|
||||
|
||||
this.available = new DbgModel2TargetAvailableContainerImpl(this);
|
||||
this.connectors = new DbgModelTargetConnectorContainerImpl(this);
|
||||
this.systemMarker = new DbgModel2TargetSystemMarkerImpl(this);
|
||||
|
||||
DbgModelTargetConnector defaultConnector = connectors.getDefaultConnector();
|
||||
changeAttributes(List.of(), List.of( //
|
||||
available, //
|
||||
connectors, //
|
||||
systemMarker //
|
||||
), Map.of( //
|
||||
DISPLAY_ATTRIBUTE_NAME, "Debugger", //
|
||||
TargetMethod.PARAMETERS_ATTRIBUTE_NAME, defaultConnector.getParameters() //
|
||||
// ARCH_ATTRIBUTE_NAME, "x86_64", //
|
||||
// DEBUGGER_ATTRIBUTE_NAME, "dbgeng", //
|
||||
// OS_ATTRIBUTE_NAME, "Windows", //
|
||||
), "Initialized");
|
||||
impl.getManager().addEventsListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setFocus(DbgModelSelectableObject sel) {
|
||||
boolean doFire;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue