OS X no longer comes with gdb but has lldb instead. jit_test.py -g runs gdb --args $command. It would be nice if it could also run lldb -- $command. We could run "gdb --version" and "lldb --version" and use the first debugger it finds. However, I've both gdb and lldb installed and I'd prefer it to try lldb first, but for others this may be different. So maybe the command line flag should also take an (optional) gdb/lldb argument.
The reftest suite already has this. We should be able to dup it to jit-tests pretty easily. 1- http://dxr.mozilla.org/mozilla-central/source/js/src/tests/jstests.py#92