GP-572: Schema implementation for dbgmodel. Some dbgeng fixes.

This commit is contained in:
d-millar 2021-01-11 20:47:49 +00:00 committed by Dan
parent ea87c4e063
commit bdfeae4baf
9 changed files with 719 additions and 26 deletions

View file

@ -19,9 +19,7 @@ import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import agent.dbgeng.manager.DbgCause;
import agent.dbgeng.manager.DbgEventsListenerAdapter;
import agent.dbgeng.manager.breakpoint.DbgBreakpointInfo;
import agent.dbgeng.manager.breakpoint.DbgBreakpointType;
import ghidra.async.AsyncFence;
import ghidra.dbg.target.TargetBreakpointContainer;
@ -30,25 +28,25 @@ import ghidra.dbg.target.schema.*;
import ghidra.program.model.address.AddressRange;
@TargetObjectSchemaInfo(name = "BreakpointContainer", elements = {
@TargetElementType(type = DbgModelTargetBreakpointSpec.class)
}, attributes = {
@TargetAttributeType(type = Void.class)
}, canonicalContainer = true)
@TargetElementType(type = DbgModelTargetBreakpointSpec.class) }, attributes = {
@TargetAttributeType(type = Void.class) }, canonicalContainer = true)
public interface DbgModelTargetBreakpointContainer extends DbgModelTargetObject,
TargetBreakpointContainer<DbgModelTargetBreakpointContainer>, DbgEventsListenerAdapter {
/*
@Override
public void breakpointCreated(DbgBreakpointInfo info, DbgCause cause);
@Override
public void breakpointModified(DbgBreakpointInfo newInfo, DbgBreakpointInfo oldInfo,
DbgCause cause);
@Override
public void breakpointDeleted(DbgBreakpointInfo info, DbgCause cause);
@Override
public void breakpointHit(DbgBreakpointInfo info, DbgCause cause);
*/
public default CompletableFuture<Void> doPlaceBreakpoint(Set<TargetBreakpointKind> kinds,
Function<DbgBreakpointType, CompletableFuture<?>> placer) {

View file

@ -32,8 +32,12 @@ import ghidra.util.datastruct.ListenerSet;
name = TargetBreakpointSpec.CONTAINER_ATTRIBUTE_NAME, //
type = DbgModelTargetBreakpointContainerImpl.class), //
@TargetAttributeType( //
name = TargetBreakpointLocation.SPEC_ATTRIBUTE_NAME, //
type = DbgModelTargetBreakpointSpecImpl.class), //
name = TargetBreakpointLocation.SPEC_ATTRIBUTE_NAME, //
type = DbgModelTargetBreakpointSpecImpl.class), //
@TargetAttributeType(name = DbgModelTargetBreakpointSpecImpl.BPT_TYPE_ATTRIBUTE_NAME, type = String.class), //
@TargetAttributeType(name = DbgModelTargetBreakpointSpecImpl.BPT_DISP_ATTRIBUTE_NAME, type = String.class), //
@TargetAttributeType(name = DbgModelTargetBreakpointSpecImpl.BPT_PENDING_ATTRIBUTE_NAME, type = String.class), //
@TargetAttributeType(name = DbgModelTargetBreakpointSpecImpl.BPT_TIMES_ATTRIBUTE_NAME, type = Integer.class), //
@TargetAttributeType(type = Void.class) //
}, canonicalContainer = true)
public class DbgModelTargetBreakpointSpecImpl extends DbgModelTargetObjectImpl