GP-0: changes resulting from testing

This commit is contained in:
d-millar
2024-05-21 20:16:25 +00:00
committed by ghidra1
parent 8705b3191a
commit ea2679593b
2 changed files with 3 additions and 3 deletions
@@ -84,7 +84,7 @@ class ProcessState(object):
except BaseException as e:
print(f"Couldn't record page with SP: {e}")
self.visited.add(hashable_frame)
if first or self.regions or self.threads or self.modules:
if first or self.regions or self.modules:
# Sections, memory syscalls, or stack allocations
commands.put_regions()
self.regions = False
@@ -153,7 +153,7 @@ def process_event(self, listener, event):
print(f"Ignoring {desc} because target is invalid")
return
event_process = util.get_process()
if event_process.IsValid() and event_process not in PROC_STATE:
if event_process.IsValid() and event_process.GetProcessID() not in PROC_STATE:
PROC_STATE[event_process.GetProcessID()] = ProcessState()
rc = event_process.GetBroadcaster().AddListener(listener, ALL_EVENTS)
if not rc:
@@ -657,7 +657,7 @@ def read_mem(process: sch.Schema('Process'), range: AddressRange):
f'ghidra trace putmem 0x{offset_start:x} {range.length()}', result)
if result.Succeeded():
return
print(f"Could not read 0x{offset_start:x}: {result}")
#print(f"Could not read 0x{offset_start:x}: {result}")
exec_convert_errors(
f'ghidra trace putmem-state 0x{offset_start:x} {range.length()} error')