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
99out of a function being stepped through with DexStepFunction is well defined:
1010stepping 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
1515from dex .command .CommandBase import CommandBase
1616
1717
1818class 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__ ()
0 commit comments