[Lldb-commits] [lldb] r154729 - in /lldb/branches/lldb-platform-work: ./ examples/python/disasm-stress-test.py source/Host/common/Mutex.cpp

Johnny Chen johnny.chen at apple.com
Fri Apr 13 18:08:28 PDT 2012


Author: johnny
Date: Fri Apr 13 20:08:28 2012
New Revision: 154729

URL: http://llvm.org/viewvc/llvm-project?rev=154729&view=rev
Log:
Another merge from ToT:

svn merge -r 154724:154728 https://johnny@llvm.org/svn/llvm-project/lldb/trunk .

Modified:
    lldb/branches/lldb-platform-work/   (props changed)
    lldb/branches/lldb-platform-work/examples/python/disasm-stress-test.py
    lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp

Propchange: lldb/branches/lldb-platform-work/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 13 20:08:28 2012
@@ -1 +1 @@
-/lldb/trunk:154224-154724
+/lldb/trunk:154224-154728

Modified: lldb/branches/lldb-platform-work/examples/python/disasm-stress-test.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/examples/python/disasm-stress-test.py?rev=154729&r1=154728&r2=154729&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/examples/python/disasm-stress-test.py (original)
+++ lldb/branches/lldb-platform-work/examples/python/disasm-stress-test.py Fri Apr 13 20:08:28 2012
@@ -2,6 +2,21 @@
 
 import argparse, datetime, re, subprocess, sys, time
 
+parser = argparse.ArgumentParser(description="Run an exhaustive test of the LLDB disassembler for a specific architecture.")
+
+parser.add_argument('--arch', required=True, action='store', help='The architecture whose disassembler is to be tested')
+parser.add_argument('--bytes', required=True, action='store', type=int, help='The byte width of instructions for that architecture')
+parser.add_argument('--random', required=False, action='store_true', help='Enables non-sequential testing')
+parser.add_argument('--start', required=False, action='store', type=int, help='The first instruction value to test')
+parser.add_argument('--skip', required=False, action='store', type=int, help='The interval between instructions to test')
+parser.add_argument('--log', required=False, action='store', help='A log file to write the most recent instruction being tested')
+parser.add_argument('--time', required=False, action='store_true', help='Every 100,000 instructions, print an ETA to standard out')
+parser.add_argument('--lldb', required=False, action='store', help='The path to LLDB.framework, if LLDB should be overridden')
+
+arguments = sys.argv[1:]
+
+arg_ns = parser.parse_args(arguments)
+
 def AddLLDBToSysPathOnMacOSX():
     def GetLLDBFrameworkPath():
         lldb_path = subprocess.check_output(["xcrun", "-find", "lldb"])
@@ -19,24 +34,13 @@
     
     sys.path.append(lldb_framework_path + "/Resources/Python")
 
-AddLLDBToSysPathOnMacOSX()
+if arg_ns.lldb == None:
+    AddLLDBToSysPathOnMacOSX()
+else:
+    sys.path.append(arg_ns.lldb + "/Resources/Python")
 
 import lldb
 
-parser = argparse.ArgumentParser(description="Run an exhaustive test of the LLDB disassembler for a specific architecture.")
-
-parser.add_argument('--arch', required=True, action='store', help='The architecture whose disassembler is to be tested')
-parser.add_argument('--bytes', required=True, action='store', type=int, help='The byte width of instructions for that architecture')
-parser.add_argument('--random', required=False, action='store_true', help='Enables non-sequential testing')
-parser.add_argument('--start', required=False, action='store', type=int, help='The first instruction value to test')
-parser.add_argument('--skip', required=False, action='store', type=int, help='The interval between instructions to test')
-parser.add_argument('--log', required=False, action='store', help='A log file to write the most recent instruction being tested')
-parser.add_argument('--time', required=False, action='store_true', help='Every 100,000 instructions, print an ETA to standard out')
-
-arguments = sys.argv[1:]
-
-arg_ns = parser.parse_args(arguments)
-
 debugger = lldb.SBDebugger.Create()
 
 if debugger.IsValid() == False:

Modified: lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp?rev=154729&r1=154728&r2=154729&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Host/common/Mutex.cpp Fri Apr 13 20:08:28 2012
@@ -44,8 +44,8 @@
 {
     typedef std::set<pthread_mutex_t *> mutex_set;
     static pthread_mutex_t g_mutex_set_mutex = PTHREAD_MUTEX_INITIALIZER;
-    mutex_set g_initialized_mutex_set;
-    mutex_set g_destroyed_mutex_set;
+    static mutex_set g_initialized_mutex_set;
+    static mutex_set g_destroyed_mutex_set;
 
     bool success = true;
     int err;





More information about the lldb-commits mailing list