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 a0e9b82a7957d64f8d2ccf1d414910c4090a6dbd
Author: xuxingliang <[email protected]>
AuthorDate: Wed Sep 18 13:37:59 2024 +0800

    tools/gdb: always use name to read register
    
    For unknown reason, for some cases, GDB refuses to read register using 
descriptor. Let's stick to the register name.
    
    Signed-off-by: xuxingliang <[email protected]>
---
 tools/gdb/nuttxgdb/thread.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/gdb/nuttxgdb/thread.py b/tools/gdb/nuttxgdb/thread.py
index 5cfccc8036..510a6c624a 100644
--- a/tools/gdb/nuttxgdb/thread.py
+++ b/tools/gdb/nuttxgdb/thread.py
@@ -94,9 +94,6 @@ class Registers:
                 reginfo[name] = {
                     "rmt_nr": rmt_nr,  # The register number in 
remote-registers, Aka the one we saved in g_tcbinfo.
                     "tcb_reg_off": tcb_reg_off,
-                    "desc": registers.find(
-                        name
-                    ),  # Register descriptor. It's faster for 
frame.read_register
                 }
 
             Registers.reginfo = reginfo
@@ -142,8 +139,8 @@ class Registers:
 
         registers = {}
         frame = gdb.newest_frame()
-        for name, info in Registers.reginfo.items():
-            value = frame.read_register(info["desc"])
+        for name, _ in Registers.reginfo.items():
+            value = frame.read_register(name)
             registers[name] = value
 
         Registers.saved_regs = registers

Reply via email to