From 635e324e9ae8374473b253cf6a9661d754ca2af6 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Fri, 24 May 2024 12:06:24 +0800 Subject: [PATCH] gdb/thread.py:simplify the logic of nxsetregs Signed-off-by: anjiahao --- tools/gdb/thread.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/gdb/thread.py b/tools/gdb/thread.py index a902134c62f..e05780ead8e 100644 --- a/tools/gdb/thread.py +++ b/tools/gdb/thread.py @@ -93,6 +93,8 @@ class Nxsetregs(gdb.Command): gdb.lookup_type("char").pointer() ) else: + gdb.execute("set $_current_regs=tcbinfo_current_regs()") + current_regs = gdb.parse_and_eval("$_current_regs") regs = current_regs.cast(gdb.lookup_type("char").pointer()) if regs == 0: