mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
GP-0: more from unit tests
This commit is contained in:
parent
e19ff2a739
commit
d5f29b47d6
3 changed files with 4 additions and 4 deletions
|
@ -234,7 +234,7 @@ def start_trace(name: str) -> None:
|
|||
util.set_convenience_variable('_ghidra_tracing', "true")
|
||||
|
||||
|
||||
def ghidra_trace_start(name: str) -> None:
|
||||
def ghidra_trace_start(name: str = "drgn/noname") -> None:
|
||||
"""Start a Trace in Ghidra"""
|
||||
|
||||
STATE.require_client()
|
||||
|
@ -267,10 +267,10 @@ def ghidra_trace_create(start_trace: bool = True) -> None:
|
|||
global prog
|
||||
prog = Program()
|
||||
kind = os.getenv('OPT_TARGET_KIND')
|
||||
img = os.getenv('OPT_TARGET_IMG')
|
||||
if kind == "kernel":
|
||||
prog.set_kernel()
|
||||
elif kind == "coredump":
|
||||
img = os.getenv('OPT_TARGET_IMG')
|
||||
if img is not None:
|
||||
prog.set_core_dump(img)
|
||||
if '/' in img:
|
||||
|
|
|
@ -303,7 +303,7 @@ public class DrgnCommandsTest extends AbstractDrgnTraceRmiTest {
|
|||
TraceMemorySpace regs = tb.trace.getMemoryManager().getMemorySpace(t1f0, false);
|
||||
|
||||
RegisterValue rip = regs.getValue(snap, tb.reg("rip"));
|
||||
assertEquals("3a40cdf7ff7f0000", rip.getUnsignedValue().toString(16));
|
||||
assertEquals("7ffff7cd403a", rip.getUnsignedValue().toString(16));
|
||||
|
||||
try (Transaction tx = tb.trace.openTransaction("Float80 unit")) {
|
||||
TraceCodeSpace code = tb.trace.getCodeManager().getCodeSpace(t1f0, true);
|
||||
|
|
|
@ -188,7 +188,7 @@ public class DrgnMethodsTest extends AbstractDrgnTraceRmiTest {
|
|||
.getAddressSpace(registers.getCanonicalPath().toString());
|
||||
TraceMemorySpace regs = tb.trace.getMemoryManager().getMemorySpace(t1f0, false);
|
||||
RegisterValue rip = regs.getValue(snap, tb.reg("rip"));
|
||||
assertEquals("3a40cdf7ff7f0000", rip.getUnsignedValue().toString(16));
|
||||
assertEquals("7ffff7cd403a", rip.getUnsignedValue().toString(16));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue