Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-06 Thread Joerg Sonnenberger via lldb-commits
joerg accepted this revision.
joerg added a reviewer: joerg.
joerg added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rL LLVM

http://reviews.llvm.org/D14042



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252390 - Add SBType::IsAnonymousType() and relative plumbing in the debugger internals

2015-11-06 Thread Enrico Granata via lldb-commits
Author: enrico
Date: Fri Nov  6 20:06:57 2015
New Revision: 252390

URL: http://llvm.org/viewvc/llvm-project?rev=252390=rev
Log:
Add SBType::IsAnonymousType() and relative plumbing in the debugger internals

For language that support such a thing, this API allows to ask whether a type 
is anonymous (i.e. has been given no name)

Comes with test case


Modified:
lldb/trunk/include/lldb/API/SBType.h
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/include/lldb/Symbol/CompilerType.h
lldb/trunk/include/lldb/Symbol/TypeSystem.h
lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
lldb/trunk/packages/Python/lldbsuite/test/python_api/type/main.cpp
lldb/trunk/scripts/interface/SBType.i
lldb/trunk/source/API/SBType.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/CompilerType.cpp
lldb/trunk/source/Symbol/TypeSystem.cpp

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=252390=252389=252390=diff
==
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Fri Nov  6 20:06:57 2015
@@ -158,6 +158,9 @@ public:
 bool
 IsTypedefType ();
 
+bool
+IsAnonymousType ();
+
 lldb::SBType
 GetPointerType();
 

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=252390=252389=252390=diff
==
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Fri Nov  6 20:06:57 2015
@@ -606,6 +606,9 @@ public:
 IsAggregateType (lldb::opaque_compiler_type_t type) override;
 
 bool
+IsAnonymousType (lldb::opaque_compiler_type_t type) override;
+
+bool
 IsBeingDefined (lldb::opaque_compiler_type_t type) override;
 
 bool

Modified: lldb/trunk/include/lldb/Symbol/CompilerType.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompilerType.h?rev=252390=252389=252390=diff
==
--- lldb/trunk/include/lldb/Symbol/CompilerType.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompilerType.h Fri Nov  6 20:06:57 2015
@@ -107,6 +107,9 @@ public:
 IsAggregateType () const;
 
 bool
+IsAnonymousType () const;
+
+bool
 IsBeingDefined () const;
 
 bool

Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=252390=252389=252390=diff
==
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Fri Nov  6 20:06:57 2015
@@ -153,6 +153,9 @@ public:
 
 virtual bool
 IsAggregateType (lldb::opaque_compiler_type_t type) = 0;
+
+virtual bool
+IsAnonymousType (lldb::opaque_compiler_type_t type);
 
 virtual bool
 IsCharType (lldb::opaque_compiler_type_t type) = 0;

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py?rev=252390=252389=252390=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py 
Fri Nov  6 20:06:57 2015
@@ -59,11 +59,16 @@ class TypeAndTypeListTestCase(TestBase):
 for type in type_list:
 self.assertTrue(type)
 self.DebugSBType(type)
+self.assertFalse(type.IsAnonymousType(), "Task is not anonymous")
 for field in type.fields:
 if field.name == "type":
 for enum_member in field.type.enum_members:
 self.assertTrue(enum_member)
 self.DebugSBType(enum_member.type)
+elif field.name == "my_type_is_nameless":
+self.assertTrue(field.type.IsAnonymousType(), 
"my_type_is_nameless has an anonymous type")
+elif field.name == "my_type_is_named":
+self.assertFalse(field.type.IsAnonymousType(), 
"my_type_is_named has a named type")
 
 # Pass an empty string.  LLDB should not crash. :-)
 fuzz_types = target.FindTypes(None)

Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/type/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/type/main.cpp?rev=252390=252389=252390=diff

[Lldb-commits] [lldb] r252356 - Make the language specifier to "break set" actually filter the names by their language. So for

2015-11-06 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Fri Nov  6 16:48:59 2015
New Revision: 252356

URL: http://llvm.org/viewvc/llvm-project?rev=252356=rev
Log:
Make the language specifier to "break set" actually filter the names by their 
language.  So for
instance:

break set -l c++ -r Name

will only break on C++ symbols that match Name, not ObjC or plain C symbols.  
This also works
for "break set -n" and there are SB API's to pass this as well.

Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/a.c

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/b.cpp

lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/main.cpp
Modified:
lldb/trunk/include/lldb/API/SBTarget.h
lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
lldb/trunk/include/lldb/Target/LanguageRuntime.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/scripts/interface/SBTarget.i
lldb/trunk/source/API/SBTarget.cpp
lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Target/LanguageRuntime.cpp
lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=252356=252355=252356=diff
==
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Fri Nov  6 16:48:59 2015
@@ -636,20 +636,41 @@ public:
 const SBFileSpecList _unit_list);
 
 lldb::SBBreakpoint
+BreakpointCreateByName (const char *symbol_name,
+uint32_t name_type_mask,   // Logical OR 
one or more FunctionNameType enum bits
+lldb::LanguageType symbol_language,
+const SBFileSpecList _list, 
+const SBFileSpecList _unit_list);
+
+lldb::SBBreakpoint
+BreakpointCreateByNames (const char *symbol_name[],
+ uint32_t num_names,
+ uint32_t name_type_mask,   // Logical OR 
one or more FunctionNameType enum bits
+ const SBFileSpecList _list,
+ const SBFileSpecList _unit_list);
+
+lldb::SBBreakpoint
 BreakpointCreateByNames (const char *symbol_name[],
  uint32_t num_names,
  uint32_t name_type_mask,   // Logical OR 
one or more FunctionNameType enum bits
+ lldb::LanguageType symbol_language,
  const SBFileSpecList _list,
  const SBFileSpecList _unit_list);
 
 lldb::SBBreakpoint
-BreakpointCreateByRegex(const char *symbol_name_regex, const char 
*module_name = nullptr);
+BreakpointCreateByRegex (const char *symbol_name_regex, const char 
*module_name = nullptr);
 
 lldb::SBBreakpoint
 BreakpointCreateByRegex (const char *symbol_name_regex, 
  const SBFileSpecList _list, 
  const SBFileSpecList _unit_list);
 
