diff --git a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/methods.py b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/methods.py index 26dd9d9afd..66592d6d9a 100644 --- a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/methods.py +++ b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/methods.py @@ -269,16 +269,6 @@ def refresh_available(node: sch.Schema('AvailableContainer')): exec_convert_errors('ghidra trace put-available') -@REGISTRY.method(action='refresh', display="Refresh Breakpoints") -def refresh_breakpoints(node: sch.Schema('BreakpointContainer')): - """ - Refresh the list of breakpoints (including locations for the current - process). - """ - with commands.open_tracked_tx('Refresh Breakpoints'): - exec_convert_errors('ghidra trace put-breakpoints') - - @REGISTRY.method(action='refresh', display="Refresh Processes") def refresh_processes(node: sch.Schema('ProcessContainer')): """Refresh the list of processes.""" diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterData.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterData.java index 4796483f72..3f35ec7138 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterData.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterData.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -171,7 +171,7 @@ public class ColumnFilterData implements Comparable> { //@formatter:off return "{\n" + "\tname: " + name + ",\n" + - "\tmodelColumn" + modelIndex + ",\n" + + "\tmodelColumn: " + modelIndex + ",\n" + "\tviewColumn: " + viewIndex + ",\n" + "\tconstraints: " + CollectionUtils.collect(applicableConstraints, c -> c.asString()) +"\n" + diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterDialog.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterDialog.java index 9c94cd40d3..3394f9c184 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterDialog.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/ColumnFilterDialog.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -317,8 +317,12 @@ public class ColumnFilterDialog extends ReusableDialogComponentProvider } @Override - protected void dialogClosed() { + public void dispose() { dialogModel.dispose(); + } + + @Override + protected void dialogClosed() { if (closeCallback != null) { closeCallback.call(); } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterCondition.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterCondition.java index 2b69f5cb5d..cda6ca16ec 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterCondition.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterCondition.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -165,7 +165,8 @@ public class DialogFilterCondition { //@formatter:off return "{\n" + "\tname: " + constraintName + ",\n" + - "\tparent: " + parent + "\n" + + "\teditor: " + editor + "\n" + +// "\tparent: " + parent + "\n" + // stack overflow when DialogFilterConditionSet.toString() is called "}"; //@formatter:on } diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterConditionSet.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterConditionSet.java index febde3d6fe..2af1564c98 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterConditionSet.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constraint/dialog/DialogFilterConditionSet.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -170,7 +170,7 @@ public class DialogFilterConditionSet { public String toString() { //@formatter:off return "{\n" + - "\tfilterRow: " + filterRow + ",\n" + +// "\tfilterRow: " + filterRow + ",\n" + // stack overflow when DialogFilterRow.toString() is called "\tdata: " + columnFilterData + ",\n" + "\tconditions: " + conditionSet +"\n" + "}"; diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/MappedColumnConstraintEditor.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/MappedColumnConstraintEditor.java index f82716780d..7eff24f857 100644 --- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/MappedColumnConstraintEditor.java +++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/MappedColumnConstraintEditor.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,6 +21,7 @@ import javax.swing.event.ChangeListener; import docking.widgets.table.constraint.ColumnConstraint; import docking.widgets.table.constraint.MappedColumnConstraint; +import generic.json.Json; /** * A constraint editor that supports object type conversions, wrapping the editor for the @@ -105,4 +106,9 @@ public class MappedColumnConstraintEditor implements ColumnConstraintEdito public void removeChangeListener(ChangeListener constraintEditorChangeListener) { delegateEditor.addChangeListener(constraintEditorChangeListener); } + + @Override + public String toString() { + return Json.toString(this); + } } diff --git a/Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.java b/Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.java index d9764fec5b..934f6d7b0c 100644 --- a/Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.java +++ b/Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.java @@ -15,9 +15,10 @@ */ package agent.lldb.rmi; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.greaterThan; import static org.junit.Assert.*; -import static org.junit.Assume.*; +import static org.junit.Assume.assumeTrue; import java.util.*; @@ -92,45 +93,6 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest { } } - @Test - public void testRefreshBreakpoints() throws Exception { - try (LldbAndConnection conn = startAndConnectLldb()) { - start(conn, getSpecimenPrint()); - txPut(conn, "processes"); - - RemoteMethod refreshBreakpoints = conn.getMethod("refresh_breakpoints"); - try (ManagedDomainObject mdo = openDomainObject("/New Traces/lldb/expPrint")) { - tb = new ToyDBTraceBuilder((Trace) mdo.get()); - //waitStopped(conn); - - conn.execute("breakpoint set --name main"); - conn.execute("breakpoint set -H --name main"); - txPut(conn, "breakpoints"); - TraceObject breakpoints = Objects.requireNonNull(tb.objAny0("Breakpoints")); - refreshBreakpoints.invoke(Map.of("node", breakpoints)); - - List procBreakLocVals = tb.trace.getObjectManager() - .getValuePaths(Lifespan.at(0), - PathFilter.parse("Processes[].Breakpoints[]")) - .map(p -> p.getLastEntry()) - .sorted(Comparator.comparing(TraceObjectValue::getEntryKey)) - .toList(); - assertEquals(2, procBreakLocVals.size()); - AddressRange rangeMain = - procBreakLocVals.get(0).getChild().getValue(0, "_range").castValue(); - Address main = rangeMain.getMinAddress(); - - // The temporary breakpoint uses up number 1 - assertBreakLoc(procBreakLocVals.get(0), "[1.1]", main, 1, - Set.of(TraceBreakpointKind.SW_EXECUTE), - "main"); - assertBreakLoc(procBreakLocVals.get(1), "[2.1]", main, 1, - Set.of(TraceBreakpointKind.HW_EXECUTE), - "main"); - } - } - } - @Test public void testRefreshProcBreakpoints() throws Exception { try (LldbAndConnection conn = startAndConnectLldb()) { @@ -151,9 +113,9 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest { List procBreakLocVals = tb.trace.getObjectManager() .getValuePaths(Lifespan.at(0), - PathFilter.parse("Processes[].Breakpoints[][1]")) + PathFilter.parse("Processes[].Breakpoints[][]")) .map(p -> p.getLastEntry()) - .sorted(Comparator.comparing(TraceObjectValue::getEntryKey)) + .sorted(Comparator.comparing(TraceObjectValue::getCanonicalPath)) .toList(); assertEquals(2, procBreakLocVals.size()); AddressRange rangeMain =