mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 09:49:21 +08:00
regression: use stack TLS region to retrieve task argument vector
ta_argv is removed, we use pointer to the TLS instead Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
This commit is contained in:
parent
7daecfb10c
commit
fa8aff6d9b
1 changed files with 10 additions and 3 deletions
|
@ -448,11 +448,18 @@ class Ps(gdb.Command):
|
||||||
ptcb = cast2ptr(tcb, "struct pthread_tcb_s")
|
ptcb = cast2ptr(tcb, "struct pthread_tcb_s")
|
||||||
arg = ptcb["arg"]
|
arg = ptcb["arg"]
|
||||||
cmd = " ".join((name, hex(entry), hex(arg)))
|
cmd = " ".join((name, hex(entry), hex(arg)))
|
||||||
|
elif tcb["pid"] < get_macro("CONFIG_SMP_NCPUS"):
|
||||||
|
# This must be the Idle Tasks, hence we just get its name
|
||||||
|
cmd = name
|
||||||
else:
|
else:
|
||||||
argv = tcb["group"]["tg_info"]["ta_argv"] + 1
|
# For tasks other than pthreads, hence need to get its command line
|
||||||
|
# arguments from
|
||||||
|
argv = (
|
||||||
|
tcb["stack_alloc_ptr"]
|
||||||
|
+ cast2ptr(tcb["stack_alloc_ptr"], "struct tls_info_s")["tl_size"]
|
||||||
|
)
|
||||||
args = []
|
args = []
|
||||||
parg = argv
|
parg = argv.cast(gdb.lookup_type("char").pointer().pointer()) + 1
|
||||||
while parg.dereference():
|
while parg.dereference():
|
||||||
args.append(parg.dereference().string())
|
args.append(parg.dereference().string())
|
||||||
parg += 1
|
parg += 1
|
||||||
|
|
Loading…
Reference in a new issue