Ghidra is a software reverse engineering (SRE) framework
GP-0: (lldb) Remove duplicative refresh_breakpoints and its test.
Dan15c0ff70996f
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.pyindex 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')[email protected](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/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.java b/Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/lldb/rmi/LldbMethodsTest.javaindex 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<TraceObjectValue> 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");- }- }- }-@Testpublic void testRefreshProcBreakpoints() throws Exception {try (LldbAndConnection conn = startAndConnectLldb()) {@@ -151,9 +113,9 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {List<TraceObjectValue> 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 =