From ddc2330eb951912cf63b394131cf5cfb31c68660 Mon Sep 17 00:00:00 2001 From: d-millar <33498836+d-millar@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:00:31 -0500 Subject: [PATCH] GP-6375: stack GP-6375: stack --- .../Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py | 2 ++ .../Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py | 2 ++ .../Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py | 2 ++ .../Debugger-agent-lldb/src/main/py/src/ghidralldb/methods.py | 2 ++ .../src/main/py/src/ghidraxdbg/commands.py | 2 ++ 5 files changed, 10 insertions(+) diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py index ba720d8170..c3ec740ecd 100644 --- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py +++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/py/src/ghidradbg/commands.py @@ -1341,6 +1341,8 @@ def put_threads(running: bool = False) -> None: tobj.set_value('TEB', hex(int(t[1]))) tobj.set_value('Name', t[2]) tobj.insert() + stackobj = trace.create_object(tpath+".Stack") + stackobj.insert() trace.proxy_object_path(THREADS_PATTERN.format( procnum=nproc)).retain_values(keys) diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py index edc4dfdaf9..84a4109e91 100644 --- a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py +++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py @@ -1391,6 +1391,8 @@ def put_threads() -> None: tobj.set_value('_short_display', f'[{inf.num}.{t.num}:{tidstr}]') tobj.set_value('_display', compute_thread_display(t)) tobj.insert() + stackobj = trace.create_object(tpath+".Stack") + stackobj.insert() trace.proxy_object_path( THREADS_PATTERN.format(infnum=inf.num)).retain_values(keys) diff --git a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py index 0fa5cea709..b7edffe169 100644 --- a/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py +++ b/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py @@ -1838,6 +1838,8 @@ def put_threads() -> None: f'[{proc.GetProcessID()}.{t.GetThreadID()}:{tidstr}]') tobj.set_value('_display', compute_thread_display(t)) tobj.insert() + stackobj = trace.create_object(tpath+".Stack") + stackobj.insert() trace.proxy_object_path( THREADS_PATTERN.format(procnum=proc.GetProcessID())).retain_values(keys) 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.py index 158b91449f..7cfd0a9d7e 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 @@ -431,6 +431,8 @@ def activate_thread(thread: Thread) -> None: def activate_frame(frame: StackFrame) -> None: """Select the frame.""" f = find_frame_by_obj(frame) + t = f.GetThread() + t.process.SetSelectedThread(t) f.thread.SetSelectedFrame(f.GetFrameID()) diff --git a/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py b/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py index 6955bc7c9c..4913e14163 100644 --- a/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py +++ b/Ghidra/Debug/Debugger-agent-x64dbg/src/main/py/src/ghidraxdbg/commands.py @@ -1154,6 +1154,8 @@ def put_threads(running: bool = False) -> None: base, offset_base = mapper.map(pid, thread_data.lpThreadLocalBase) tobj.set_value('TLB', offset_base) tobj.insert() + stackobj = trace.create_object(tpath+".Stack") + stackobj.insert() trace.proxy_object_path(THREADS_PATTERN.format( procnum=pid)).retain_values(keys)