Skip to content

Commit

Permalink
[DexTer] Add step.UNKNOWN check for NoneType line numbers.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Tom Weaver authored and Tom Weaver committed Mar 16, 2020
1 parent 07a4154 commit 09f4bdc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions debuginfo-tests/dexter/dex/dextIR/DextIR.py
Expand Up @@ -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
Expand Down

0 comments on commit 09f4bdc

Please sign in to comment.