gdb: print trace back when some modules failed to load
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
400790d40b
commit
6119a5ea63
1 changed files with 2 additions and 0 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue