[Lldb-commits] [lldb] r267861 - Revert "Fixed a bug where const this would cause parser errors about $__lldb_expr."

2016-04-28 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Apr 28 03:16:19 2016
New Revision: 267861

URL: http://llvm.org/viewvc/llvm-project?rev=267861&view=rev
Log:
Revert "Fixed a bug where const this would cause parser errors about 
$__lldb_expr."

This reverts commit r267833 as it breaks the build. It looks like some work in 
progress got
committed together with the actual fix, but I'm not sure which one is which, so 
I'll revert the
whole patch and let author resumbit it after fixing the build error.

Removed:
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile

lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
Modified:
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Expression/ExpressionSourceCode.cpp
lldb/trunk/source/Expression/LLVMUserExpression.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile?rev=267860&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
(removed)
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
-
-cleanup:
-   rm -f Makefile *.d
-

Removed: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=267860&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py 
(removed)
@@ -1,4 +0,0 @@
-from lldbsuite.test import lldbinline
-from lldbsuite.test import decorators
-
-lldbinline.MakeInlineTest(__file__, globals(), 
[decorators.expectedFailureAll(oslist=["windows"], 
bugnumber="llvm.org/pr24764")] )

Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp?rev=267860&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
(removed)
@@ -1,23 +0,0 @@
-//===-- main.cpp *- C++ 
-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#include 
-
-class foo {
-public:
-  template  T func(T x) const {
-return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs = ["5"])
-  }
-};
-
-int i;
-
-int main() {
-  return foo().func(i);
-}

Modified: lldb/trunk/source/Core/Scalar.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=267861&r1=267860&r2=267861&view=diff
==
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Thu Apr 28 03:16:19 2016
@@ -78,74 +78,6 @@ PromoteToMaxType
 return Scalar::e_void;
 }
 
