gdb: check if pid is valid
Add check to make sure pid is valid. Remove stack check for interrupt context. Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
1f2435641d
commit
1d55f111f3
1 changed files with 5 additions and 1 deletions
|
|
@ -366,7 +366,11 @@ class Nxthread(gdb.Command):
|
|||
g_registers.restore()
|
||||
|
||||
else:
|
||||
if arg[0].isnumeric() and pidhash[int(arg[0])] != 0:
|
||||
if (
|
||||
arg[0].isnumeric()
|
||||
and int(arg[0]) < npidhash
|
||||
and pidhash[int(arg[0])] != 0
|
||||
):
|
||||
if pidhash[int(arg[0])]["task_state"] == gdb.parse_and_eval(
|
||||
"TSTATE_TASK_RUNNING"
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue