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 4e2ad314d715ef439a5f1731b8b4ad478221d40b Author: xuxingliang <xuxingli...@xiaomi.com> AuthorDate: Tue Sep 3 22:24:52 2024 +0800 tools/gdb: avoid building a full list Signed-off-by: xuxingliang <xuxingli...@xiaomi.com> --- tools/gdb/fs.py | 2 +- tools/gdb/memdump.py | 2 +- tools/gdb/thread.py | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/gdb/fs.py b/tools/gdb/fs.py index c523c45e02..f00396b6d8 100644 --- a/tools/gdb/fs.py +++ b/tools/gdb/fs.py @@ -117,7 +117,7 @@ class Fdinfo(gdb.Command): output = [] if CONFIG_FS_BACKTRACE: backtrace = utils.backtrace( - [file["f_backtrace"][i] for i in range(CONFIG_FS_BACKTRACE)] + file["f_backtrace"][i] for i in range(CONFIG_FS_BACKTRACE) ) backtrace = [ diff --git a/tools/gdb/memdump.py b/tools/gdb/memdump.py index 4cb554e7b6..ff09c36b15 100644 --- a/tools/gdb/memdump.py +++ b/tools/gdb/memdump.py @@ -989,7 +989,7 @@ class Memfrag(gdb.Command): gdb.write(f"addr: {node['addr']}, size: {node['size']}\n") heapsize = gdb.parse_and_eval("*g_mmheap")["mm_heapsize"] - freesize = sum([node["size"] for node in info]) + freesize = sum(node["size"] for node in info) remaining = freesize fragrate = 0 diff --git a/tools/gdb/thread.py b/tools/gdb/thread.py index 6b6be46b73..8ab88210df 100644 --- a/tools/gdb/thread.py +++ b/tools/gdb/thread.py @@ -412,10 +412,8 @@ class Ps(gdb.Command): sigmask = "{0:#0{1}x}".format( sum( - [ - int(tcb["sigprocmask"]["_elem"][i] << i) - for i in range(get_macro("_SIGSET_NELEM")) - ] + int(tcb["sigprocmask"]["_elem"][i] << i) + for i in range(get_macro("_SIGSET_NELEM")) ), get_macro("_SIGSET_NELEM") * 8 + 2, )[