This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 635e324e9ae8374473b253cf6a9661d754ca2af6
Author: anjiahao <anjia...@xiaomi.com>
AuthorDate: Fri May 24 12:06:24 2024 +0800

    gdb/thread.py:simplify the logic of nxsetregs
    
    Signed-off-by: anjiahao <anjia...@xiaomi.com>
---
 tools/gdb/thread.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/gdb/thread.py b/tools/gdb/thread.py
index a902134c62..e05780ead8 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:

Reply via email to