Skip to content

Commit 7481ad0

Browse files
committed
address comments
1 parent 32b2a13 commit 7481ad0

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

cross-project-tests/debuginfo-tests/dexter/Commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ line this command is found on.
390390
triggers.
391391

392392
### Description
393-
NOTE: Only supported for DAP based debuggers.
393+
NOTE: Only supported for DAP-based debuggers.
394394

395395
This command controls stepping behaviour: Tell dexter to set a function
396396
breakpoint and step through the function after hitting it. Composes well with
@@ -407,7 +407,7 @@ itself (you can may a callstack with multiple targets to step through) and
407407
triggers.
408408

409409
### Description
410-
NOTE: Only supported for DAP based debuggers.
410+
NOTE: Only supported for DAP-based debuggers.
411411

412412
This command controls stepping behaviour: Tell dexter to set a breakpoint on
413413
`from_line`. When it is hit and optionally '(expr) == (values[n])' is true,

cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexContinue.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@
55
# See https://llvm.org/LICENSE.txt for license information.
66
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
"""A Command that tells dexter to set a breakpoint which, after hitting,
8-
signals that the debugger shuold 'continue' until another is hit. Continuing
8+
signals that the debugger should 'continue' until another is hit. Continuing
99
out of a function being stepped through with DexStepFunction is well defined:
1010
stepping will resume in other functions tracked further down the stacktrace.
1111
12-
NOTE: Only supported for DAP based debuggers.
12+
NOTE: Only supported for DAP-based debuggers.
1313
"""
1414

1515
from dex.command.CommandBase import CommandBase
1616

1717

1818
class DexContinue(CommandBase):
1919
def __init__(self, *args, **kwargs):
20+
# DexContinue(*[expr, *values], **from_line[, **to_line, **hit_count])
21+
22+
# Optional positional args: expr, values.
2023
if len(args) == 0:
2124
self.expression = None
2225
self.values = []
@@ -25,9 +28,17 @@ def __init__(self, *args, **kwargs):
2528
else:
2629
self.expression = args[0]
2730
self.values = [str(arg) for arg in args[1:]]
28-
self.from_line = kwargs.pop("from_line", 1)
31+
32+
# Required keyword arg: from_line.
33+
try:
34+
self.from_line = kwargs.pop("from_line")
35+
except:
36+
raise TypeError("Missing from_line argument")
37+
38+
# Optional conditional args: to_line, hit_count.
2939
self.to_line = kwargs.pop("to_line", 999999)
3040
self.hit_count = kwargs.pop("hit_count", None)
41+
3142
if kwargs:
3243
raise TypeError("unexpected named args: {}".format(", ".join(kwargs)))
3344
super(DexContinue, self).__init__()

cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexStepFunction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""A Command that tells dexter to set a function breakpoint and step through
88
the function after hitting it.
99
10-
NOTE: Only supported for DAP based debuggers.
10+
NOTE: Only supported for DAP-based debuggers.
1111
"""
1212

1313
from dex.command.CommandBase import CommandBase

0 commit comments

Comments
 (0)