Enabled the "--debug" option functionality that will SIGSTOP the current process allowing a debugger to attach.

llvm-svn: 186194
This commit is contained in:
Greg Clayton 2013-07-12 20:08:00 +00:00
parent 687d94571c
commit e110ad8fff
1 changed files with 5 additions and 0 deletions
lldb/examples/python

View File

@ -13,6 +13,7 @@ import commands
import platform
import os
import re
import signal
import sys
try:
@ -227,6 +228,10 @@ if __name__ == '__main__':
# print "error: option parsing failed"
# sys.exit(1)
if options.debug:
print "Waiting for debugger to attach to process %d" % os.getpid()
os.kill(os.getpid(), signal.SIGSTOP)
for path in args:
# in a command - the lldb.* convenience variables are not to be used
# and their values (if any) are undefined