GP-2023: post-review modifications

This commit is contained in:
d-millar 2022-06-10 22:02:10 +00:00
parent 5f1367d2a8
commit 097421553c
7 changed files with 15 additions and 19 deletions

View file

@ -371,4 +371,6 @@ public interface DbgManager extends AutoCloseable, DbgBreakpointInsertions {
DebugEventInformation getLastEventInformation();
DbgSession getSessionComputeIfAbsent(DebugSessionId debugSessionId, boolean b);
}

View file

@ -25,8 +25,7 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
import agent.dbgeng.dbgeng.DebugSessionId;
import agent.dbgeng.manager.DbgManager;
import agent.dbgeng.manager.impl.DbgManagerImpl;
import agent.dbgeng.manager.impl.DbgSessionImpl;
import agent.dbgeng.manager.DbgSession;
import agent.dbgeng.model.AbstractDbgModel;
import agent.dbgeng.model.iface2.*;
import ghidra.async.AsyncUtils;
@ -54,7 +53,7 @@ public class DbgModelImpl extends AbstractDbgModel implements DebuggerObjectMode
protected final AddressFactory addressFactory =
new DefaultAddressFactory(new AddressSpace[] { space });
protected final DbgManagerImpl dbg;
protected final DbgManager dbg;
protected final DbgModelTargetRootImpl root;
protected final DbgModelTargetSessionImpl session;
@ -64,11 +63,11 @@ public class DbgModelImpl extends AbstractDbgModel implements DebuggerObjectMode
private boolean suppressDescent = false;
public DbgModelImpl() {
this.dbg = (DbgManagerImpl) DbgManager.newInstance();
this.dbg = DbgManager.newInstance();
//System.out.println(XmlSchemaContext.serialize(SCHEMA_CTX));
this.root = new DbgModelTargetRootImpl(this, ROOT_SCHEMA);
this.completedRoot = CompletableFuture.completedFuture(root);
DbgSessionImpl s = dbg.getSessionComputeIfAbsent(new DebugSessionId(0), true);
DbgSession s = dbg.getSessionComputeIfAbsent(new DebugSessionId(0), true);
DbgModelTargetSessionContainer sessions = root.sessions;
this.session = (DbgModelTargetSessionImpl) sessions.getTargetSession(s);
addModelRoot(root);
@ -121,8 +120,8 @@ public class DbgModelImpl extends AbstractDbgModel implements DebuggerObjectMode
}
@Override
public DbgManagerImpl getManager() {
return (DbgManagerImpl) dbg;
public DbgManager getManager() {
return dbg;
}
@Override
@ -181,6 +180,7 @@ public class DbgModelImpl extends AbstractDbgModel implements DebuggerObjectMode
});
}
@Override
public boolean isSuppressDescent() {
return suppressDescent;
}

View file

@ -67,12 +67,8 @@ public class DbgModelTargetTraceOrDumpConnectorImpl extends DbgModelTargetObject
true, ".opendump", "Cmd", "native loader command");
ParameterDescription<String> p2 = ParameterDescription.create(String.class, "TraceOrDump",
true, "", "File", "trace or dump to be loaded");
ParameterDescription<Boolean> p3 = ParameterDescription.create(Boolean.class,
"UseQueryVirtual", false, true, "QueryVirtual", "use QueryVirtual (vs. !address)");
map.put("CommandLine", p1);
map.put("TraceOrDump", p2);
// For the moment, we'll leave this out (deadlocks the GUI)
//map.put("UseQueryVirtual", p3);
return map;
}

View file

@ -65,7 +65,7 @@ public class KeyEnumeratorImpl implements KeyEnumeratorInternal {
}
COMUtils.checkRC(hr);
}
catch (RuntimeException e) {
catch (Error e) {
Msg.error(this, e.getMessage());
}

View file

@ -200,6 +200,7 @@ public class DbgModel2Impl extends AbstractDbgModel
});
}
@Override
public boolean isSuppressDescent() {
return suppressDescent;
}

View file

@ -1007,6 +1007,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
groupTargetIndex++;
/*
actionSuppressDescent = new ToggleActionBuilder("Automatically populate containers", plugin.getName())
.menuPath("Maintenance","&Auto-populate")
.menuGroup(DebuggerResources.GROUP_TARGET, "M" + groupTargetIndex)
@ -1015,6 +1016,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
.selected(isUpdateWhileRunning())
.enabled(true)
.buildAndInstallLocal(this);
*/
groupTargetIndex = 0;
@ -1448,6 +1450,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
refresh("");
}
/*
public void performToggleAutoPopulateContainers(ActionContext context) {
suppressDescent = !actionSuppressDescent.isSelected();
if (currentModel != null) {
@ -1455,6 +1458,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
}
refresh("");
}
*/
protected <T extends TargetObject> void performAction(ActionContext context,
boolean fallbackRoot, Class<T> cls,

View file

@ -581,11 +581,4 @@ public interface DebuggerObjectModel {
*/
CompletableFuture<Void> flushEvents();
/**
* If the model permits, suppress automatic descent into containers
*/
default void setSuppressDescent(boolean suppressDescent) {
// Do nothing by default
}
}