5
5
# See https://llvm.org/LICENSE.txt for license information.
6
6
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
7
"""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
9
9
out of a function being stepped through with DexStepFunction is well defined:
10
10
stepping will resume in other functions tracked further down the stacktrace.
11
11
12
- NOTE: Only supported for DAP based debuggers.
12
+ NOTE: Only supported for DAP- based debuggers.
13
13
"""
14
14
15
15
from dex .command .CommandBase import CommandBase
16
16
17
17
18
18
class DexContinue (CommandBase ):
19
19
def __init__ (self , * args , ** kwargs ):
20
+ # DexContinue(*[expr, *values], **from_line[, **to_line, **hit_count])
21
+
22
+ # Optional positional args: expr, values.
20
23
if len (args ) == 0 :
21
24
self .expression = None
22
25
self .values = []
@@ -25,9 +28,17 @@ def __init__(self, *args, **kwargs):
25
28
else :
26
29
self .expression = args [0 ]
27
30
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.
29
39
self .to_line = kwargs .pop ("to_line" , 999999 )
30
40
self .hit_count = kwargs .pop ("hit_count" , None )
41
+
31
42
if kwargs :
32
43
raise TypeError ("unexpected named args: {}" .format (", " .join (kwargs )))
33
44
super (DexContinue , self ).__init__ ()
0 commit comments