[Lldb-commits] [lldb] r186194 - Enabled the "--debug" option functionality that will SIGSTOP the current process allowing a debugger to attach.
Greg Clayton
gclayton at apple.com
Fri Jul 12 13:08:00 PDT 2013
Author: gclayton
Date: Fri Jul 12 15:08:00 2013
New Revision: 186194
URL: http://llvm.org/viewvc/llvm-project?rev=186194&view=rev
Log:
Enabled the "--debug" option functionality that will SIGSTOP the current process allowing a debugger to attach.
Modified:
lldb/trunk/examples/python/types.py
Modified: lldb/trunk/examples/python/types.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/types.py?rev=186194&r1=186193&r2=186194&view=diff
==============================================================================
--- lldb/trunk/examples/python/types.py (original)
+++ lldb/trunk/examples/python/types.py Fri Jul 12 15:08:00 2013
@@ -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
More information about the lldb-commits
mailing list