mirror of
https://github.com/apache/nuttx.git
synced 2026-09-21 13:25:12 +08:00
nxgdb/thread: fix ps command
Fix ps command reports wrong running stack corruption. To get running tcb registers, need to read from frame register not the tcb context. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -514,7 +514,7 @@ class Ps(gdb.Command):
|
||||
int(tcb["stack_base_ptr"]),
|
||||
int(tcb["stack_alloc_ptr"]),
|
||||
int(tcb["adj_stack_size"]),
|
||||
utils.get_sp(tcb),
|
||||
utils.get_sp(tcb if tcb["task_state"] != TSTATE_TASK_RUNNING else None),
|
||||
4,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user