gdb: print trace back when some modules failed to load

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
xuxingliang 2024-11-21 16:38:16 +08:00 committed by Xiang Xiao
parent 400790d40b
commit 6119a5ea63

View file

@ -21,6 +21,7 @@
############################################################################
import importlib
import traceback
from os import path
import gdb
@ -53,6 +54,7 @@ def register_commands(event):
module = importlib.import_module(f"{__package__}.{m}")
except Exception as e:
gdb.write(f"\x1b[31;1mIgnore module: {m}, error: {e}\n\x1b[m")
traceback.print_exc()
return
for c in module.__dict__.values():