Bug 1075072 - Pass debuggerArgs as a string to get_debugger_info. r=ted

This commit is contained in:
Tom Tromey 2014-10-24 09:40:00 -04:00
parent 9727b6e00e
commit 35aa289f3b
2 changed files with 6 additions and 10 deletions

View File

@ -84,9 +84,9 @@ def get_debugger_info(debugger, debuggerArgs = None, debuggerInteractive = False
If the debugger cannot be found in the system, returns |None|.
:param debugger: The name of the debugger.
:param debuggerArgs: If specified, it's the list of arguments to pass to the
debugger. A debugger specific separator arguments is appended at the end of
that list.
:param debuggerArgs: If specified, it's the arguments to pass to the debugger,
as a string. Any debugger-specific separator arguments are appended after these
arguments.
:param debuggerInteractive: If specified, forces the debugger to be interactive.
'''
@ -118,13 +118,14 @@ def get_debugger_info(debugger, debuggerArgs = None, debuggerInteractive = False
['path', 'interactive', 'args', 'requiresEscapedArgs']
)
debugger_arguments = get_debugger_info('args', [])
debugger_arguments = []
# Extend the default arguments for the chosen debugger with the ones passed in, if any.
if debuggerArgs:
# Append the provided debugger arguments at the end of the arguments list.
debugger_arguments += debuggerArgs.split()
debugger_arguments += get_debugger_info('args', [])
# Override the default debugger interactive mode if needed.
debugger_interactive = get_debugger_info('interactive', False)
if debuggerInteractive:

View File

@ -1074,11 +1074,6 @@ class XPCShellTests(object):
self.debuggerInfo = None
if debugger:
# We need a list of arguments, not a string, to feed into
# the debugger
if debuggerArgs:
debuggerArgs = debuggerArgs.split();
self.debuggerInfo = mozdebug.get_debugger_info(debugger, debuggerArgs, debuggerInteractive)
self.xpcshell = xpcshell