================ @@ -487,115 +453,36 @@ def cleanup(): response = self.dap_server.request_launch( program, - args=args, - cwd=cwd, - env=env, stopOnEntry=stopOnEntry, - disableASLR=disableASLR, - disableSTDIO=disableSTDIO, - shellExpandArguments=shellExpandArguments, - trace=trace, - initCommands=initCommands, - preRunCommands=preRunCommands, - stopCommands=stopCommands, - exitCommands=exitCommands, - terminateCommands=terminateCommands, - sourcePath=sourcePath, - debuggerRoot=debuggerRoot, - launchCommands=launchCommands, - sourceMap=sourceMap, - runInTerminal=runInTerminal, - postRunCommands=postRunCommands, - enableAutoVariableSummaries=enableAutoVariableSummaries, - displayExtendedBacktrace=displayExtendedBacktrace, - enableSyntheticChildDebugging=enableSyntheticChildDebugging, - commandEscapePrefix=commandEscapePrefix, - customFrameFormat=customFrameFormat, - customThreadFormat=customThreadFormat, + **kwargs, ) if expectFailure: return response - if not (response and response["success"]): self.assertTrue( response["success"], "launch failed (%s)" % (response["body"]["error"]["format"]), ) + if stopOnEntry: + self.dap_server.wait_for_stopped(timeout) + return response def build_and_launch( self, program, - args=None, - cwd=None, - env=None, - stopOnEntry=False, - disableASLR=False, - disableSTDIO=False, - shellExpandArguments=False, - trace=False, - initCommands=None, - preRunCommands=None, - stopCommands=None, - exitCommands=None, - terminateCommands=None, - sourcePath=None, - debuggerRoot=None, - sourceInitFile=False, - runInTerminal=False, - disconnectAutomatically=True, - postRunCommands=None, + /, ---------------- ashgti wrote:
`/` is a separator to mark the end of the positional args. I switched it to `*` which means the remainder of the args are required to be kwargs. At a high level its: ``` def name(positional_only_parameters, /, positional_or_keyword_parameters, *, keyword_only_parameters): ``` I was trying to DRY up the definitions by using kwargs to forward to the dap_server.py method. https://github.com/llvm/llvm-project/pull/140107 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits