1
0
Fork 0
forked from nuttx/nuttx-update

tools/gdb: avoid building a full list

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
xuxingliang 2024-09-03 22:24:52 +08:00 committed by Xiang Xiao
parent ab3aa41f39
commit 4e2ad314d7
3 changed files with 4 additions and 6 deletions

View file

@ -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 = [

View file

@ -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

View file

@ -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,
)[