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 5aaa31337a1a0338c8a1b68a847adeb6195a97bb
Author: anjiahao <anjia...@xiaomi.com>
AuthorDate: Fri Nov 24 17:25:59 2023 +0800

    gdb/thread.py:fix a bug when use 'up' then use 'thread'
    
    Python Exception <class 'gdb.error'>: Attempt to assign to an unmodifiable 
value.
    Python Exception <class 'gdb.error'>: Error occurred in Python: Attempt to 
assign to an unmodifiable value.
    Error occurred in Python: Error occurred in Python: Attempt to assign to an 
unmodifiable value.
    
    Signed-off-by: anjiahao <anjia...@xiaomi.com>
---
 tools/gdb/thread.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/gdb/thread.py b/tools/gdb/thread.py
index 8e42919358..b82ce286c3 100644
--- a/tools/gdb/thread.py
+++ b/tools/gdb/thread.py
@@ -106,6 +106,7 @@ class Nxsetregs(gdb.Command):
             if i >= tcbinfo["regs_num"]:
                 return
 
+            gdb.execute("select-frame 0")
             if tcbinfo["reg_off"]["p"][i] != UINT16_MAX:
                 value = gdb.Value(regs + tcbinfo["reg_off"]["p"][i]).cast(
                     gdb.lookup_type("uintptr_t").pointer()

Reply via email to