Skip to content

Commit 09f4bdc

Browse files
Tom WeaverTom Weaver
Tom Weaver
authored and
Tom Weaver
committed
[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
1 parent 07a4154 commit 09f4bdc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

debuginfo-tests/dexter/dex/dextIR/DextIR.py

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def _get_new_step_kind(self, context, step):
102102
frame_step = self._get_prev_step_in_this_frame(step)
103103
prev_step = frame_step if frame_step is not None else prev_step
104104

105+
# If we're missing line numbers to compare then the step kind has to be UNKNOWN.
106+
if prev_step.current_location.lineno is None or step.current_location.lineno is None:
107+
return StepKind.UNKNOWN
108+
105109
# We're in the same func as prev step, check lineo.
106110
if prev_step.current_location.lineno > step.current_location.lineno:
107111
return StepKind.VERTICAL_BACKWARD

0 commit comments

Comments
 (0)