-llvm::APInt
-Scalar::APIntWithTypeAndValue(Scalar::Type type, uint64_t raw_value)
-{
-//  APInt(unsigned numBits, uint64_t val, bool isSigned = false)
-unsigned num_bits = 1;
-bool is_signed = false;
-
-switch (type)
-{
-case Scalar::e_void:
-break;
-case Scalar::e_sint:
-is_signed = true;
-num_bits = sizeof(sint_t) * 8;
-break;
-case Scalar::e_uint:
-is_signed = false;
-num_bits = sizeof(uint_t) * 8;
-break;
-case Scalar::e_slong:
-is_signed = true;
-num_bits = sizeof(slong_t) * 8;
-break;
-case Scalar::e_ulong:
-is_signed = false;
-num_bits = sizeof(ulong_t) * 8;
-break;
-case Scalar::e_slonglong:
-is_signed = true;
-num_bits = sizeof(slonglong_t) * 8;
-break;
-case Scalar::e_ulonglong:
-is_signed = false;
-num_bits = sizeof(ulonglong_t) * 8;
-break;
-case Scalar::e_sint128:
-  

Re: [Lldb-commits] [lldb] r267833 - Fixed a bug where const this would cause parser errors about $__lldb_expr.

2016-04-28 Thread Pavel Labath via lldb-commits
Hi,

this commit broke the build due to a missing declaration of the
APIntWithTypeAndValue. Since this function is not called anywhere, i
suspect some work in progress may have gotten committed with the
actual fix. I'm not sure which one is which, so I reverted the whole
patch. Could you please take a look and resumbit the relevant parts?

pl

On 28 April 2016 at 02:36, Sean Callanan via lldb-commits
 wrote:
> Author: spyffe
> Date: Wed Apr 27 20:36:21 2016
> New Revision: 267833
>
> URL: http://llvm.org/viewvc/llvm-project?rev=267833&view=rev
> Log:
> Fixed a bug where const this would cause parser errors about $__lldb_expr.
>
> In templated const functions, trying to run an expression would produce the
> error
>
> error: out-of-line definition of '$__lldb_expr' does not match any 
> declaration in 'foo'
> member declaration does not match because it is const qualified
> error: 1 error parsing expression
>
> which is no good.  It turned out we don't actually need to worry about 
> "const,"
> we just need to be consistent about the declaration of the expression and the
> FunctionDecl we inject into the class for "this."
>
> Also added a test case.
>
> 
>
> Added:
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
> 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
> Modified:
> lldb/trunk/source/Core/Scalar.cpp
> lldb/trunk/source/Expression/ExpressionSourceCode.cpp
> lldb/trunk/source/Expression/LLVMUserExpression.cpp
> 
> lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
> lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
>
> Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile?rev=267833&view=auto
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
> (added)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile 
> Wed Apr 27 20:36:21 2016
> @@ -0,0 +1,8 @@
> +LEVEL = ../../../make
> +CXX_SOURCES := main.cpp
> +CXXFLAGS += -std=c++11
> +include $(LEVEL)/Makefile.rules
> +
> +cleanup:
> +   rm -f Makefile *.d
> +
>
> Added: 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=267833&view=auto
> ==
> --- 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>  (added)
> +++ 
> lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
>  Wed Apr 27 20:36:21 2016
> @@ -0,0 +1,4 @@
> +from lldbsuite.test import lldbinline
> +from lldbsuite.test import decorators
> +
> +lldbinline.MakeInlineTest(__file__, globals(), 
> [decorators.expectedFailureAll(oslist=["windows"], 
> bugnumber="llvm.org/pr24764")] )
>
> Added: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp?rev=267833&view=auto
> ==
> --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
> (added)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp 
> Wed Apr 27 20:36:21 2016
> @@ -0,0 +1,23 @@
> +//===-- main.cpp *- C++ 
> -*-===//
> +//
> +// The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===--===//
> +
> +#include 
> +
> +class foo {
> +public:
> +  template  T func(T x) const {
> +return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, 
> substrs = ["5"])
> +  }
> +};
> +
> +int i;
> +
> +int main() {
> +  return foo().func(i);
> +}
>
> Modified: lldb/trunk/source/Core/Scalar.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=267833&r1=267832&r2=267833&view=diff
> ==
> --- lldb/trunk/source/Core/Scalar.cpp (original)
> +++ lldb/trunk/source/Core/Scalar.cpp Wed Apr 27 20:36:21 2016
> @@ -78,6 +78,74 @@ PromoteToMaxType
>  return Scalar::e_void;
>  }
>
> +llvm::APInt
> +Scalar::APIntWithTypeAndValue(Scalar::Type type, uint64_t raw_value)
> +{
> +//  APInt(unsigned numBits, uint64_t v

Re: [Lldb-commits] [PATCH] D19533: Introduce Connection::ReadAll and fix AdbClient

2016-04-28 Thread Pavel Labath via lldb-commits
labath updated this revision to Diff 55397.
labath added a comment.

Added proper handling of the timeout after retries, and moved the functionality 
into
Connection::Read. I have called the parameter read_full_buffer, as I think that 
better reflects
its intended use. I did not want to add a default value for it, since default 
values on virtual
functions can produce unexpected results. I've also had to increase the timeout 
in AdbClient,
since now it actually had a meaning (it seems that ReadAll was spinning in a 
loop also in case
the server was sending no data at all).  The patch has grown bigger, but this 
is mostly due to
me refactoring unit tests to promote code reuse.


http://reviews.llvm.org/D19533

Files:
  include/lldb/Core/Connection.h
  include/lldb/Core/ConnectionSharedMemory.h
  include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
  source/Core/Communication.cpp
  source/Core/ConnectionSharedMemory.cpp
  source/Host/common/Editline.cpp
  source/Host/posix/ConnectionFileDescriptorPosix.cpp
  source/Plugins/Platform/Android/AdbClient.cpp
  unittests/Host/CMakeLists.txt
  unittests/Host/ConnectionFileDescriptorPosixTest.cpp
  unittests/Host/SocketTest.cpp
  unittests/Host/SocketUtil.h

Index: unittests/Host/SocketUtil.h
===
--- /dev/null
+++ unittests/Host/SocketUtil.h
@@ -0,0 +1,66 @@
+//===-- SocketUtil.h *- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#ifndef lldb_unittests_Host_SocketUtil_h
+#define lldb_unittests_Host_SocketUtil_h
+
+#include 
+
+#include "gtest/gtest.h"
+
+#include "lldb/Core/Error.h"
+#include "lldb/Host/Socket.h"
+#include "lldb/Host/common/TCPSocket.h"
+
+template 
+std::pair, std::unique_ptr>
+CreateConnectedSockets(const char *listen_remote_address,
+   const std::function &get_connect_addr)
+{
+using namespace lldb_private;
+
+const bool child_processes_inherit = false;
+Error error;
+std::unique_ptr listen_socket_up(new SocketType(child_processes_inherit, error));
+EXPECT_FALSE(error.Fail());
+error = listen_socket_up->Listen(listen_remote_address, 5);
+EXPECT_FALSE(error.Fail());
+EXPECT_TRUE(listen_socket_up->IsValid());
+
+Socket *accept_socket;
+std::future accept_error = std::async(std::launch::async, [&]() {
+return listen_socket_up->Accept(listen_remote_address, child_processes_inherit, accept_socket);
+});
+
+std::string connect_remote_address = get_connect_addr(*listen_socket_up);
+std::unique_ptr connect_socket_up(new SocketType(child_processes_inherit, error));
+EXPECT_FALSE(error.Fail());
+error = connect_socket_up->Connect(connect_remote_address.c_str());
+EXPECT_FALSE(error.Fail());
+EXPECT_NE(nullptr, connect_socket_up);
+EXPECT_TRUE(connect_socket_up->IsValid());
+
+EXPECT_TRUE(accept_error.get().Success());
+EXPECT_NE(nullptr, accept_socket);
+EXPECT_TRUE(accept_socket->IsValid());
+
+return {std::move(connect_socket_up), std::unique_ptr(static_cast(accept_socket))};
+}
+
+inline std::pair, std::unique_ptr>
+CreateConnectedTCPSockets()
+{
+return CreateConnectedSockets("127.0.0.1:0", [=](const lldb_private::TCPSocket &s) {
+char connect_remote_address[64];
+snprintf(connect_remote_address, sizeof(connect_remote_address), "localhost:%u", s.GetLocalPortNumber());
+return std::string(connect_remote_address);
+});
+}
+
+#endif /* lldb_unittests_Host_SocketUtil_h */
Index: unittests/Host/SocketTest.cpp
===
--- unittests/Host/SocketTest.cpp
+++ unittests/Host/SocketTest.cpp
@@ -19,9 +19,9 @@
 
 #include "gtest/gtest.h"
 
+#include "SocketUtil.h"
+
 #include "lldb/Host/Config.h"
-#include "lldb/Host/Socket.h"
-#include "lldb/Host/common/TCPSocket.h"
 #include "lldb/Host/common/UDPSocket.h"
 
 #ifndef LLDB_DISABLE_POSIX
@@ -49,52 +49,6 @@
 ::WSACleanup();
 #endif
 }
