[Lldb-commits] [lldb] r111198 - /lldb/trunk/test/dotest.py

Johnny Chen johnny.chen at apple.com
Mon Aug 16 15:37:45 PDT 2010


Author: johnny
Date: Mon Aug 16 17:37:45 2010
New Revision: 111198

URL: http://llvm.org/viewvc/llvm-project?rev=111198&view=rev
Log:
Added logging for process.gdb-remote by defining an environment variable named
GDB_REMOTE_LOG which specifies the log file pathname.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=111198&r1=111197&r2=111198&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Mon Aug 16 17:37:45 2010
@@ -172,7 +172,7 @@
 lldb.DBG = lldb.SBDebugger.Create()
 
 # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
-# is defined.  Use ${LLDB_LOG} to specify the log file.
+# defined.  Use ${LLDB_LOG} to specify the log file.
 ci = lldb.DBG.GetCommandInterpreter()
 res = lldb.SBCommandReturnObject()
 if ("LLDB_LOG" in os.environ):
@@ -180,6 +180,13 @@
         "log enable -f " + os.environ["LLDB_LOG"] + " lldb default", res)
     if not res.Succeeded():
         raise Exception('log enable failed (check your LLDB_LOG env variable...')
+# Ditto for gdb-remote logging if ${LLDB_LOG} environment variable is defined.
+# Use ${GDB_REMOTE_LOG} to specify the log file.
+if ("GDB_REMOTE_LOG" in os.environ):
+    ci.HandleCommand(
+        "log enable -f " + os.environ["GDB_REMOTE_LOG"] + " process.gdb-remote packets", res)
+    if not res.Succeeded():
+        raise Exception('log enable failed (check your GDB_REMOTE_LOG env variable...')
 
 # Install the control-c handler.
 unittest2.signals.installHandler()





More information about the lldb-commits mailing list