refactor(gdb): refactor gdb script (#7123)

Signed-off-by: Benign X <1341398182@qq.com>
Co-authored-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Benign X
2024-10-23 13:45:18 +08:00
committed by GitHub
parent c70262696e
commit 9dfa1b8631
6 changed files with 137 additions and 91 deletions

13
scripts/gdb/gdbinit.py Normal file
View File

@@ -0,0 +1,13 @@
import sys
from os import path
here = path.dirname(path.abspath(__file__))
if __name__ == "__main__":
if here not in sys.path:
sys.path.insert(0, here)
for key in tuple(filter(lambda m: m.startswith("lvglgdb"), sys.modules.keys())):
del sys.modules[key]
import lvglgdb # noqa: F401