From e34179aad165fdab060d2da52703f9353d490911 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 1 Nov 2019 13:20:26 +0000 Subject: [PATCH] [Dexter] Cope better with empty source locations When running a program, Dexter single steps if it's in one of the source files under test, or free-runs if it isn't. Handle the circumstance where the current source file simply isn't known. --- debuginfo-tests/dexter/dex/debugger/DebuggerBase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py b/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py index 8013ceb..57fcad0 100644 --- a/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py +++ b/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py @@ -153,6 +153,8 @@ class DebuggerBase(object, metaclass=abc.ABCMeta): def in_source_file(self, step_info): if not step_info.current_frame: return False + if not step_info.current_location.path: + return False if not os.path.exists(step_info.current_location.path): return False return any(os.path.samefile(step_info.current_location.path, f) \ -- 2.7.4