+lldb::SBBreakpoint
+BreakpointCreateByRegex (const char *symbol_name_regex,
+ lldb::LanguageType symbol_language,
+ const SBFileSpecList _list, 
+ const SBFileSpecList _unit_list);
+
 lldb::SBBreakpoint
 BreakpointCreateBySourceRegex(const char *source_regex,
   const SBFileSpec _file,

Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h?rev=252356=252355=252356=diff
==
--- lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/BreakpointResolverName.h Fri Nov  6 
16:48:59 2015
@@ -57,6 +57,7 @@ public:
 // Creates a function breakpoint by regular expression.  Takes over 
control of the lifespan of func_regex.
 BreakpointResolverName (Breakpoint *bkpt,
 RegularExpression _regex,
+lldb::LanguageType language,
 bool skip_prologue);
 
 BreakpointResolverName (Breakpoint *bkpt,

Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: 

[Lldb-commits] [lldb] r252382 - Python 3 - Use __bool__() instead of __nonzero__() for truthiness.

2015-11-06 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Nov  6 19:08:25 2015
New Revision: 252382

URL: http://llvm.org/viewvc/llvm-project?rev=252382=rev
Log:
Python 3 - Use __bool__() instead of __nonzero__() for truthiness.

Python has a complicated mechanism of checking an objects truthity.
This involves a number of steps, which end with calling two private
methods on an object (if they are implemented).  In Python 2 these
two methods are `__nonzero__` and `__len__`, and in Python 3 they
are `__bool__` and `__len__`.  Because we *also* define a __len__
method for certain iterable types, this was triggering a situation
in Python 3 where `__nonzero__` wasn't defined, so it was calling
`__len__`, which was returning 0 (for example an SBDebugger with
no targets), and as a result the truthosity was determined to be
False.

We fix this by correctly using ` __bool__` for Python 3, and leave
the behavior under Python 2 unchanged.

Note that this fix is only implemented in the SWIG generation
python script, and not the SWIG generation shell script.  Someone
more familiar than me with shell scripts will need to fix them
to support this for Python 3 if desired.

Added:
lldb/trunk/scripts/Python/use_lldb_suite.py
lldb/trunk/scripts/use_lldb_suite.py
Modified:
lldb/trunk/scripts/CMakeLists.txt
lldb/trunk/scripts/Python/modify-python-lldb.py

Modified: lldb/trunk/scripts/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=252382=252381=252382=diff
==
--- lldb/trunk/scripts/CMakeLists.txt (original)
+++ lldb/trunk/scripts/CMakeLists.txt Fri Nov  6 19:08:25 2015
@@ -15,7 +15,8 @@ add_custom_command(
   DEPENDS ${SWIG_SOURCES}
   DEPENDS ${SWIG_INTERFACES}
   DEPENDS ${SWIG_HEADERS}
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/buildSwigPython.py
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/modify-python-lldb.py
   COMMAND ${PYTHON_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/buildSwigWrapperClasses.py 
"--srcRoot=${LLDB_SOURCE_DIR}" "--targetDir=${CMAKE_CURRENT_BINARY_DIR}" 
"--cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}" "--prefix=${CMAKE_BINARY_DIR}" 
"--swigExecutable=${SWIG_EXECUTABLE}" -m
   COMMENT "Python script building LLDB Python wrapper")
 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp 
PROPERTIES GENERATED 1)

Modified: lldb/trunk/scripts/Python/modify-python-lldb.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=252382=252381=252382=diff
==
--- lldb/trunk/scripts/Python/modify-python-lldb.py (original)
+++ lldb/trunk/scripts/Python/modify-python-lldb.py Fri Nov  6 19:08:25 2015
@@ -21,12 +21,21 @@
 # subsystem.
 #
 
+# System modules
 import sys, re
 if sys.version_info.major >= 3:
 import io as StringIO
 else:
 import StringIO
 
+# import use_lldb_suite so we can find third-party and helper modules
+import use_lldb_suite
+
+# Third party modules
+import six
+
+# LLDB modules
+
 if len(sys.argv) != 2:
 output_name = "./lldb.py"
 else:
@@ -190,9 +199,15 @@ eq_def = "def __eq__(self, other): r
 ne_def = "def __ne__(self, other): return not self.__eq__(other)"
 
 # Called to implement truth value testing and the built-in operation bool();
+# Note that Python 2 uses __nonzero__(), whereas Python 3 uses __bool__()
 # should return False or True, or their integer equivalents 0 or 1.
 # Delegate to self.IsValid() if it is defined for the current lldb object.
-nonzero_def = "def __nonzero__(self): return self.IsValid()"
+
+if six.PY2:
+print("Test")
+nonzero_def = "def __nonzero__(self): return self.IsValid()"
+else:
+nonzero_def = "def __bool__(self): return self.IsValid()"
 
 # A convenience iterator for SBSymbol!
 symbol_in_section_iter_def = '''

Added: lldb/trunk/scripts/Python/use_lldb_suite.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/use_lldb_suite.py?rev=252382=auto
==
--- lldb/trunk/scripts/Python/use_lldb_suite.py (added)
+++ lldb/trunk/scripts/Python/use_lldb_suite.py Fri Nov  6 19:08:25 2015
@@ -0,0 +1,22 @@
+import inspect
+import os
+import sys
+
+def find_lldb_root():
+lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
+while True:
+lldb_root = os.path.dirname(lldb_root)
+if lldb_root is None:
+return None
+
+test_path = os.path.join(lldb_root, "lldb.root")
+if os.path.isfile(test_path):
+return lldb_root
+return None
+
+lldb_root = find_lldb_root()
+if lldb_root is not None:
+import imp
+module = imp.find_module("use_lldb_suite_root", [lldb_root])
+if module is not None:
+imp.load_module("use_lldb_suite_root", *module)

Added: 

[Lldb-commits] [lldb] r252381 - Python 3 - Don't use unbuffered I/O in text mode.

2015-11-06 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Nov  6 19:08:15 2015
New Revision: 252381

URL: http://llvm.org/viewvc/llvm-project?rev=252381=rev
Log:
Python 3 - Don't use unbuffered I/O in text mode.

This is unsupported in Python 3.  This could also have been fixed
by using "wb" instead of "w", but it doesn't seem like writing the
session log absolutely *needs* to be unbuffered.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=252381=252380=252381=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov  6 19:08:15 
2015
@@ -1413,8 +1413,8 @@ class Base(unittest2.TestCase):
 self.log_basename = self.getLogBasenameForCurrentTest()
 
 session_file = "{}.log".format(self.log_basename)
-unbuffered = 0 # 0 is the constant for unbuffered
-self.session = open(session_file, "w", unbuffered)
+# Python 3 doesn't support unbuffered I/O in text mode.  Open buffered.
+self.session = open(session_file, "w")
 
 # Optimistically set __errored__, __failed__, __expected__ to False
 # initially.  If the test errored/failed, the session info


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252374 - Fix some Clang-tidy warnings and formatting in recently added code.

2015-11-06 Thread Eugene Zelenko via lldb-commits
Author: eugenezelenko
Date: Fri Nov  6 18:28:50 2015
New Revision: 252374

URL: http://llvm.org/viewvc/llvm-project?rev=252374=rev
Log:
Fix some Clang-tidy warnings and formatting in recently added code.

Fixed Clang-tidy warnings:

* modernize-use-override;
* modernize-use-nullptr;
* modernize-use-default;
* readability-simplify-boolean-expr.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp
lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.h
lldb/trunk/source/Plugins/Language/Go/GoFormatterFunctions.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h

Modified: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp?rev=252374=252373=252374=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp Fri Nov  
6 18:28:50 2015
@@ -1,4 +1,4 @@
-//===-- GoUserExpression.cpp -*- C++ -*-===//
+//===-- GoUserExpression.cpp *- C++ 
-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -7,16 +7,23 @@
 //
 
//===--===//
 
+// C Includes
 #include 
 #if HAVE_SYS_TYPES_H
 #include 
 #endif
 
+// C++ Includes
 #include 
+#include 
 #include 
-#include 
 #include 
 
+// Other libraries and framework includes
+#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/StringMap.h"
+
+// Project includes
 #include "GoUserExpression.h"
 
 #include "lldb/lldb-private.h"
@@ -41,8 +48,6 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanCallUserExpression.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringMap.h"
 
 #include "Plugins/ExpressionParser/Go/GoAST.h"
 #include "Plugins/ExpressionParser/Go/GoParser.h"
@@ -86,6 +91,7 @@ class GoUserExpression::GoInterpreter
 m_parser.GetError(m_error);
 return nullptr;
 }
+
 ValueObjectSP VisitParenExpr(const GoASTParenExpr *e);
 ValueObjectSP VisitIdent(const GoASTIdent *e);
 ValueObjectSP VisitStarExpr(const GoASTStarExpr *e);
@@ -94,66 +100,79 @@ class GoUserExpression::GoInterpreter
 ValueObjectSP VisitIndexExpr(const GoASTIndexExpr *e);
 ValueObjectSP VisitUnaryExpr(const GoASTUnaryExpr *e);
 ValueObjectSP VisitCallExpr(const GoASTCallExpr *e);
+
 ValueObjectSP
 VisitTypeAssertExpr(const GoASTTypeAssertExpr *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitBinaryExpr(const GoASTBinaryExpr *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitArrayType(const GoASTArrayType *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitChanType(const GoASTChanType *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitCompositeLit(const GoASTCompositeLit *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitEllipsis(const GoASTEllipsis *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitFuncType(const GoASTFuncType *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitFuncLit(const GoASTFuncLit *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitInterfaceType(const GoASTInterfaceType *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitKeyValueExpr(const GoASTKeyValueExpr *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitMapType(const GoASTMapType *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitSliceExpr(const GoASTSliceExpr *e)
 {
 return NotImplemented(e);
 }
+
 ValueObjectSP
 VisitStructType(const GoASTStructType *e)
 {
@@ -217,6 +236,7 @@ LookupType(TargetSP target, ConstString
 }
 return CompilerType();
 }
+
 GoUserExpression::GoUserExpression(ExecutionContextScope _scope, const 
char *expr, const char *expr_prefix,
lldb::LanguageType language, ResultType 
desired_type,
const EvaluateExpressionOptions )
@@ -531,7 +551,7 @@ GoUserExpression::GoInterpreter::VisitBa
 return nullptr;
 }
 errno = 0;
-int64_t intvalue = strtol(value.c_str(), NULL, 0);
+

[Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

2015-11-06 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: sivachandra, jingham.
chaoren added a subscriber: lldb-commits.

On Linux, if a thread-specific conditional breakpoint was hit, it
won't necessarily be the thread that hit the breakpoint itself that
evaluates the conditional expression, so the thread that hit the
breakpoint could still be asked to stop, even though it hasn't been
allowed to run since the previous stop.

http://reviews.llvm.org/D14472

Files:
  source/Target/ThreadList.cpp

Index: source/Target/ThreadList.cpp
===
--- source/Target/ThreadList.cpp
+++ source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in 
between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just 
leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, 
it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional 
expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it 
hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || 
thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 


Index: source/Target/ThreadList.cpp
===
--- source/Target/ThreadList.cpp
+++ source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
 // This is an optimization...  If we didn't let a thread run in between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-06 Thread Ed Maste via lldb-commits
emaste accepted this revision.
emaste added a comment.

Fine by me.

I'm not sure how we ended up with the Python-with-semicolons in 
scripts/buildSwigWrapperClasses.py (prior to this change) though.


Repository:
  rL LLVM

http://reviews.llvm.org/D14042



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252353 - Fix Linux tests after r252348.

2015-11-06 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Nov  6 16:30:30 2015
New Revision: 252353

URL: http://llvm.org/viewvc/llvm-project?rev=252353=rev
Log:
Fix Linux tests after r252348.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/dotest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252353=252352=252353=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Fri Nov  6 16:30:30 2015
@@ -1727,6 +1727,7 @@ def run_suite():
 if iterArchs or iterCompilers:
 # Translate ' ' to '-' for pathname component.
 if six.PY2:
+import string
 tbl = string.maketrans(' ', '-')
 else:
 tbl = str.maketrans(' ', '-')


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252378 - lldb/ADT: Remove implicit ilist iterator conversions, NFC

2015-11-06 Thread Duncan P. N. Exon Smith via lldb-commits
Author: dexonsmith
Date: Fri Nov  6 18:54:13 2015
New Revision: 252378

URL: http://llvm.org/viewvc/llvm-project?rev=252378=rev
Log:
lldb/ADT: Remove implicit ilist iterator conversions, NFC

Remove implicit ilist iterator conversions before reapplying r252372
(which will disallow them).

Modified:
lldb/trunk/source/Expression/IRInterpreter.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=252378=252377=252378=diff
==
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Nov  6 18:54:13 2015
@@ -498,7 +498,7 @@ IRInterpreter::CanInterpret (llvm::Modul
 default:
 {
 if (log)
-log->Printf("Unsupported instruction: %s", 
PrintValue(ii).c_str());
+log->Printf("Unsupported instruction: %s", 
PrintValue(&*ii).c_str());
 error.SetErrorToGenericError();
 error.SetErrorString(unsupported_opcode_error);
 return false;
@@ -522,7 +522,7 @@ IRInterpreter::CanInterpret (llvm::Modul
 if (!CanIgnoreCall(call_inst) && !support_function_calls)
 {
 if (log)
-log->Printf("Unsupported instruction: %s", 
PrintValue(ii).c_str());
+log->Printf("Unsupported instruction: %s", 
PrintValue(&*ii).c_str());
 error.SetErrorToGenericError();
 error.SetErrorString(unsupported_opcode_error);
 return false;
@@ -547,7 +547,7 @@ IRInterpreter::CanInterpret (llvm::Modul
 default:
 {
 if (log)
-log->Printf("Unsupported ICmp predicate: %s", 
PrintValue(ii).c_str());
+log->Printf("Unsupported ICmp predicate: %s", 
PrintValue(&*ii).c_str());
 
 error.SetErrorToGenericError();
 error.SetErrorString(unsupported_opcode_error);
@@ -663,16 +663,16 @@ IRInterpreter::Interpret (llvm::Module &
 
 lldb::addr_t ptr = args[arg_index];
 
-frame.MakeArgument(ai, ptr);
+frame.MakeArgument(&*ai, ptr);
 }
 
 uint32_t num_insts = 0;
 
-frame.Jump(function.begin());
+frame.Jump(());
 
 while (frame.m_ii != frame.m_ie && (++num_insts < 4096))
 {
-const Instruction *inst = frame.m_ii;
+const Instruction *inst = &*frame.m_ii;
 
 if (log)
 log->Printf("Interpreting %s", PrintValue(inst).c_str());

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp?rev=252378=252377=252378=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp Fri Nov  6 
18:54:13 2015
@@ -338,7 +338,7 @@ IRForTarget::ResolveFunctionPointers(llv
  fi != llvm_module.end();
  ++fi)
 {
-Function *fun = fi;
+Function *fun = &*fi;
 
 bool is_decl = fun->isDeclaration();
 
@@ -1955,7 +1955,7 @@ IRForTarget::ReplaceStaticLiterals (llvm
 if (operand_constant_fp/* && 
operand_constant_fp->getType()->isX86_FP80Ty()*/)
 {
 static_constants.push_back(operand_val);
-static_users.push_back(ii);
+static_users.push_back(&*ii);
 }
 }
 }
@@ -2280,7 +2280,7 @@ IRForTarget::ReplaceVariables (Function
 return false;
 }
 
-Argument *argument = iter;
+Argument *argument = &*iter;
 
 if (argument->getName().equals("this"))
 {
@@ -2294,7 +2294,7 @@ IRForTarget::ReplaceVariables (Function
 return false;
 }
 
-argument = iter;
+argument = &*iter;
 }
 else if (argument->getName().equals("self"))
 {
@@ -2326,7 +2326,7 @@ IRForTarget::ReplaceVariables (Function
 return false;
 }
 
-argument = iter;
+argument = &*iter;
 }
 
 if (!argument->getName().equals("$__lldb_arg"))
@@ -2624,7 +2624,7 @@ IRForTarget::runOnModule (Module _m
  fi != fe;
  ++fi)
 {
-llvm::Function *function = fi;
+llvm::Function *function = &*fi;
 
 if (function->begin() == function->end())
 continue;
@@ -2699,7 +2699,7 @@ IRForTarget::runOnModule (Module _m
  fi != fe;
  ++fi)
 {
-llvm::Function *function = fi;
+

[Lldb-commits] [lldb] r252384 - Remove a debug print statement.

2015-11-06 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Nov  6 19:12:53 2015
New Revision: 252384

URL: http://llvm.org/viewvc/llvm-project?rev=252384=rev
Log:
Remove a debug print statement.

Modified:
lldb/trunk/scripts/Python/modify-python-lldb.py

Modified: lldb/trunk/scripts/Python/modify-python-lldb.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=252384=252383=252384=diff
==
--- lldb/trunk/scripts/Python/modify-python-lldb.py (original)
+++ lldb/trunk/scripts/Python/modify-python-lldb.py Fri Nov  6 19:12:53 2015
@@ -204,7 +204,6 @@ ne_def = "def __ne__(self, other): r
 # Delegate to self.IsValid() if it is defined for the current lldb object.
 
 if six.PY2:
-print("Test")
 nonzero_def = "def __nonzero__(self): return self.IsValid()"
 else:
 nonzero_def = "def __bool__(self): return self.IsValid()"


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252391 - Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

2015-11-06 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Fri Nov  6 20:16:31 2015
New Revision: 252391

URL: http://llvm.org/viewvc/llvm-project?rev=252391=rev
Log:
Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

Summary:
On Linux, if a thread-specific conditional breakpoint was hit, it
won't necessarily be the thread that hit the breakpoint itself that
evaluates the conditional expression, so the thread that hit the
breakpoint could still be asked to stop, even though it hasn't been
allowed to run since the previous stop.

Reviewers: sivachandra, jingham

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14472

Modified:
lldb/trunk/source/Target/ThreadList.cpp

Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=252391=252390=252391=diff
==
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov  6 20:16:31 2015
@@ -262,7 +262,11 @@ ThreadList::ShouldStop (Event *event_ptr
 // This is an optimization...  If we didn't let a thread run in 
between the previous stop and this
 // one, we shouldn't have to consult it for ShouldStop.  So just 
leave it off the list we are going to
 // inspect.
-if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+// On Linux, if a thread-specific conditional breakpoint was hit, 
it won't necessarily be the thread
+// that hit the breakpoint itself that evaluates the conditional 
expression, so the thread that hit
+// the breakpoint could still be asked to stop, even though it 
hasn't been allowed to run since the
+// previous stop.
+if (thread_sp->GetTemporaryResumeState () != eStateSuspended || 
thread_sp->IsStillAtLastBreakpointHit())
 threads_copy.push_back(thread_sp);
 }
 


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14042: Add more NetBSD platform glue for lldb

2015-11-06 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

Kamil, please rebase forward and I'll land it.

The semicolons in Python are gone now. And so is the need for that block of 
Python at all.


Repository:
  rL LLVM

http://reviews.llvm.org/D14042



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14417: Make lldb::endian::InlHostByteOrder() private.

2015-11-06 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252396: Make lldb::endian::InlHostByteOrder() private. 
(authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D14417?vs=39473=39630#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14417

Files:
  lldb/trunk/include/lldb/Core/Opcode.h
  lldb/trunk/include/lldb/Core/RegisterValue.h
  lldb/trunk/include/lldb/Host/Endian.h
  lldb/trunk/source/Core/Address.cpp
  lldb/trunk/source/Core/DataEncoder.cpp
  lldb/trunk/source/Core/DataExtractor.cpp
  lldb/trunk/source/Core/Event.cpp
  lldb/trunk/source/Core/Opcode.cpp
  lldb/trunk/source/Core/Scalar.cpp
  lldb/trunk/source/Core/Stream.cpp
  lldb/trunk/source/Core/Value.cpp
  lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
  lldb/trunk/source/Expression/IRInterpreter.cpp
  lldb/trunk/source/Host/freebsd/Host.cpp
  lldb/trunk/source/Host/macosx/Host.mm
  lldb/trunk/source/Host/netbsd/Host.cpp
  
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
  
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
  lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
  lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
  lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
  
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
  lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
  lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  lldb/trunk/source/Target/ExecutionContext.cpp
  lldb/trunk/source/Target/RegisterContext.cpp

Index: lldb/trunk/source/Target/ExecutionContext.cpp
===
--- lldb/trunk/source/Target/ExecutionContext.cpp
+++ lldb/trunk/source/Target/ExecutionContext.cpp
@@ -262,7 +262,7 @@
 m_target_sp->GetArchitecture().GetByteOrder();
 if (m_process_sp)
 m_process_sp->GetByteOrder();
-return lldb::endian::InlHostByteOrder();
+return endian::InlHostByteOrder();
 }
 
 RegisterContext *
Index: lldb/trunk/source/Target/RegisterContext.cpp
===
--- lldb/trunk/source/Target/RegisterContext.cpp
+++ lldb/trunk/source/Target/RegisterContext.cpp
@@ -571,31 +571,31 @@
 //case 1:
 //{
 //int8_t v;
-//if (data.ExtractBytes (0, sizeof (int8_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int8_t))
+//if (data.ExtractBytes (0, sizeof (int8_t), endian::InlHostByteOrder(), ) != sizeof (int8_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 2:
 //{
 //int16_t v;
-//if (data.ExtractBytes (0, sizeof (int16_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int16_t))
+//if (data.ExtractBytes (0, sizeof (int16_t), endian::InlHostByteOrder(), ) != sizeof (int16_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 4:
 //{
 //int32_t v;
-//if (data.ExtractBytes (0, sizeof (int32_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int32_t))
+//if (data.ExtractBytes (0, sizeof (int32_t), endian::InlHostByteOrder(), ) != sizeof (int32_t))
 //return false;
 //value = v;
 //return true;
 //}
 //case 8:
 //{
 //int64_t v;
-//if (data.ExtractBytes (0, sizeof (int64_t), lldb::endian::InlHostByteOrder(), ) != sizeof (int64_t))
+//if (data.ExtractBytes (0, sizeof (int64_t), endian::InlHostByteOrder(), ) != sizeof (int64_t))
 //return false;
 //value = v;
 //return true;
@@ -608,23 +608,23 @@
 //case sizeof (float):
 //{
 //float v;
-//if (data.ExtractBytes (0, sizeof (float), lldb::endian::InlHostByteOrder(), ) != sizeof (float))
+//if (data.ExtractBytes (0, sizeof (float), endian::InlHostByteOrder(), ) != sizeof (float))
 //return false;
 //value = v;
 //return true;
 //}
 //case sizeof (double):
 //{
 //double v;
-//if (data.ExtractBytes (0, sizeof (double), lldb::endian::InlHostByteOrder(), ) != sizeof (double))
+//if (data.ExtractBytes (0, sizeof (double), endian::InlHostByteOrder(), ) != sizeof (double))
 //  

[Lldb-commits] [lldb] r252396 - Make lldb::endian::InlHostByteOrder() private.

2015-11-06 Thread Bruce Mitchener via lldb-commits
Author: brucem
Date: Fri Nov  6 22:40:13 2015
New Revision: 252396

URL: http://llvm.org/viewvc/llvm-project?rev=252396=rev
Log:
Make lldb::endian::InlHostByteOrder() private.

Summary:
Since this is within the lldb namespace, the compiler tries to
export a symbol for it. Unfortunately, since it is inlined, the
symbol is hidden and this results in a mess of warnings when
building on OS X with cmake.

Moving it to the lldb_private namespace eliminates that problem.

Reviewers: clayborg

Subscribers: emaste, lldb-commits

Differential Revision: http://reviews.llvm.org/D14417

Modified:
lldb/trunk/include/lldb/Core/Opcode.h
lldb/trunk/include/lldb/Core/RegisterValue.h
lldb/trunk/include/lldb/Host/Endian.h
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/DataEncoder.cpp
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Core/Event.cpp
lldb/trunk/source/Core/Opcode.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Core/Stream.cpp
lldb/trunk/source/Core/Value.cpp
lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
lldb/trunk/source/Expression/IRInterpreter.cpp
lldb/trunk/source/Host/freebsd/Host.cpp
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/source/Host/netbsd/Host.cpp

lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp

lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Target/ExecutionContext.cpp
lldb/trunk/source/Target/RegisterContext.cpp

Modified: lldb/trunk/include/lldb/Core/Opcode.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Opcode.h?rev=252396=252395=252396=diff
==
--- lldb/trunk/include/lldb/Core/Opcode.h (original)
+++ lldb/trunk/include/lldb/Core/Opcode.h Fri Nov  6 22:40:13 2015
@@ -261,8 +261,8 @@ namespace lldb_private {
 bool
 GetEndianSwap() const
 {
-return (m_byte_order == lldb::eByteOrderBig && 
lldb::endian::InlHostByteOrder() == lldb::eByteOrderLittle) ||
-   (m_byte_order == lldb::eByteOrderLittle && 
lldb::endian::InlHostByteOrder() == lldb::eByteOrderBig);
+return (m_byte_order == lldb::eByteOrderBig && 
endian::InlHostByteOrder() == lldb::eByteOrderLittle) ||
+   (m_byte_order == lldb::eByteOrderLittle && 
endian::InlHostByteOrder() == lldb::eByteOrderBig);
 }
 
 lldb::ByteOrder m_byte_order;

Modified: lldb/trunk/include/lldb/Core/RegisterValue.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RegisterValue.h?rev=252396=252395=252396=diff
==
--- lldb/trunk/include/lldb/Core/RegisterValue.h (original)
+++ lldb/trunk/include/lldb/Core/RegisterValue.h Fri Nov  6 22:40:13 2015
@@ -365,7 +365,7 @@ namespace lldb_private {
 {
 if (m_type == eTypeBytes)
 return buffer.byte_order;
-return lldb::endian::InlHostByteOrder();
+return endian::InlHostByteOrder();
 }
 
 uint32_t

Modified: lldb/trunk/include/lldb/Host/Endian.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Endian.h?rev=252396=252395=252396=diff
==
--- lldb/trunk/include/lldb/Host/Endian.h (original)
+++ lldb/trunk/include/lldb/Host/Endian.h Fri Nov  6 22:40:13 2015
@@ -12,7 +12,7 @@
 
 #include "lldb/lldb-enumerations.h"
 
-namespace lldb {
+namespace lldb_private {
 
 namespace endian {
 
@@ -22,7 +22,7 @@ namespace endian {
 uint8_t  bytes[sizeof(uint32_t)];
 } const endianTest = { 0x01020304 };
 
-inline ByteOrder InlHostByteOrder() { return 
(ByteOrder)endianTest.bytes[0]; }
+inline lldb::ByteOrder InlHostByteOrder() { return 
(lldb::ByteOrder)endianTest.bytes[0]; }
 
 //ByteOrder const InlHostByteOrder = (ByteOrder)endianTest.bytes[0];
 }

Modified: lldb/trunk/source/Core/Address.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=252396=252395=252396=diff
==
--- 

Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-06 Thread Bruce Mitchener via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252330: [swig] Remove 
check_lldb_swig_executable_file_exists. (authored by brucem).

Changed prior to commit:
  http://reviews.llvm.org/D14415?vs=39558=39562#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14415

Files:
  lldb/trunk/scripts/Python/buildSwigPython.py
  lldb/trunk/scripts/buildSwigWrapperClasses.py

Index: lldb/trunk/scripts/buildSwigWrapperClasses.py
===
--- lldb/trunk/scripts/buildSwigWrapperClasses.py
+++ lldb/trunk/scripts/buildSwigWrapperClasses.py
@@ -80,7 +80,7 @@
 automatically. Python install directory.\n\
 --argsFile= The args are read from a file instead of the\n\
 command line. Other command line args are ignored.\n\
---swigExecutable=   (optional) Full path of swig executable.\n\
+--swigExecutable=   Full path of swig executable.\n\
 \n\
 Usage:\n\
 buildSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\
@@ -310,137 +310,6 @@
 return (nResult, strStatusMsg)
 
 #++---
-# Details:  Dummy function - system unknown. Function should not be called.
-# Args: vDictArgs   - (R) Program input parameters.
-# Returns:  Bool- False = Program logic error.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Unknown(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Unknown()")
-# Do nothing
-return (False, strMsgErrorOsTypeUnknown)
-
-#++---
-# Details:  Locate the SWIG executable file in a Windows system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Windows(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Windows()")
-
-# Will always be true as it assumed the path to SWIG executable will be
-# in the OS system environmental variable %PATH%. Easier this way as the
-# user may have renamed the directory and or custom path installation.
-bExeFileFound = True
-vDictArgs["--swigExePath"] = ""
-vDictArgs["--swigExeName"] = "swig.exe"
-return (bExeFileFound, None)
-
-#++---
-# Details:  Locate the SWIG executable file in a Linux system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Linux(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Linux()")
-bExeFileFound = False
-
-strSwigExe = "swig"
-strSwigExePath = "/usr/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-strSwigExePath = "/usr/local/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-return (bExeFileFound, strSwigExeFileNotFound)
-
-#++---
-# Details:  Locate the SWIG executable file in a OSX system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Darwin(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Darwin()")
-bExeFileFound = False
-# ToDo: Find the SWIG executable and add the path to the args dictionary
-

Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added a comment.

In http://reviews.llvm.org/D14406#283034, @labath wrote:

> (The upstream unittest does not seem to have the bugnumber feature. I am 
> assuming the intention here is to make this upstream compatible, in hope of 
> moving over there at some point.)


I can leave the bugnumber thing in there for now, just to reduce the impact of 
this change and the risk of messing something up.


http://reviews.llvm.org/D14406



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252298 - Fix for AArch64 watchpoint cache corruption in case of ptrace failure

2015-11-06 Thread Omair Javaid via lldb-commits
Author: omjavaid
Date: Fri Nov  6 06:56:34 2015
New Revision: 252298

URL: http://llvm.org/viewvc/llvm-project?rev=252298=rev
Log:
Fix for AArch64 watchpoint cache corruption in case of ptrace failure

Same fix has been submitted for Arm.

Review can be found here:

Differential revision: http://reviews.llvm.org/D14051


Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Modified: 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp?rev=252298=252297=252298=diff
==
--- 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
Fri Nov  6 06:56:34 2015
@@ -435,7 +435,7 @@ NativeRegisterContextLinux_arm64::SetHar
  if (bp_index == LLDB_INVALID_INDEX32)
 return LLDB_INVALID_INDEX32;
 
-// Add new or update existing watchpoint
+// Add new or update existing breakpoint
 if ((m_hbr_regs[bp_index].control & 1) == 0)
 {
 m_hbr_regs[bp_index].address = addr;
@@ -446,7 +446,13 @@ NativeRegisterContextLinux_arm64::SetHar
 error = WriteHardwareDebugRegs(eDREGTypeBREAK);
 
 if (error.Fail())
+{
+m_hbr_regs[bp_index].address = 0;
+m_hbr_regs[bp_index].control &= ~1;
+m_hbr_regs[bp_index].refcount = 0;
+
 return LLDB_INVALID_INDEX32;
+}
 }
 else
 m_hbr_regs[bp_index].refcount++;
@@ -481,6 +487,11 @@ NativeRegisterContextLinux_arm64::ClearH
 }
 else if (m_hbr_regs[hw_idx].refcount == 1)
 {
+// Create a backup we can revert to in case of failure.
+lldb::addr_t tempAddr = m_hbr_regs[hw_idx].address;
+uint32_t tempControl = m_hbr_regs[hw_idx].control;
+uint32_t tempRefCount = m_hbr_regs[hw_idx].refcount;
+
 m_hbr_regs[hw_idx].control &= ~1;
 m_hbr_regs[hw_idx].address = 0;
 m_hbr_regs[hw_idx].refcount = 0;
@@ -489,7 +500,13 @@ NativeRegisterContextLinux_arm64::ClearH
 WriteHardwareDebugRegs(eDREGTypeBREAK);
 
 if (error.Fail())
+{
+m_hbr_regs[hw_idx].control = tempControl;
+m_hbr_regs[hw_idx].address = tempAddr;
+m_hbr_regs[hw_idx].refcount = tempRefCount;
+
 return false;
+}
 
 return true;
 }
@@ -595,7 +612,13 @@ NativeRegisterContextLinux_arm64::SetHar
 error = WriteHardwareDebugRegs(eDREGTypeWATCH);
 
 if (error.Fail())
+{
+m_hwp_regs[wp_index].address = 0;
+m_hwp_regs[wp_index].control &= ~1;
+m_hwp_regs[wp_index].refcount = 0;
+
 return LLDB_INVALID_INDEX32;
+}
 }
 else
 m_hwp_regs[wp_index].refcount++;
@@ -630,6 +653,11 @@ NativeRegisterContextLinux_arm64::ClearH
 }
 else if (m_hwp_regs[wp_index].refcount == 1)
 {
+// Create a backup we can revert to in case of failure.
+lldb::addr_t tempAddr = m_hwp_regs[wp_index].address;
+uint32_t tempControl = m_hwp_regs[wp_index].control;
+uint32_t tempRefCount = m_hwp_regs[wp_index].refcount;
+
 // Update watchpoint in local cache
 m_hwp_regs[wp_index].control &= ~1;
 m_hwp_regs[wp_index].address = 0;
@@ -639,7 +667,13 @@ NativeRegisterContextLinux_arm64::ClearH
 error = WriteHardwareDebugRegs(eDREGTypeWATCH);
 
 if (error.Fail())
+{
+m_hwp_regs[wp_index].control = tempControl;
+m_hwp_regs[wp_index].address = tempAddr;
+m_hwp_regs[wp_index].refcount = tempRefCount;
+
 return false;
+}
 
 return true;
 }
@@ -663,10 +697,18 @@ NativeRegisterContextLinux_arm64::ClearA
 if (error.Fail())
 return error;
 
+lldb::addr_t tempAddr = 0;
+uint32_t tempControl = 0, tempRefCount = 0;
+
 for (uint32_t i = 0; i < m_max_hwp_supported; i++)
 {
 if (m_hwp_regs[i].control & 0x01)
 {
+// Create a backup we can revert to in case of failure.
+tempAddr = m_hwp_regs[i].address;
+tempControl = m_hwp_regs[i].control;
+tempRefCount = m_hwp_regs[i].refcount;
+
 // Clear watchpoints in local cache
 m_hwp_regs[i].control &= ~1;
 m_hwp_regs[i].address = 0;
@@ -676,7 +718,13 @@ NativeRegisterContextLinux_arm64::ClearA
 error = WriteHardwareDebugRegs(eDREGTypeWATCH);
 
 if (error.Fail())
+{
+m_hwp_regs[i].control = tempControl;
+m_hwp_regs[i].address = tempAddr;
+m_hwp_regs[i].refcount = tempRefCount;
+
 return error;
+}
 }
 }
 



[Lldb-commits] [lldb] r252326 - Don't use module internal implementation details in our decorators.

2015-11-06 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Nov  6 12:14:42 2015
New Revision: 252326

URL: http://llvm.org/viewvc/llvm-project?rev=252326=rev
Log:
Don't use module internal implementation details in our decorators.

We tried implementing something akin to a conditionalExpectedFailure
decorator for unittest2.  We did this by making use of some
implementation details of the unittest2 module.  In an effort to make
this work with unittest, this patch removes the reliance on the
implementation details.  I have a hard time wrapping my head around
how this all works with the deeply nested decorators, but the spirit
of the patch here is to do do the following: If the condition function
is true, use the original unittest2.expectedFailure decorator.  Otherwise
don't use any decorator, just call the test function.

Differential Revision: http://reviews.llvm.org/D14406
Reviewed By: tberghammer, labath

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=252326=252325=252326=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Nov  6 12:14:42 
2015
@@ -601,15 +601,11 @@ def expectedFailure(expected_fn, bugnumb
 def wrapper(*args, **kwargs):
 from unittest2 import case
 self = args[0]
-try:
-func(*args, **kwargs)
-except Exception:
-if expected_fn(self):
-raise case._ExpectedFailure(sys.exc_info(), bugnumber)
-else:
-raise
 if expected_fn(self):
-raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+xfail_func = unittest2.expectedFailure(func)
+xfail_func(*args, **kwargs)
+else:
+func(*args, **kwargs)
 return wrapper
 # if bugnumber is not-callable(incluing None), that means decorator 
function is called with optional arguments
 # return decorator in this case, so it will be used to decorating original 
method


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added inline comments.


Comment at: packages/Python/lldbsuite/test/lldbtest.py:605
@@ -611,2 +604,3 @@
 if expected_fn(self):
-raise case._UnexpectedSuccess(sys.exc_info(), bugnumber)
+xfail_func = unittest2.expectedFailure(func)
+xfail_func(*args, **kwargs)

tberghammer wrote:
> You are swallowing the bug number here
> 
> Based on the implementation of unittest2.expectedFailure I think you should 
> write the following to preserve it (I haven't tested it):
> 
> ```
> unittest2.expectedFailure(bugnumber)(func)
> ```
Actually I think it already has the same sematnics.  When I use your version it 
doesn't work.  I think it works with my version because of the `if 
six.callable(bugnumber)` check on line 610 (which is cut out in the context 
here, but you can check it).

I'll put it in like this and see what happens


http://reviews.llvm.org/D14406



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D14453: Python 3 - Fix some portability issues with class / instance attributes

2015-11-06 Thread Zachary Turner via lldb-commits
zturner created this revision.
zturner added reviewers: tfiala, labath, tberghammer.
zturner added a subscriber: lldb-commits.

TBH I'm honestly not sure what the problem was before, or why this fixes
it.  But what I can tell from debugging is that under Py3,
`sortMethodsUsing` is treated as a class attribute, but it was being
accessed as `self.sortMethodsUsing`.  What the full implications of this
are I don't quite know, but the symptom here was that the value we were
assigning to it -- the global lambda `cmp_` -- was being treated as a
bound method instead of a global method.  So it was expecting to be called
with a `self` argument, and I got an exception saying the method expected 3
arguments but received 2.

Why exactly this happens in Python 3, and why exactly this *doesn't*
happen in Python 2, even though the syntax was identical in both cases
are not clear to me.

http://reviews.llvm.org/D14453

Files:
  third_party/Python/module/unittest2/unittest2/__init__.py
  third_party/Python/module/unittest2/unittest2/loader.py
  third_party/Python/module/unittest2/unittest2/test/test_loader.py

Index: third_party/Python/module/unittest2/unittest2/test/test_loader.py
===
--- third_party/Python/module/unittest2/unittest2/test/test_loader.py
+++ third_party/Python/module/unittest2/unittest2/test/test_loader.py
@@ -1104,15 +1104,12 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromTestCase(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 class Foo(unittest2.TestCase):
 def test_1(self): pass
 def test_2(self): pass
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = loader.suiteClass([Foo('test_2'), Foo('test_1')])
 self.assertEqual(loader.loadTestsFromTestCase(Foo), tests)
@@ -1120,9 +1117,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromModule(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1130,7 +1124,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])]
 self.assertEqual(list(loader.loadTestsFromModule(m)), tests)
@@ -1138,9 +1132,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromName(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1148,7 +1139,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = loader.suiteClass([Foo('test_2'), Foo('test_1')])
 self.assertEqual(loader.loadTestsFromName('Foo', m), tests)
@@ -1156,9 +1147,6 @@
 # "Function to be used to compare method names when sorting them in
 # getTestCaseNames() and all the loadTestsFromX() methods"
 def test_sortTestMethodsUsing__loadTestsFromNames(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 m = types.ModuleType('m')
 class Foo(unittest2.TestCase):
 def test_1(self): pass
@@ -1166,7 +1154,7 @@
 m.Foo = Foo
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 tests = [loader.suiteClass([Foo('test_2'), Foo('test_1')])]
 self.assertEqual(list(loader.loadTestsFromNames(['Foo'], m)), tests)
@@ -1176,15 +1164,12 @@
 #
 # Does it actually affect getTestCaseNames()?
 def test_sortTestMethodsUsing__getTestCaseNames(self):
-def reversed_cmp(x, y):
-return -cmp(x, y)
-
 class Foo(unittest2.TestCase):
 def test_1(self): pass
 def test_2(self): pass
 
 loader = unittest2.TestLoader()
-loader.sortTestMethodsUsing = reversed_cmp
+loader.sortTestMethodsUsing = unittest2.reversed_cmp_
 
 test_names = ['test_2', 'test_1']
 self.assertEqual(loader.getTestCaseNames(Foo), test_names)
@@ -1192,7 +1177,7 @@
 # "The default 

Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2

2015-11-06 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Looks reasonable.  Do we know if it runs anywhere else yet?


http://reviews.llvm.org/D14395



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added a comment.

Eh, just delete it IMO.  I don't like leaving code around "just in case".  
These scripts already need to be practically re-written (due to not using the 
standard argparse module), the less work we have to do the better.  CMake is 
the only user of this script as far as I know.  If it breaks someone they'll 
chime in presumably


http://reviews.llvm.org/D14415



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added a comment.

I'm probably being dense.  But do we know if what runs anywhere else?


http://reviews.llvm.org/D14395



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-06 Thread Bruce Mitchener via lldb-commits
brucem updated this revision to Diff 39558.
brucem added a comment.

Instead of simplifying, just remove. Expand scope of removal as well.


http://reviews.llvm.org/D14415

Files:
  scripts/Python/buildSwigPython.py
  scripts/buildSwigWrapperClasses.py

Index: scripts/buildSwigWrapperClasses.py
===
--- scripts/buildSwigWrapperClasses.py
+++ scripts/buildSwigWrapperClasses.py
@@ -80,7 +80,7 @@
 automatically. Python install directory.\n\
 --argsFile= The args are read from a file instead of the\n\
 command line. Other command line args are ignored.\n\
---swigExecutable=   (optional) Full path of swig executable.\n\
+--swigExecutable=   Full path of swig executable.\n\
 \n\
 Usage:\n\
 buildSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\
@@ -310,137 +310,6 @@
 return (nResult, strStatusMsg)
 
 #++---
-# Details:  Dummy function - system unknown. Function should not be called.
-# Args: vDictArgs   - (R) Program input parameters.
-# Returns:  Bool- False = Program logic error.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Unknown(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Unknown()")
-# Do nothing
-return (False, strMsgErrorOsTypeUnknown)
-
-#++---
-# Details:  Locate the SWIG executable file in a Windows system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Windows(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Windows()")
-
-# Will always be true as it assumed the path to SWIG executable will be
-# in the OS system environmental variable %PATH%. Easier this way as the
-# user may have renamed the directory and or custom path installation.
-bExeFileFound = True
-vDictArgs["--swigExePath"] = ""
-vDictArgs["--swigExeName"] = "swig.exe"
-return (bExeFileFound, None)
-
-#++---
-# Details:  Locate the SWIG executable file in a Linux system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Linux(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Linux()")
-bExeFileFound = False
-
-strSwigExe = "swig"
-strSwigExePath = "/usr/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-strSwigExePath = "/usr/local/bin"
-strExe = os.path.normcase("%s/%s" % (strSwigExePath, strSwigExe))
-if os.path.isfile(strExe) and os.access(strExe, os.X_OK):
-bExeFileFound = True
-vDictArgs["--swigExePath"] = os.path.normcase(strSwigExePath)
-vDictArgs["--swigExeName"] = strSwigExe
-return (bExeFileFound, None)
-
-return (bExeFileFound, strSwigExeFileNotFound)
-
-#++---
-# Details:  Locate the SWIG executable file in a OSX system. Several hard
-#   coded predetermined possible file path locations are searched.
-#   (This is good candidate for a derived class object)
-# Args: vDictArgs   - (W) Program input parameters.
-# Returns:  Bool- True = Success.
-#   - False = Failure file not found.
-#   Str - Error message.
-# Throws:   None.
-#--
-def check_lldb_swig_executable_file_exists_Darwin(vDictArgs):
-dbg = utilsDebug.CDebugFnVerbose("check_lldb_swig_executable_file_exists_Darwin()")
-bExeFileFound = False
-# ToDo: Find the SWIG executable and add the path to the args dictionary
-#vDictArgs.["--swigExePath"] = "/usr/bin/swig"
-strStatusMsg = "Sorry function 'check_lldb_swig_executable_file_exists_Darwin()' is not implemented"
-
-return (bExeFileFound, strStatusMsg)
-

Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added a comment.

If it's never used in practice, can you just delete the codepath entirely?  I'm 
a strong proponent of deleting code that nobody cares about.  (Of course, if 
you found this because you do care about it and this codepath didn't work when 
you tried to use it, that's a different story)


http://reviews.llvm.org/D14415



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14406: Don't depend on implementation details of unittest2 for our custom decorators

2015-11-06 Thread Tamas Berghammer via lldb-commits
tberghammer added a comment.

If the purpose of the change to get closer to upstream then I am fine with 
removing the bug number here. In general I don't feel it is a that high risk 
change, but I might miss something.


http://reviews.llvm.org/D14406



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14415: [swig] Simplify check_lldb_swig_executable_file_exists.

2015-11-06 Thread Bruce Mitchener via lldb-commits
brucem added a comment.

Well, I'm pretty sure ... but I don't know if someone in some configuration or 
set of build arrangements might use it. It might also be used if we ever make 
the Makefiles or xcode projects use these scripts.


http://reviews.llvm.org/D14415



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14163: Address another race condition running tests on Windows

2015-11-06 Thread Zachary Turner via lldb-commits
zturner added a comment.

Feel free to get this in.  Maybe put it in file 
`lldbsuite/support/filesystem.py`


http://reviews.llvm.org/D14163



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D13819: LLDBStandalone: Report nice errors on missing vars

2015-11-06 Thread Todd Fiala via lldb-commits
tfiala accepted this revision.
tfiala added a comment.
This revision is now accepted and ready to land.

Okay, this seems reasonable.


http://reviews.llvm.org/D13819



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2

2015-11-06 Thread Todd Fiala via lldb-commits
tfiala added a comment.

I meant I looked at it but didn't try to run it (on Linux or OS X), and was 
wondering if you had tried to run it on a non-Windows platform.


http://reviews.llvm.org/D14395



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252347 - Python 3 - Use the exec function, not the exec statement.

2015-11-06 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Nov  6 15:37:21 2015
New Revision: 252347

URL: http://llvm.org/viewvc/llvm-project?rev=252347=rev
Log:
Python 3 - Use the exec function, not the exec statement.

exec statement is gone in Python 3, this version works in both.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py?rev=252347=252346=252347=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/TestDumpDynamic.py
 Fri Nov  6 15:37:21 2015
@@ -1,3 +1,5 @@
-import lldbsuite.test.lldbinline as lldbinline
+from __future__ import absolute_import
+
+from lldbsuite.test import lldbinline
 
 lldbinline.MakeInlineTest(__file__, globals(), 
[lldbinline.expectedFailureWindows("llvm.org/pr24663")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py?rev=252347=252346=252347=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbinline.py Fri Nov  6 15:37:21 
2015
@@ -141,7 +141,7 @@ class InlineTest(TestBase):
 self.do_test()
 
 def execute_user_command(self, __command):
-exec __command in globals(), locals()
+exec(__command, globals(), locals())
 
 def do_test(self):
 exe_name = "a.out"


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D14395: Fix some portability issues in unittest2

2015-11-06 Thread Zachary Turner via lldb-commits
Ahh, no sorry.  There's nothing platform specific in the patch though, so I
don't anticipate any problems on that front.  I did run it under 2.7 and it
worked, so I expect it will run under 2.7 on other platforms.

On Fri, Nov 6, 2015 at 1:42 PM Todd Fiala  wrote:

> tfiala added a comment.
>
> I meant I looked at it but didn't try to run it (on Linux or OS X), and
> was wondering if you had tried to run it on a non-Windows platform.
>
>
> http://reviews.llvm.org/D14395
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r252351 - Fixed a problem where a test case referred to a

2015-11-06 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Fri Nov  6 16:05:47 2015
New Revision: 252351

URL: http://llvm.org/viewvc/llvm-project?rev=252351=rev
Log:
Fixed a problem where a test case referred to a
wrongly-capitalized header.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m?rev=252351=252350=252351=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/myclass.m Fri 
Nov  6 16:05:47 2015
@@ -1,5 +1,5 @@
 #import 
-#import "MyClass.h"
+#import "myclass.h"
 
 @implementation MyClass
 {


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits