[debuginfo-tests] 09f4bdc - [DexTer] Add step.UNKNOWN check for NoneType line numbers.
Tom Weaver via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 09:41:34 PDT 2020
Author: Tom Weaver
Date: 2020-03-16T16:38:41Z
New Revision: 09f4bdc03f891cbcf0c5633c8c7013eb0fbe626f
URL: https://github.com/llvm/llvm-project/commit/09f4bdc03f891cbcf0c5633c8c7013eb0fbe626f
DIFF: https://github.com/llvm/llvm-project/commit/09f4bdc03f891cbcf0c5633c8c7013eb0fbe626f.diff
LOG: [DexTer] Add step.UNKNOWN check for NoneType line numbers.
Summary: It's possible for an instance of the visual studio debugger
to return a NoneType line number location when stepping during a
debugging session.
This patches teaches DexTer how to handle this particular case without
crashing out.
Reviewers: Orlando
Differential revision: https://reviews.llvm.org/D75992
Added:
Modified:
debuginfo-tests/dexter/dex/dextIR/DextIR.py
Removed:
################################################################################
diff --git a/debuginfo-tests/dexter/dex/dextIR/DextIR.py b/debuginfo-tests/dexter/dex/dextIR/DextIR.py
index 7638e8b4ab78..b82c2bab56de 100644
--- a/debuginfo-tests/dexter/dex/dextIR/DextIR.py
+++ b/debuginfo-tests/dexter/dex/dextIR/DextIR.py
@@ -102,6 +102,10 @@ def _get_new_step_kind(self, context, step):
frame_step = self._get_prev_step_in_this_frame(step)
prev_step = frame_step if frame_step is not None else prev_step
+ # If we're missing line numbers to compare then the step kind has to be UNKNOWN.
+ if prev_step.current_location.lineno is None or step.current_location.lineno is None:
+ return StepKind.UNKNOWN
+
# We're in the same func as prev step, check lineo.
if prev_step.current_location.lineno > step.current_location.lineno:
return StepKind.VERTICAL_BACKWARD
More information about the llvm-commits
mailing list