From 91db419cbc339427f230ca409dde4bc2798cdcc4 Mon Sep 17 00:00:00 2001 From: wadesong <wadesong@codeaurora.org> Date: Mon, 8 Jan 2018 18:29:01 +0800 Subject: [PATCH] lrdp-v2: Gdbmi interface clean up When LRDP-v2 starts to parse RAM dumps, it will initialize pipes to gdb instance, but on exit, the same pipes are not closed due to __del__ is not invoked in ramdump.py. This will cause the python environment raising the following exception, which will not be handled by LRDP-v2 after it's unloaded: close failed in file object destructor: sys.excepthook is missing lost sys.stderr Add explicit gdbmi closure when RamDump instance is not used any more, to avoid the unhandled exception. Change-Id: I7cebd1418440ba56f9d7c4374286a5b088d948dc --- linux-ramdump-parser-v2/ramparse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-ramdump-parser-v2/ramparse.py b/linux-ramdump-parser-v2/ramparse.py index 10ecfdc..ef9f967 100644 --- a/linux-ramdump-parser-v2/ramparse.py +++ b/linux-ramdump-parser-v2/ramparse.py @@ -418,3 +418,5 @@ if __name__ == '__main__': if options.t32launcher or options.everything or options.minidump: dump.create_t32_launcher() + dump.gdbmi.close() + -- GitLab