forked from nuttx/nuttx-update
tools/gdb: avoid building a full list
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
ab3aa41f39
commit
4e2ad314d7
3 changed files with 4 additions and 6 deletions
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
)[
|
||||
|
|
Loading…
Reference in a new issue