mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-19 18:12:14 -09:00
GP-1288: added arbitrary excs
This commit is contained in:
@@ -44,6 +44,7 @@ public class DbgListExceptionFiltersCommand
|
||||
DebugFilterInformation info = control.getNumberEventFilters();
|
||||
int nEvents = info.getNumberEvents();
|
||||
int nExcs = info.getNumberSpecificExceptions();
|
||||
int nExcsA = info.getNumberArbitraryExceptions();
|
||||
DebugExceptionFilterInformation exc =
|
||||
control.getExceptionFilterParameters(nEvents, null, nExcs);
|
||||
for (int i = 0; i < exc.getParameters().length; i++) {
|
||||
@@ -57,5 +58,22 @@ public class DbgListExceptionFiltersCommand
|
||||
p.ExceptionCode.longValue());
|
||||
result.add(filter);
|
||||
}
|
||||
if (nExcsA > 0) {
|
||||
DebugExceptionFilterInformation excA =
|
||||
control.getExceptionFilterParameters(nEvents + nExcs, null, nExcsA);
|
||||
for (int i = 0; i < excA.getParameters().length; i++) {
|
||||
DEBUG_EXCEPTION_FILTER_PARAMETERS p = excA.getParameter(i);
|
||||
String text = Long.toHexString(p.ExceptionCode.longValue());
|
||||
// control.getEventFilterText(nEvents + nExcs + i, p.TextSize.intValue());
|
||||
String cmd =
|
||||
control.getEventFilterCommand(nEvents + nExcs + i, p.CommandSize.intValue());
|
||||
String cmd2 = control.getExceptionFilterSecondCommand(nEvents + nExcs + i,
|
||||
p.SecondCommandSize.intValue());
|
||||
DbgExceptionFilterImpl filter = new DbgExceptionFilterImpl(i, text, cmd, cmd2,
|
||||
p.ExecutionOption.intValue(), p.ContinueOption.intValue(),
|
||||
p.ExceptionCode.longValue());
|
||||
result.add(filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ import ghidra.dbg.target.*;
|
||||
import ghidra.dbg.target.TargetConsole.Channel;
|
||||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||
import ghidra.dbg.target.TargetLauncher.TargetCmdLineLauncher;
|
||||
import ghidra.dbg.target.TargetMethod.ParameterDescription;
|
||||
import ghidra.dbg.target.TargetSteppable.TargetStepKind;
|
||||
import ghidra.dbg.util.DebuggerCallbackReorderer;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
@@ -1193,7 +1194,7 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
|
||||
.keyBinding("F3")
|
||||
.toolBarGroup(DebuggerResources.GROUP_CONTROL, "C" + groupTargetIndex)
|
||||
.toolBarIcon(AbstractSetBreakpointAction.ICON)
|
||||
.popupMenuPath("&AddBreakpoint")
|
||||
.popupMenuPath("&Add Breakpoint")
|
||||
.popupMenuGroup(DebuggerResources.GROUP_CONTROL, "C" + groupTargetIndex)
|
||||
.popupMenuIcon(AbstractSetBreakpointAction.ICON)
|
||||
.helpLocation(AbstractSetBreakpointAction.help(plugin))
|
||||
@@ -1526,10 +1527,14 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
|
||||
|
||||
public void performConfigure(ActionContext context) {
|
||||
performAction(context, false, TargetConfigurable.class, configurable -> {
|
||||
Map<String, ?> args = configDialog.promptArguments(configurable.getConfigParameters());
|
||||
if (args != null) {
|
||||
for (Entry<String, ?> entry : args.entrySet()) {
|
||||
configurable.writeConfigurationOption(entry.getKey(), entry.getValue());
|
||||
Map<String, ParameterDescription<?>> configParameters =
|
||||
configurable.getConfigParameters();
|
||||
if (configParameters.size() > 0) {
|
||||
Map<String, ?> args = configDialog.promptArguments(configParameters);
|
||||
if (args != null) {
|
||||
for (Entry<String, ?> entry : args.entrySet()) {
|
||||
configurable.writeConfigurationOption(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
return AsyncUtils.NIL;
|
||||
|
||||
Reference in New Issue
Block a user