From ff902379f5676fe614db0e7bdc6a59a4d4ee9a22 Mon Sep 17 00:00:00 2001 From: Zachary Cutlip Date: Fri, 29 Jan 2021 12:19:56 -0800 Subject: [PATCH] fix bug saving stop-hook index --- voltron/plugins/debugger/dbg_lldb.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/voltron/plugins/debugger/dbg_lldb.py b/voltron/plugins/debugger/dbg_lldb.py index 69c58f9..7438539 100644 --- a/voltron/plugins/debugger/dbg_lldb.py +++ b/voltron/plugins/debugger/dbg_lldb.py @@ -573,8 +573,10 @@ if HAVE_LLDB: output = self.adaptor.command('target stop-hook add -o \'voltron stopped\'') try: # hahaha this sucks - self.hook_idx = int(res.GetOutput().strip().split()[2][1:]) - except: + log.debug("Saving hook index for unregistering.") + self.hook_idx = int(output.split()[2][1:]) + except Exception as e: + log.warning(f"Exception when saving hook index for unregistering. {e}") pass self.registered = True if not quiet: