mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Merge remote-tracking branch 'origin/Ghidra_11.3'
This commit is contained in:
commit
34e38c3d48
5 changed files with 20 additions and 20 deletions
|
@ -287,7 +287,7 @@ def refresh_processes(node: sch.Schema('ProcessContainer')):
|
|||
|
||||
|
||||
@REGISTRY.method(action='refresh', display="Refresh Breakpoints")
|
||||
def refresh_proc_breakpoints(node: sch.Schema('BreakpointLocationContainer')):
|
||||
def refresh_proc_breakpoints(node: sch.Schema('BreakpointContainer')):
|
||||
"""
|
||||
Refresh the breakpoints for the process.
|
||||
"""
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
*/
|
||||
package ghidra.dbg.target.schema;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jdom.JDOMException;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import ghidra.trace.model.breakpoint.TraceObjectBreakpointLocation;
|
||||
|
@ -80,6 +80,7 @@ public class XmlTargetObjectSchemaTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Actually, null is what's intended, but that design needs fixing.")
|
||||
public void testSearchWithMultipleImpls() throws Exception {
|
||||
SchemaContext ctx = XmlSchemaContext.deserialize("""
|
||||
<context>
|
||||
|
|
|
@ -49,7 +49,8 @@ import ghidra.trace.model.listing.TraceCodeSpace;
|
|||
import ghidra.trace.model.listing.TraceData;
|
||||
import ghidra.trace.model.memory.*;
|
||||
import ghidra.trace.model.modules.TraceModule;
|
||||
import ghidra.trace.model.target.*;
|
||||
import ghidra.trace.model.target.TraceObject;
|
||||
import ghidra.trace.model.target.TraceObjectValue;
|
||||
import ghidra.trace.model.target.path.KeyPath;
|
||||
import ghidra.trace.model.target.path.PathFilter;
|
||||
import ghidra.trace.model.time.TraceSnapshot;
|
||||
|
@ -1040,7 +1041,7 @@ public class LldbCommandsTest extends AbstractLldbTraceRmiTest {
|
|||
tb = new ToyDBTraceBuilder((Trace) mdo.get());
|
||||
List<TraceObjectValue> procBreakLocVals = tb.trace.getObjectManager()
|
||||
.getValuePaths(Lifespan.at(0),
|
||||
PathFilter.parse("Processes[].Breakpoints[]"))
|
||||
PathFilter.parse("Processes[].Breakpoints[][1]"))
|
||||
.map(p -> p.getLastEntry())
|
||||
.sorted(Comparator.comparing(TraceObjectValue::getEntryKey))
|
||||
.toList();
|
||||
|
@ -1049,10 +1050,10 @@ public class LldbCommandsTest extends AbstractLldbTraceRmiTest {
|
|||
procBreakLocVals.get(0).getChild().getValue(0, "_range").castValue();
|
||||
Address main = rangeMain.getMinAddress();
|
||||
|
||||
assertBreakLoc(procBreakLocVals.get(0), "[1.1]", main, 1,
|
||||
assertBreakLoc(procBreakLocVals.get(0), "[1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.SW_EXECUTE),
|
||||
"main");
|
||||
assertBreakLoc(procBreakLocVals.get(1), "[2.1]", main, 1,
|
||||
assertBreakLoc(procBreakLocVals.get(1), "[1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.HW_EXECUTE),
|
||||
"main");
|
||||
}
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
*/
|
||||
package agent.lldb.rmi;
|
||||
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.instanceOf;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
@ -347,13 +346,13 @@ public class LldbHooksTest extends AbstractLldbTraceRmiTest {
|
|||
public void testOnBreakpointModified() throws Exception {
|
||||
try (LldbAndTrace conn = startAndSyncLldb()) {
|
||||
start(conn, getSpecimenPrint());
|
||||
assertEquals(0, tb.objValues(lastSnap(conn), "Breakpoints[]").size());
|
||||
assertEquals(0, tb.objValues(lastSnap(conn), "Processes[].Breakpoints[]").size());
|
||||
|
||||
//conn.execute("script lldb.debugger.SetAsync(False)");
|
||||
conn.execute("breakpoint set -n main");
|
||||
conn.execute("stepi");
|
||||
TraceObject brk = waitForPass(() -> {
|
||||
List<Object> brks = tb.objValues(lastSnap(conn), "Breakpoints[]");
|
||||
List<Object> brks = tb.objValues(lastSnap(conn), "Processes[].Breakpoints[]");
|
||||
assertEquals(1, brks.size());
|
||||
return (TraceObject) brks.get(0);
|
||||
});
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
*/
|
||||
package agent.lldb.rmi;
|
||||
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
import static org.junit.Assume.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -152,7 +151,7 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
|||
|
||||
List<TraceObjectValue> procBreakLocVals = tb.trace.getObjectManager()
|
||||
.getValuePaths(Lifespan.at(0),
|
||||
PathFilter.parse("Processes[].Breakpoints[]"))
|
||||
PathFilter.parse("Processes[].Breakpoints[][1]"))
|
||||
.map(p -> p.getLastEntry())
|
||||
.sorted(Comparator.comparing(TraceObjectValue::getEntryKey))
|
||||
.toList();
|
||||
|
@ -161,10 +160,10 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
|||
procBreakLocVals.get(0).getChild().getValue(0, "_range").castValue();
|
||||
Address main = rangeMain.getMinAddress();
|
||||
|
||||
assertBreakLoc(procBreakLocVals.get(0), "[1.1]", main, 1,
|
||||
assertBreakLoc(procBreakLocVals.get(0), "[1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.SW_EXECUTE),
|
||||
"main");
|
||||
assertBreakLoc(procBreakLocVals.get(1), "[2.1]", main, 1,
|
||||
assertBreakLoc(procBreakLocVals.get(1), "[1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.HW_EXECUTE),
|
||||
"main");
|
||||
}
|
||||
|
@ -1063,7 +1062,7 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
|||
|
||||
conn.execute("breakpoint set -n main");
|
||||
txPut(conn, "breakpoints");
|
||||
TraceObject bpt = Objects.requireNonNull(tb.objAny0("Breakpoints[]"));
|
||||
TraceObject bpt = Objects.requireNonNull(tb.objAny0("Processes[].Breakpoints[]"));
|
||||
|
||||
toggleBreakpoint.invoke(Map.of("breakpoint", bpt, "enabled", false));
|
||||
|
||||
|
@ -1087,7 +1086,7 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
|||
conn.execute("breakpoint set -n main");
|
||||
txPut(conn, "breakpoints");
|
||||
|
||||
TraceObject loc = Objects.requireNonNull(tb.objAny0("Breakpoints[][]"));
|
||||
TraceObject loc = Objects.requireNonNull(tb.objAny0("Processes[].Breakpoints[][]"));
|
||||
|
||||
toggleBreakpointLocation.invoke(Map.of("location", loc, "enabled", false));
|
||||
|
||||
|
@ -1110,7 +1109,7 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
|||
|
||||
conn.execute("breakpoint set -n main");
|
||||
txPut(conn, "breakpoints");
|
||||
TraceObject bpt = Objects.requireNonNull(tb.objAny0("Breakpoints[]"));
|
||||
TraceObject bpt = Objects.requireNonNull(tb.objAny0("Processes[].Breakpoints[]"));
|
||||
|
||||
deleteBreakpoint.invoke(Map.of("breakpoint", bpt));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue