mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
Merge remote-tracking branch 'origin/GP-6478_d-millar_drgn_bugs--SQUASHED'
This commit is contained in:
@@ -271,10 +271,11 @@ def ghidra_trace_create(start_trace: bool = True) -> None:
|
||||
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:
|
||||
img = img[img.rindex('/')+1:]
|
||||
if img is None:
|
||||
return
|
||||
prog.set_core_dump(img)
|
||||
if '/' in img:
|
||||
img = img[img.rindex('/')+1:]
|
||||
else:
|
||||
pid = os.getenv('OPT_TARGET_PID')
|
||||
if pid is not None:
|
||||
@@ -297,7 +298,7 @@ def ghidra_trace_create(start_trace: bool = True) -> None:
|
||||
img = prog.main_module().name # type: ignore
|
||||
util.selected_tid = prog.main_thread().tid
|
||||
|
||||
if start_trace and img is not None:
|
||||
if start_trace:
|
||||
ghidra_trace_start(img)
|
||||
|
||||
PROGRAMS[util.selected_pid] = prog
|
||||
@@ -1146,7 +1147,7 @@ def put_frames() -> None:
|
||||
if nproc < 0:
|
||||
return
|
||||
nthrd = util.selected_thread()
|
||||
if nthrd is None:
|
||||
if nthrd is None or nthrd < 0:
|
||||
return
|
||||
thread = prog.thread(nthrd)
|
||||
if thread is None:
|
||||
|
||||
@@ -26,9 +26,9 @@ import drgn.cli
|
||||
|
||||
DrgnVersion = namedtuple('DrgnVersion', ['display', 'full'])
|
||||
|
||||
selected_pid = 0
|
||||
selected_tid = 0
|
||||
selected_level = 0
|
||||
selected_pid = -1
|
||||
selected_tid = -1
|
||||
selected_level = -1
|
||||
|
||||
|
||||
def _compute_drgn_ver() -> DrgnVersion:
|
||||
|
||||
Reference in New Issue
Block a user