Bug 735118 - Add a --debugger flag on jstests.py to allow setting the debugger name and args to use. r=dmandelin

--HG--
extra : rebase_source : 19d4aaeaf8ddbe83d7b529cafd472e1edae783c1
This commit is contained in:
Steve Fink 2012-03-13 14:21:58 -07:00
parent 8f10efae3b
commit 8fedb6a491

View File

@ -83,6 +83,8 @@ if __name__ == '__main__':
help='extra args to pass to the JS shell')
op.add_option('-g', '--debug', dest='debug', action='store_true',
help='run test in debugger')
op.add_option('--debugger', dest='debugger', default='gdb -q --args',
help='debugger command')
op.add_option('--valgrind', dest='valgrind', action='store_true',
help='run tests in valgrind')
op.add_option('--valgrind-args', dest='valgrind_args',
@ -112,7 +114,7 @@ if __name__ == '__main__':
if OPTIONS.valgrind:
print >> sys.stderr, "--debug and --valgrind options are mutually exclusive"
sys.exit(2)
debugger_prefix = ['gdb', '-q', '--args']
debugger_prefix = OPTIONS.debugger.split(' ')
elif OPTIONS.valgrind:
debugger_prefix = ['valgrind']
if os.uname()[0] == 'Darwin':