-
-  protected:
-static void
-AcceptThread(Socket *listen_socket, const char *listen_remote_address, bool child_processes_inherit,
- Socket **accept_socket, Error *error)
-{
-*error = listen_socket->Accept(listen_remote_address, child_processes_inherit, *accept_socket);
-}
-
-template
-void
-CreateConnectedSockets(const char *listen_remote_address, const std::function &get_connect_addr, std::unique_ptr *a_up, std::unique_ptr *b_up)
-{
-bool child_processes_inherit = false;
-Error error;
-std::unique_ptr listen_socket_up(new SocketType(child_processes_inherit, error));
-EXPECT_FALSE(error.Fail());
-error = listen_socket_up->Listen(listen_

[Lldb-commits] [lldb] r267867 - Remote flaky decorator from TestSignalsAPI on linux

2016-04-28 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Apr 28 05:42:47 2016
New Revision: 267867

URL: http://llvm.org/viewvc/llvm-project?rev=267867&view=rev
Log:
Remote flaky decorator from TestSignalsAPI on linux

The test seems to pass now, and the test does not seem to be doing anything 
unusual, so I don't
expect it to cause problems.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py?rev=267867&r1=267866&r2=267867&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py 
Thu Apr 28 05:42:47 2016
@@ -17,7 +17,6 @@ class SignalsAPITestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @add_test_categories(['pyapi'])
-@expectedFlakeyLinux # this test fails 1/100 dosep runs
 @skipIfWindows # Windows doesn't have signals
 def test_ignore_signal(self):
 """Test Python SBUnixSignals.Suppress/Stop/Notify() API."""


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


Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Francis Ricci via lldb-commits
fjricci abandoned this revision.
fjricci added a comment.

Ok, I'll put up a new revision to split out the test cases.


http://reviews.llvm.org/D19633



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


Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Francis Ricci via lldb-commits
fjricci added a comment.

Would it be acceptable to split it into two test methods inside the same test 
case? Both are testing writing immediate output from a command script, just one 
is immediate output to the console and the other is immediate output to a file.


http://reviews.llvm.org/D19633



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


[Lldb-commits] [lldb] r267894 - Provide location information (file name, line number) in TSan reports about global variables.

2016-04-28 Thread Kuba Brecka via lldb-commits
Author: kuba.brecka
Date: Thu Apr 28 10:27:10 2016
New Revision: 267894

URL: http://llvm.org/viewvc/llvm-project?rev=267894&view=rev
Log:
Provide location information (file name, line number) in TSan reports about 
global variables.


Added:

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c
Modified:

lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp

lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.h

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile?rev=267894&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
 Thu Apr 28 10:27:10 2016
@@ -0,0 +1,6 @@
+LEVEL = ../../../make
+
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -fsanitize=thread -g
+
+include $(LEVEL)/Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py?rev=267894&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
 Thu Apr 28 10:27:10 2016
@@ -0,0 +1,54 @@
+"""
+Tests that TSan correctly reports the filename and line number of a racy 
global variable.
+"""
+
+import os, time
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+import lldbsuite.test.lldbutil as lldbutil
+import json
+
+class TsanGlobalLocationTestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+@expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, 
need to reenable and fix later (DES 2014.11.07)")
+@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+@skipIfRemote
+@skipUnlessCompilerRt
+@skipUnlessThreadSanitizer
+def test (self):
+self.build ()
+self.tsan_tests ()
+
+def setUp(self):
+# Call super's setUp().
+TestBase.setUp(self)
+
+def tsan_tests (self):
+exe = os.path.join (os.getcwd(), "a.out")
+self.expect("file " + exe, patterns = [ "Current executable set to 
.*a.out" ])
+
+self.runCmd("run")
+
+stop_reason = 
self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
+if stop_reason == lldb.eStopReasonExec:
+# On OS X 10.10 and older, we need to re-exec to enable 
interceptors.
+self.runCmd("continue")
+
+# the stop reason of the thread should be breakpoint.
+self.expect("thread list", "A data race should be detected",
+substrs = ['stopped', 'stop reason = Data race detected'])
+
+self.expect("thread info -s", "The extended stop info should contain 
the TSan provided fields",
+substrs = ["instrumentation_class", "description", "mops"])
+
+output_lines = self.res.GetOutput().split('\n')
+json_line = '\n'.join(output_lines[2:])
+data = json.loads(json_line)
+self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
+self.assertEqual(data["issue_type"], "data-race")
+
+self.assertTrue(data["location_filename"].endswith("/main.c"))
+self.assertEqual(data["location_line"], line_number('main.c', '// 
global variable'))

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c?rev=267894&view=auto
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/main.c
 Thu Apr 28 10:27:10 2016
@@ -0,0 +1,38 @@
+//===-- main.c --*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distribut

Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Enrico Granata via lldb-commits
granata.enrico added a comment.

Sure, that works. My only concern is that I'd like to keep the current 
PExpect-let's test writing to the console and see what happens behavior

Whatever you need to do to split the test is fine by me


http://reviews.llvm.org/D19633



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


Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Francis Ricci via lldb-commits
fjricci added a comment.

Oh I see. I don't think the file-writing is going to work in the PExpect mode 
(for some reason, it looks like the sendline calls aren't always being 
received/processed correctly by lldb, while runCmd works fine), so it's 
probably better to split out into a different test case then.


http://reviews.llvm.org/D19633



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


Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Enrico Granata via lldb-commits
granata.enrico added a comment.

I don't think we are seeing this behavior on OS X (the failure to process 
sendline() calls) - but Todd Fiala might know more about that since he keeps a 
careful eye over our bots.

Longer term, it would be interesting to find out *why* those issues are 
happening. For now, a test case split sounds reasonable.


http://reviews.llvm.org/D19633



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


Re: [Lldb-commits] [PATCH] D19633: Move TestCommandScriptImmediateOutput from PExpectTest to TestBase

2016-04-28 Thread Francis Ricci via lldb-commits
fjricci added a comment.

I do observe the sendline() behavior on OSX, but only when I cherry-pick these 
bug-fixes onto the 3.8 branch. It seems to work fine on master.


http://reviews.llvm.org/D19633



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


Re: [Lldb-commits] [PATCH] D19540: Add support for displaying Java array types on Andorid

2016-04-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov accepted this revision.
ovyalov added a comment.
This revision is now accepted and ready to land.

LGTM



Comment at: source/Plugins/Language/Java/JavaLanguage.cpp:103
@@ +102,3 @@
+AddCXXSynthetic(g_category, 
lldb_private::formatters::JavaArraySyntheticFrontEndCreator,
+"Java array synthetic children", 
ConstString("^.*\\[\\]&?$"),
+SyntheticChildren::Flags().SetCascades(true), 
true);

Could you define a constant for "^.*\\[\\]&?$" since it's used twice?


http://reviews.llvm.org/D19540



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


Re: [Lldb-commits] [PATCH] D19533: Introduce Connection::ReadAll and fix AdbClient

2016-04-28 Thread Oleksiy Vyalov via lldb-commits
ovyalov added a comment.

LGTM



Comment at: source/Plugins/Platform/Android/AdbClient.cpp:37
@@ -36,3 +36,3 @@
 
-const uint32_t kReadTimeout = 100; // 1 second
+const uint32_t kReadTimeout = 400; // 4 seconds
 const char * kOKAY = "OKAY";

It might be useful to expose this timeout as a settings property to allow its 
customization for slow ADB connections.


http://reviews.llvm.org/D19533



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


[Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.

2016-04-28 Thread Chaoren Lin via lldb-commits
chaoren created this revision.
chaoren added reviewers: labath, tfiala.
chaoren added a subscriber: lldb-commits.

Started failing after r267895.
Possibly related to llvm.org/pr27510.

http://reviews.llvm.org/D19680

Files:
  packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r267923 - XFail TestBitfields.py Python API tests.

2016-04-28 Thread Chaoren Lin via lldb-commits
Author: chaoren
Date: Thu Apr 28 14:40:19 2016
New Revision: 267923

URL: http://llvm.org/viewvc/llvm-project?rev=267923&view=rev
Log:
XFail TestBitfields.py Python API tests.

Summary:
Started failing after rL267895.
Possibly related to http://llvm.org/pr27510.

Reviewers: labath, tfiala

Subscribers: lldb-commits

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

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=267923&r1=267922&r2=267923&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py 
Thu Apr 28 14:40:19 2016
@@ -108,6 +108,7 @@ class BitfieldsTestCase(TestBase):
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


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


Re: [Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.

2016-04-28 Thread Chaoren Lin via lldb-commits
chaoren updated this revision to Diff 55464.
chaoren added a comment.

Clickable links.


http://reviews.llvm.org/D19680

Files:
  packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19680: XFail TestBitfields.py Python API tests.

2016-04-28 Thread Chaoren Lin via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267923: XFail TestBitfields.py Python API tests. (authored 
by chaoren).

Changed prior to commit:
  http://reviews.llvm.org/D19680?vs=55464&id=55465#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19680

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py

Index: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows 
(http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], 
compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()


Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -108,6 +108,7 @@
 
 @add_test_categories(['pyapi'])
 @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+@expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
 def test_and_python_api(self):
 """Use Python APIs to inspect a bitfields variable."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19489: Use llvm_unreachable to quiet a VC++ compiler warning.

2016-04-28 Thread Adrian McCarthy via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL267931: Used llvm_unreached to quite a VC++ compiler 
warning. (authored by amccarth).

Changed prior to commit:
  http://reviews.llvm.org/D19489?vs=54882&id=55475#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D19489

Files:
  lldb/trunk/source/Expression/DiagnosticManager.cpp

Index: lldb/trunk/source/Expression/DiagnosticManager.cpp
===
--- lldb/trunk/source/Expression/DiagnosticManager.cpp
+++ lldb/trunk/source/Expression/DiagnosticManager.cpp
@@ -8,6 +8,9 @@
 
//===--===//
 
 #include "lldb/Expression/DiagnosticManager.h"
+
+#include "llvm/Support/ErrorHandling.h"
+
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamString.h"
 
@@ -45,6 +48,7 @@
 case lldb_private::eDiagnosticSeverityRemark:
 return "";
 }
+llvm_unreachable("switch needs another case for DiagnosticSeverity enum");
 }
 
 std::string


Index: lldb/trunk/source/Expression/DiagnosticManager.cpp
===
--- lldb/trunk/source/Expression/DiagnosticManager.cpp
+++ lldb/trunk/source/Expression/DiagnosticManager.cpp
@@ -8,6 +8,9 @@
 //===--===//
 
 #include "lldb/Expression/DiagnosticManager.h"
+
+#include "llvm/Support/ErrorHandling.h"
+
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamString.h"
 
@@ -45,6 +48,7 @@
 case lldb_private::eDiagnosticSeverityRemark:
 return "";
 }
+llvm_unreachable("switch needs another case for DiagnosticSeverity enum");
 }
 
 std::string
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r267931 - Used llvm_unreached to quite a VC++ compiler warning.

2016-04-28 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Thu Apr 28 15:14:44 2016
New Revision: 267931

URL: http://llvm.org/viewvc/llvm-project?rev=267931&view=rev
Log:
Used llvm_unreached to quite a VC++ compiler warning.

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

Modified:
lldb/trunk/source/Expression/DiagnosticManager.cpp

Modified: lldb/trunk/source/Expression/DiagnosticManager.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DiagnosticManager.cpp?rev=267931&r1=267930&r2=267931&view=diff
==
--- lldb/trunk/source/Expression/DiagnosticManager.cpp (original)
+++ lldb/trunk/source/Expression/DiagnosticManager.cpp Thu Apr 28 15:14:44 2016
@@ -8,6 +8,9 @@
 
//===--===//
 
 #include "lldb/Expression/DiagnosticManager.h"
+
+#include "llvm/Support/ErrorHandling.h"
+
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamString.h"
 
@@ -45,6 +48,7 @@ StringForSeverity(DiagnosticSeverity sev
 case lldb_private::eDiagnosticSeverityRemark:
 return "";
 }
+llvm_unreachable("switch needs another case for DiagnosticSeverity enum");
 }
 
 std::string


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


[Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-28 Thread Francis Ricci via lldb-commits
fjricci created this revision.
fjricci added reviewers: zturner, granata.enrico, clayborg.
fjricci added a subscriber: lldb-commits.

As these are really testing separate issues, they should be run as separate
tests.

http://reviews.llvm.org/D19690

Files:
  
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py

Index: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
===
--- 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -24,17 +24,25 @@
 @skipIfRemote # test not remote-ready llvm.org/pr24813
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need 
a pexpect replacement for windows")
 @expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
-def test_command_script_immediate_output (self):
-"""Test that LLDB correctly allows scripted commands to set an 
immediate output file."""
-self.launch(timeout=60)
+def test_command_script_immediate_output_console (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to the console."""
+self.launch(timeout=5)
 
 script = os.path.join(os.getcwd(), 'custom_command.py')
 prompt = "\(lldb\) "
-  
+
 self.sendline('command script import %s' % script, patterns=[prompt])
 self.sendline('command script add -f custom_command.command_function 
mycommand', patterns=[prompt])
 self.sendline('mycommand', patterns='this is a test string, just a 
test string')
 self.sendline('command script delete mycommand', patterns=[prompt])
+self.quit(gracefully=False)
+
+@skipIfRemote # test not remote-ready llvm.org/pr24813
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need 
a pexpect replacement for windows")
+@expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
+def test_command_script_immediate_output_file (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to a file."""
+self.launch(timeout=10)
 
 test_files = {os.path.join(os.getcwd(), 'read.txt'):'r',
   os.path.join(os.getcwd(), 'write.txt')   :'w',
@@ -50,6 +58,11 @@
 with open(path, 'w+') as init:
 init.write(starter_string)
 
+script = os.path.join(os.getcwd(), 'custom_command.py')
+prompt = "\(lldb\) "
+
+self.sendline('command script import %s' % script, patterns=[prompt])
+
 self.sendline('command script add -f custom_command.write_file 
mywrite', patterns=[prompt])
 for path, mode in test_files.iteritems():
 command = 'mywrite "' + path + '" ' + mode


Index: packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
===
--- packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
+++ packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py
@@ -24,17 +24,25 @@
 @skipIfRemote # test not remote-ready llvm.org/pr24813
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
 @expectedFailureAll(oslist=["freebsd","linux"], bugnumber="llvm.org/pr26139")
-def test_command_script_immediate_output (self):
-"""Test that LLDB correctly allows scripted commands to set an immediate output file."""
-self.launch(timeout=60)
+def test_command_script_immediate_output_console (self):
+"""Test that LLDB correctly allows scripted commands to set immediate output to the console."""
+self.launch(timeout=5)
 
 script = os.path.join(os.getcwd(), 'custom_command.py')
 prompt = "\(lldb\) "
-  
+
 self.sendline('command script import %s' % script, patterns=[prompt])
 self.sendline('command script add -f custom_command.command_function mycommand', patterns=[prompt])
 self.sendline('mycommand', patterns='this is a test string, just a test string')
 self.sendline('command script delete mycommand', patterns=[prompt])
+self.quit(gracefully=False)
+
+@skipIfRemote # test not remote-ready llvm.org/pr24813
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+@expectedFailureAll(osl

Re: [Lldb-commits] [PATCH] D19124: [LLDB] Added support for PHI nodes to IR interpreter

2016-04-28 Thread Cameron via lldb-commits
cameron314 added a comment.

I'd appreciate if someone could take a look at this when they have a moment.


http://reviews.llvm.org/D19124



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


Re: [Lldb-commits] [PATCH] D19124: [LLDB] Added support for PHI nodes to IR interpreter

2016-04-28 Thread Zachary Turner via lldb-commits
This is going to have to be Sean, but his delay can be unpredictable. Keep
pinging every so often until you get a response
On Thu, Apr 28, 2016 at 2:41 PM Cameron  wrote:

> cameron314 added a comment.
>
> I'd appreciate if someone could take a look at this when they have a
> moment.
>
>
> http://reviews.llvm.org/D19124
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D19124: [LLDB] Added support for PHI nodes to IR interpreter

2016-04-28 Thread Cameron via lldb-commits
cameron314 added a comment.

All right, no worries :-) I didn't want to bother anyone.


http://reviews.llvm.org/D19124



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


[Lldb-commits] LLVM buildmaster will be updated and restarted tonight

2016-04-28 Thread Galina Kistanova via lldb-commits
Hello everyone,

LLVM buildmaster will be updated and restarted after 6 PM Pacific time
today.

Thanks

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


Re: [Lldb-commits] [PATCH] D19690: Split out console and file writing cases in TestCommandScriptImmediateOutput

2016-04-28 Thread Enrico Granata via lldb-commits
granata.enrico added inline comments.


Comment at: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py:29
@@ -30,1 +28,3 @@
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to the console."""
+self.launch(timeout=5)
 

Can we raise this a little bit? I worry that going all the way from 60 down to 
5 might cause this test to start failing more in load scenarios. Maybe 10 would 
be a better value?


Comment at: 
packages/Python/lldbsuite/test/functionalities/command_script_immediate_output/TestCommandScriptImmediateOutput.py:43
@@ +42,3 @@
+@expectedFailureAll(oslist=["freebsd","linux"], 
bugnumber="llvm.org/pr26139")
+def test_command_script_immediate_output_file (self):
+"""Test that LLDB correctly allows scripted commands to set immediate 
output to a file."""

Feel free to make the file version non pexpect-based if you want


http://reviews.llvm.org/D19690



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