[Lldb-commits] [PATCH] D30520: Make LLDB skip server-client roundtrip for signals that don't require any actions

2017-03-03 Thread Eugene Zemtsov via Phabricator via lldb-commits
eugene updated this revision to Diff 90563.
eugene added a comment.
Herald added a subscriber: mgorny.

Moved signal filtering to UnixSignals and added unit tests for UnixSignals 
class.


https://reviews.llvm.org/D30520

Files:
  include/lldb/Target/Process.h
  include/lldb/Target/UnixSignals.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  source/Target/Process.cpp
  source/Target/UnixSignals.cpp
  unittests/CMakeLists.txt
  unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
  unittests/Signals/CMakeLists.txt
  unittests/Signals/UnixSignalsTest.cpp

Index: unittests/Signals/UnixSignalsTest.cpp
===
--- /dev/null
+++ unittests/Signals/UnixSignalsTest.cpp
@@ -0,0 +1,140 @@
+//===-- UnixSignalsTest.cpp -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+#include 
+
+#include "gtest/gtest.h"
+
+#include "lldb/Target/UnixSignals.h"
+#include "llvm/Support/FormatVariadic.h"
+
+using namespace lldb;
+using namespace lldb_private;
+using llvm::None;
+
+class TestSignals : public UnixSignals {
+public:
+  TestSignals() {
+m_signals.clear();
+AddSignal(2, "SIG2", false, true, true, "DESC2");
+AddSignal(4, "SIG4", true, false, true, "DESC4");
+AddSignal(8, "SIG8", true, true, true, "DESC8");
+AddSignal(16, "SIG16", true, false, false, "DESC16");
+  }
+};
+
+void AssertEqArrays(llvm::ArrayRef expected,
+llvm::ArrayRef observed, const char *file,
+int line) {
+  std::string location = llvm::formatv("{0}:{1}", file, line);
+  ASSERT_EQ(expected.size(), observed.size()) << location;
+
+  for (size_t i = 0; i < observed.size(); ++i) {
+ASSERT_EQ(expected[i], observed[i])
+<< "array index: " << i << "location:" << location;
+  }
+}
+
+#define ASSERT_EQ_ARRAYS(expected, observed)   \
+  AssertEqArrays((expected), (observed), __FILE__, __LINE__);
+
+TEST(UnixSignalsTest, Iteration) {
+  TestSignals signals;
+
+  EXPECT_EQ(signals.GetNumSignals(), 4);
+  EXPECT_EQ(signals.GetFirstSignalNumber(), 2);
+  EXPECT_EQ(signals.GetNextSignalNumber(2), 4);
+  EXPECT_EQ(signals.GetNextSignalNumber(4), 8);
+  EXPECT_EQ(signals.GetNextSignalNumber(8), 16);
+  EXPECT_EQ(signals.GetNextSignalNumber(16), LLDB_INVALID_SIGNAL_NUMBER);
+}
+
+TEST(UnixSignalsTest, GetInfo) {
+  TestSignals signals;
+
+  bool should_suppress = false, should_stop = false, should_notify = false;
+  int32_t signo = 4;
+  std::string name =
+  signals.GetSignalInfo(signo, should_suppress, should_stop, should_notify);
+  EXPECT_EQ(name, "SIG4");
+  EXPECT_EQ(should_suppress, true);
+  EXPECT_EQ(should_stop, false);
+  EXPECT_EQ(should_notify, true);
+
+  EXPECT_EQ(signals.GetShouldSuppress(signo), true);
+  EXPECT_EQ(signals.GetShouldStop(signo), false);
+  EXPECT_EQ(signals.GetShouldNotify(signo), true);
+  EXPECT_EQ(signals.GetSignalAsCString(signo), name);
+}
+
+TEST(UnixSignalsTest, VersionChange) {
+  TestSignals signals;
+
+  int32_t signo = 8;
+  uint64_t ver = signals.GetVersion();
+  EXPECT_GT(ver, 0ull);
+  EXPECT_EQ(signals.GetShouldSuppress(signo), true);
+  EXPECT_EQ(signals.GetShouldStop(signo), true);
+  EXPECT_EQ(signals.GetShouldNotify(signo), true);
+
+  EXPECT_EQ(ver, signals.GetVersion());
+
+  signals.SetShouldSuppress(signo, false);
+  EXPECT_LT(ver, signals.GetVersion());
+  ver = signals.GetVersion();
+
+  signals.SetShouldStop(signo, true);
+  EXPECT_LT(ver, signals.GetVersion());
+  ver = signals.GetVersion();
+
+  signals.SetShouldNotify(signo, false);
+  EXPECT_LT(ver, signals.GetVersion());
+  ver = signals.GetVersion();
+
+  EXPECT_EQ(signals.GetShouldSuppress(signo), false);
+  EXPECT_EQ(signals.GetShouldStop(signo), true);
+  EXPECT_EQ(signals.GetShouldNotify(signo), false);
+
+  EXPECT_EQ(ver, signals.GetVersion());
+}
+
+TEST(UnixSignalsTest, GetFilteredSignals) {
+  TestSignals signals;
+
+  auto all_signals = signals.GetFilteredSignals(None, None, None);
+  std::vector expected = {2, 4, 8, 16};
+  ASSERT_EQ_ARRAYS(expected, all_signals);
+
+  auto supressed = signals.GetFilteredSignals(true, None, None);
+  expected = {4, 8, 16};
+  ASSERT_EQ_ARRAYS(expected, supressed);
+
+  auto not_supressed = signals.GetFilteredSignals(false, None, None);
+  expected = {2};
+  ASSERT_EQ_ARRAYS(expected, not_supressed);
+
+  auto stopped = signals.GetFilteredSignals(None, true, None);
+  expected = {2, 8};
+  ASSERT_EQ_ARRAYS(expected, stopped);
+
+  auto not_stopped = signals.GetFilteredSignals(No

Re: [Lldb-commits] [lldb] r296946 - Delete LLDB's code for getting / setting thread name.

2017-03-03 Thread Jim Ingham via lldb-commits
It was done on all platforms, but the way it worked before was there was a 
HostInfo::GetMaxThreadNameLength that was the length passed into SetThreadName, 
and then the string was back trimmed to that length generically in 
ThisThread::SetName.

You can see the length passed in in 
HostNativeThreadBase::ThreadCreateTrampoline, and the trimming was done in 
ThisThread::SetName.

Jim



> On Mar 3, 2017, at 6:01 PM, Zachary Turner  wrote:
> 
> Yes, that was an oversight. Which platforms was this on?
> On Fri, Mar 3, 2017 at 5:54 PM Jim Ingham  wrote:
> This change seems to have lost the code that would make sure that on 
> platforms with short thread names we pick up the end of the name passed in 
> because that is generally the more specific part.  Was that just an oversight?
> 
> Jim
> 
> > On Mar 3, 2017, at 5:31 PM, Zachary Turner via lldb-commits 
> >  wrote:
> >
> > Author: zturner
> > Date: Fri Mar  3 19:31:06 2017
> > New Revision: 296946
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=296946&view=rev
> > Log:
> > Delete LLDB's code for getting / setting thread name.
> >
> > This is now functionality in LLVM, and all callers have
> > already been updated to use the LLVM functions.
> >
> > Removed:
> >lldb/trunk/include/lldb/Host/ThisThread.h
> >lldb/trunk/source/Host/common/ThisThread.cpp
> >lldb/trunk/source/Host/freebsd/ThisThread.cpp
> >lldb/trunk/source/Host/linux/ThisThread.cpp
> >lldb/trunk/source/Host/macosx/ThisThread.cpp
> >lldb/trunk/source/Host/netbsd/ThisThread.cpp
> >lldb/trunk/source/Host/windows/ThisThread.cpp
> > Modified:
> >lldb/trunk/include/lldb/Host/Host.h
> >lldb/trunk/source/Host/CMakeLists.txt
> >lldb/trunk/source/Host/common/Host.cpp
> >lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
> >lldb/trunk/source/Host/common/ThreadLauncher.cpp
> >lldb/trunk/source/Host/windows/Host.cpp
> >lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
> >lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> >
> > Modified: lldb/trunk/include/lldb/Host/Host.h
> > URL: 
> > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=296946&r1=296945&r2=296946&view=diff
> > ==
> > --- lldb/trunk/include/lldb/Host/Host.h (original)
> > +++ lldb/trunk/include/lldb/Host/Host.h Fri Mar  3 19:31:06 2017
> > @@ -100,14 +100,6 @@ public:
> >   static void Kill(lldb::pid_t pid, int signo);
> >
> >   //--
> > -  /// Get the thread ID for the calling thread in the current process.
> > -  ///
> > -  /// @return
> > -  /// The thread ID for the calling thread in the current process.
> > -  //--
> > -  static lldb::tid_t GetCurrentThreadID();
> > -
> > -  //--
> >   /// Get the thread token (the one returned by ThreadCreate when the 
> > thread was
> >   /// created) for the
> >   /// calling thread in the current process.
> >
> > Removed: lldb/trunk/include/lldb/Host/ThisThread.h
> > URL: 
> > http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ThisThread.h?rev=296945&view=auto
> > ==
> > --- lldb/trunk/include/lldb/Host/ThisThread.h (original)
> > +++ lldb/trunk/include/lldb/Host/ThisThread.h (removed)
> > @@ -1,37 +0,0 @@
> > -//===-- ThisThread.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_Host_ThisThread_h_
> > -#define lldb_Host_ThisThread_h_
> > -
> > -#include "llvm/ADT/StringRef.h"
> > -
> > -#include 
> > -
> > -namespace llvm {
> > -template  class SmallVectorImpl;
> > -}
> > -
> > -namespace lldb_private {
> > -
> > -class ThisThread {
> > -private:
> > -  ThisThread();
> > -
> > -public:
> > -  // ThisThread common functions.
> > -  static void SetName(llvm::StringRef name, int max_length);
> > -
> > -  // ThisThread platform-specific functions.
> > -  static void SetName(llvm::StringRef name);
> > -  static void GetName(llvm::SmallVectorImpl &name);
> > -};
> > -}
> > -
> > -#endif
> >
> > Modified: lldb/trunk/source/Host/CMakeLists.txt
> > URL: 
> > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=296946&r1=296945&r2=296946&view=diff
> > ==
> > --- lldb/trunk/source/Host/CMakeLists.txt (original)
> > +++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar  3 19:31:06 2017
> > @@ -35,7 +35,6

Re: [Lldb-commits] [lldb] r296946 - Delete LLDB's code for getting / setting thread name.

2017-03-03 Thread Zachary Turner via lldb-commits
I can add this back tonight. I'll do it on the llvm side so no changes
required on lldb side
On Fri, Mar 3, 2017 at 6:01 PM Zachary Turner  wrote:

> Yes, that was an oversight. Which platforms was this on?
> On Fri, Mar 3, 2017 at 5:54 PM Jim Ingham  wrote:
>
> This change seems to have lost the code that would make sure that on
> platforms with short thread names we pick up the end of the name passed in
> because that is generally the more specific part.  Was that just an
> oversight?
>
> Jim
>
> > On Mar 3, 2017, at 5:31 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > Author: zturner
> > Date: Fri Mar  3 19:31:06 2017
> > New Revision: 296946
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=296946&view=rev
> > Log:
> > Delete LLDB's code for getting / setting thread name.
> >
> > This is now functionality in LLVM, and all callers have
> > already been updated to use the LLVM functions.
> >
> > Removed:
> >lldb/trunk/include/lldb/Host/ThisThread.h
> >lldb/trunk/source/Host/common/ThisThread.cpp
> >lldb/trunk/source/Host/freebsd/ThisThread.cpp
> >lldb/trunk/source/Host/linux/ThisThread.cpp
> >lldb/trunk/source/Host/macosx/ThisThread.cpp
> >lldb/trunk/source/Host/netbsd/ThisThread.cpp
> >lldb/trunk/source/Host/windows/ThisThread.cpp
> > Modified:
> >lldb/trunk/include/lldb/Host/Host.h
> >lldb/trunk/source/Host/CMakeLists.txt
> >lldb/trunk/source/Host/common/Host.cpp
> >lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
> >lldb/trunk/source/Host/common/ThreadLauncher.cpp
> >lldb/trunk/source/Host/windows/Host.cpp
> >lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
> >
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> >
> > Modified: lldb/trunk/include/lldb/Host/Host.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=296946&r1=296945&r2=296946&view=diff
> >
> ==
> > --- lldb/trunk/include/lldb/Host/Host.h (original)
> > +++ lldb/trunk/include/lldb/Host/Host.h Fri Mar  3 19:31:06 2017
> > @@ -100,14 +100,6 @@ public:
> >   static void Kill(lldb::pid_t pid, int signo);
> >
> >   //--
> > -  /// Get the thread ID for the calling thread in the current process.
> > -  ///
> > -  /// @return
> > -  /// The thread ID for the calling thread in the current process.
> > -  //--
> > -  static lldb::tid_t GetCurrentThreadID();
> > -
> > -  //--
> >   /// Get the thread token (the one returned by ThreadCreate when the
> thread was
> >   /// created) for the
> >   /// calling thread in the current process.
> >
> > Removed: lldb/trunk/include/lldb/Host/ThisThread.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ThisThread.h?rev=296945&view=auto
> >
> ==
> > --- lldb/trunk/include/lldb/Host/ThisThread.h (original)
> > +++ lldb/trunk/include/lldb/Host/ThisThread.h (removed)
> > @@ -1,37 +0,0 @@
> > -//===-- ThisThread.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_Host_ThisThread_h_
> > -#define lldb_Host_ThisThread_h_
> > -
> > -#include "llvm/ADT/StringRef.h"
> > -
> > -#include 
> > -
> > -namespace llvm {
> > -template  class SmallVectorImpl;
> > -}
> > -
> > -namespace lldb_private {
> > -
> > -class ThisThread {
> > -private:
> > -  ThisThread();
> > -
> > -public:
> > -  // ThisThread common functions.
> > -  static void SetName(llvm::StringRef name, int max_length);
> > -
> > -  // ThisThread platform-specific functions.
> > -  static void SetName(llvm::StringRef name);
> > -  static void GetName(llvm::SmallVectorImpl &name);
> > -};
> > -}
> > -
> > -#endif
> >
> > Modified: lldb/trunk/source/Host/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=296946&r1=296945&r2=296946&view=diff
> >
> ==
> > --- lldb/trunk/source/Host/CMakeLists.txt (original)
> > +++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar  3 19:31:06 2017
> > @@ -35,7 +35,6 @@ add_host_subdirectory(common
> >   common/Symbols.cpp
> >   common/TCPSocket.cpp
> >   common/Terminal.cpp
> > -  common/ThisThread.cpp
> >   common/ThreadLauncher.cpp
> >   common/XML.cpp
> >   common/UDPSocket.cpp
> > @@ -73,7 +72,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windo

Re: [Lldb-commits] [lldb] r296946 - Delete LLDB's code for getting / setting thread name.

2017-03-03 Thread Zachary Turner via lldb-commits
Yes, that was an oversight. Which platforms was this on?
On Fri, Mar 3, 2017 at 5:54 PM Jim Ingham  wrote:

> This change seems to have lost the code that would make sure that on
> platforms with short thread names we pick up the end of the name passed in
> because that is generally the more specific part.  Was that just an
> oversight?
>
> Jim
>
> > On Mar 3, 2017, at 5:31 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > Author: zturner
> > Date: Fri Mar  3 19:31:06 2017
> > New Revision: 296946
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=296946&view=rev
> > Log:
> > Delete LLDB's code for getting / setting thread name.
> >
> > This is now functionality in LLVM, and all callers have
> > already been updated to use the LLVM functions.
> >
> > Removed:
> >lldb/trunk/include/lldb/Host/ThisThread.h
> >lldb/trunk/source/Host/common/ThisThread.cpp
> >lldb/trunk/source/Host/freebsd/ThisThread.cpp
> >lldb/trunk/source/Host/linux/ThisThread.cpp
> >lldb/trunk/source/Host/macosx/ThisThread.cpp
> >lldb/trunk/source/Host/netbsd/ThisThread.cpp
> >lldb/trunk/source/Host/windows/ThisThread.cpp
> > Modified:
> >lldb/trunk/include/lldb/Host/Host.h
> >lldb/trunk/source/Host/CMakeLists.txt
> >lldb/trunk/source/Host/common/Host.cpp
> >lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
> >lldb/trunk/source/Host/common/ThreadLauncher.cpp
> >lldb/trunk/source/Host/windows/Host.cpp
> >lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
> >
> lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> >
> > Modified: lldb/trunk/include/lldb/Host/Host.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=296946&r1=296945&r2=296946&view=diff
> >
> ==
> > --- lldb/trunk/include/lldb/Host/Host.h (original)
> > +++ lldb/trunk/include/lldb/Host/Host.h Fri Mar  3 19:31:06 2017
> > @@ -100,14 +100,6 @@ public:
> >   static void Kill(lldb::pid_t pid, int signo);
> >
> >   //--
> > -  /// Get the thread ID for the calling thread in the current process.
> > -  ///
> > -  /// @return
> > -  /// The thread ID for the calling thread in the current process.
> > -  //--
> > -  static lldb::tid_t GetCurrentThreadID();
> > -
> > -  //--
> >   /// Get the thread token (the one returned by ThreadCreate when the
> thread was
> >   /// created) for the
> >   /// calling thread in the current process.
> >
> > Removed: lldb/trunk/include/lldb/Host/ThisThread.h
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ThisThread.h?rev=296945&view=auto
> >
> ==
> > --- lldb/trunk/include/lldb/Host/ThisThread.h (original)
> > +++ lldb/trunk/include/lldb/Host/ThisThread.h (removed)
> > @@ -1,37 +0,0 @@
> > -//===-- ThisThread.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_Host_ThisThread_h_
> > -#define lldb_Host_ThisThread_h_
> > -
> > -#include "llvm/ADT/StringRef.h"
> > -
> > -#include 
> > -
> > -namespace llvm {
> > -template  class SmallVectorImpl;
> > -}
> > -
> > -namespace lldb_private {
> > -
> > -class ThisThread {
> > -private:
> > -  ThisThread();
> > -
> > -public:
> > -  // ThisThread common functions.
> > -  static void SetName(llvm::StringRef name, int max_length);
> > -
> > -  // ThisThread platform-specific functions.
> > -  static void SetName(llvm::StringRef name);
> > -  static void GetName(llvm::SmallVectorImpl &name);
> > -};
> > -}
> > -
> > -#endif
> >
> > Modified: lldb/trunk/source/Host/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=296946&r1=296945&r2=296946&view=diff
> >
> ==
> > --- lldb/trunk/source/Host/CMakeLists.txt (original)
> > +++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar  3 19:31:06 2017
> > @@ -35,7 +35,6 @@ add_host_subdirectory(common
> >   common/Symbols.cpp
> >   common/TCPSocket.cpp
> >   common/Terminal.cpp
> > -  common/ThisThread.cpp
> >   common/ThreadLauncher.cpp
> >   common/XML.cpp
> >   common/UDPSocket.cpp
> > @@ -73,7 +72,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
> > windows/PipeWindows.cpp
> > windows/ProcessLauncherWindows.cpp
> > windows/ProcessRunLock.cpp
> > -windows/ThisThread.cpp
> >   

[Lldb-commits] [lldb] r296951 - Disable the lldb-mi tests on remote platforms.

2017-03-03 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Fri Mar  3 19:48:43 2017
New Revision: 296951

URL: http://llvm.org/viewvc/llvm-project?rev=296951&view=rev
Log:
Disable the lldb-mi tests on remote platforms.

Currently on remote platforms the lldb-mi tests fail, which means they time out.
Given how many of the lldb-mi tests there are, this means a long wait.

Modified:

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiExit.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiPrompt.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiCliSupport.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/symbol/TestMiSymbol.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/target/TestMiTarget.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/TestMiThreadInfo.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py

lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py?rev=296951&r1=296950&r2=296951&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py 
Fri Mar  3 19:48:43 2017
@@ -18,6 +18,7 @@ class MiEnvironmentCdTestCase(lldbmi_tes
 @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
 @skipIfDarwin   # Disabled while I investigate the failure on buildbot.
+@skipIfRemote   # We do not currently support remote debugging via the MI.
 def test_lldbmi_environment_cd(self):
 """Test that 'lldb-mi --interpreter' changes working directory for 
inferior."""
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiExit.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiExit.py?rev=296951&r1=296950&r2=296951&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiExit.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiExit.py Fri 
Mar  3 19:48:43 2017
@@ -18,6 +18,7 @@ class MiExitTestCase(lldbmi_testcase.MiT
 oslist=["windows"],
 bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfRemote   # We do not currently support remote debugging via the MI.
 def test_lldbmi_gdb_exit(self):
 """Test that '-gdb-exit' terminates local debug session and exits."""
 
@@ -44,6 +45,7 @@ class MiExitTestCase(lldbmi_testcase.MiT
 oslist=["windows"],
 bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfRemote   # We do not currently support remote debugging via the MI.
 def test_lldbmi_quit(self):
 """Test that 'quit' exits immediately."""
 
@@ -69,6 +71,7 @@ class MiExitTestCase(lldbmi_testcase.MiT
 oslist=["windows"],
 bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
 @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread 
races
+@skipIfRemote   # We do not currently support remote debugging via the MI.
 def test_lldbmi_q(self):
 """Test that 'q' exits immediately."""
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py?rev=296951&r1=296950&r2=296951&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiFile.py 
(original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/

Re: [Lldb-commits] [lldb] r296946 - Delete LLDB's code for getting / setting thread name.

2017-03-03 Thread Jim Ingham via lldb-commits
This change seems to have lost the code that would make sure that on platforms 
with short thread names we pick up the end of the name passed in because that 
is generally the more specific part.  Was that just an oversight?

Jim

> On Mar 3, 2017, at 5:31 PM, Zachary Turner via lldb-commits 
>  wrote:
> 
> Author: zturner
> Date: Fri Mar  3 19:31:06 2017
> New Revision: 296946
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=296946&view=rev
> Log:
> Delete LLDB's code for getting / setting thread name.
> 
> This is now functionality in LLVM, and all callers have
> already been updated to use the LLVM functions.
> 
> Removed:
>lldb/trunk/include/lldb/Host/ThisThread.h
>lldb/trunk/source/Host/common/ThisThread.cpp
>lldb/trunk/source/Host/freebsd/ThisThread.cpp
>lldb/trunk/source/Host/linux/ThisThread.cpp
>lldb/trunk/source/Host/macosx/ThisThread.cpp
>lldb/trunk/source/Host/netbsd/ThisThread.cpp
>lldb/trunk/source/Host/windows/ThisThread.cpp
> Modified:
>lldb/trunk/include/lldb/Host/Host.h
>lldb/trunk/source/Host/CMakeLists.txt
>lldb/trunk/source/Host/common/Host.cpp
>lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
>lldb/trunk/source/Host/common/ThreadLauncher.cpp
>lldb/trunk/source/Host/windows/Host.cpp
>lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
>lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
> 
> Modified: lldb/trunk/include/lldb/Host/Host.h
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=296946&r1=296945&r2=296946&view=diff
> ==
> --- lldb/trunk/include/lldb/Host/Host.h (original)
> +++ lldb/trunk/include/lldb/Host/Host.h Fri Mar  3 19:31:06 2017
> @@ -100,14 +100,6 @@ public:
>   static void Kill(lldb::pid_t pid, int signo);
> 
>   //--
> -  /// Get the thread ID for the calling thread in the current process.
> -  ///
> -  /// @return
> -  /// The thread ID for the calling thread in the current process.
> -  //--
> -  static lldb::tid_t GetCurrentThreadID();
> -
> -  //--
>   /// Get the thread token (the one returned by ThreadCreate when the thread 
> was
>   /// created) for the
>   /// calling thread in the current process.
> 
> Removed: lldb/trunk/include/lldb/Host/ThisThread.h
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ThisThread.h?rev=296945&view=auto
> ==
> --- lldb/trunk/include/lldb/Host/ThisThread.h (original)
> +++ lldb/trunk/include/lldb/Host/ThisThread.h (removed)
> @@ -1,37 +0,0 @@
> -//===-- ThisThread.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_Host_ThisThread_h_
> -#define lldb_Host_ThisThread_h_
> -
> -#include "llvm/ADT/StringRef.h"
> -
> -#include 
> -
> -namespace llvm {
> -template  class SmallVectorImpl;
> -}
> -
> -namespace lldb_private {
> -
> -class ThisThread {
> -private:
> -  ThisThread();
> -
> -public:
> -  // ThisThread common functions.
> -  static void SetName(llvm::StringRef name, int max_length);
> -
> -  // ThisThread platform-specific functions.
> -  static void SetName(llvm::StringRef name);
> -  static void GetName(llvm::SmallVectorImpl &name);
> -};
> -}
> -
> -#endif
> 
> Modified: lldb/trunk/source/Host/CMakeLists.txt
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=296946&r1=296945&r2=296946&view=diff
> ==
> --- lldb/trunk/source/Host/CMakeLists.txt (original)
> +++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar  3 19:31:06 2017
> @@ -35,7 +35,6 @@ add_host_subdirectory(common
>   common/Symbols.cpp
>   common/TCPSocket.cpp
>   common/Terminal.cpp
> -  common/ThisThread.cpp
>   common/ThreadLauncher.cpp
>   common/XML.cpp
>   common/UDPSocket.cpp
> @@ -73,7 +72,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
> windows/PipeWindows.cpp
> windows/ProcessLauncherWindows.cpp
> windows/ProcessRunLock.cpp
> -windows/ThisThread.cpp
> windows/Windows.cpp
> )
> else()
> @@ -107,7 +105,6 @@ else()
>   macosx/HostInfoMacOSX.mm
>   macosx/HostThreadMacOSX.mm
>   macosx/Symbols.cpp
> -  macosx/ThisThread.cpp
>   macosx/cfcpp/CFCBundle.cpp
>   macosx/cfcpp/CFCData.cpp
>   macosx/cfcpp/CFCMutableArray.cpp
> @@ -124,7 +121,6 @@ else()
>   linux/HostInfoLinux.cpp
>  

[Lldb-commits] [lldb] r296947 - Fix a bug in the dep analysis script.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 19:31:29 2017
New Revision: 296947

URL: http://llvm.org/viewvc/llvm-project?rev=296947&view=rev
Log:
Fix a bug in the dep analysis script.

It wasn't always normalizing slashes correctly, so you'd end
up with the same thing in the map twice.

Modified:
lldb/trunk/scripts/analyze-project-deps.py

Modified: lldb/trunk/scripts/analyze-project-deps.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/analyze-project-deps.py?rev=296947&r1=296946&r2=296947&view=diff
==
--- lldb/trunk/scripts/analyze-project-deps.py (original)
+++ lldb/trunk/scripts/analyze-project-deps.py Fri Mar  3 19:31:29 2017
@@ -35,6 +35,7 @@ for (base, dirs, files) in os.walk(inc_d
 relative = os.path.relpath(base, inc_dir)
 inc_files = filter(lambda x : os.path.splitext(x)[1] in [".h"], files)
 deps = set()
+relative = relative.replace("\\", "/")
 for inc in inc_files:
 inc_path = os.path.join(base, inc)
 deps.update(scan_deps(relative, inc_path))


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


[Lldb-commits] [lldb] r296946 - Delete LLDB's code for getting / setting thread name.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 19:31:06 2017
New Revision: 296946

URL: http://llvm.org/viewvc/llvm-project?rev=296946&view=rev
Log:
Delete LLDB's code for getting / setting thread name.

This is now functionality in LLVM, and all callers have
already been updated to use the LLVM functions.

Removed:
lldb/trunk/include/lldb/Host/ThisThread.h
lldb/trunk/source/Host/common/ThisThread.cpp
lldb/trunk/source/Host/freebsd/ThisThread.cpp
lldb/trunk/source/Host/linux/ThisThread.cpp
lldb/trunk/source/Host/macosx/ThisThread.cpp
lldb/trunk/source/Host/netbsd/ThisThread.cpp
lldb/trunk/source/Host/windows/ThisThread.cpp
Modified:
lldb/trunk/include/lldb/Host/Host.h
lldb/trunk/source/Host/CMakeLists.txt
lldb/trunk/source/Host/common/Host.cpp
lldb/trunk/source/Host/common/HostNativeThreadBase.cpp
lldb/trunk/source/Host/common/ThreadLauncher.cpp
lldb/trunk/source/Host/windows/Host.cpp
lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Modified: lldb/trunk/include/lldb/Host/Host.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Host.h?rev=296946&r1=296945&r2=296946&view=diff
==
--- lldb/trunk/include/lldb/Host/Host.h (original)
+++ lldb/trunk/include/lldb/Host/Host.h Fri Mar  3 19:31:06 2017
@@ -100,14 +100,6 @@ public:
   static void Kill(lldb::pid_t pid, int signo);
 
   //--
-  /// Get the thread ID for the calling thread in the current process.
-  ///
-  /// @return
-  /// The thread ID for the calling thread in the current process.
-  //--
-  static lldb::tid_t GetCurrentThreadID();
-
-  //--
   /// Get the thread token (the one returned by ThreadCreate when the thread 
was
   /// created) for the
   /// calling thread in the current process.

Removed: lldb/trunk/include/lldb/Host/ThisThread.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/ThisThread.h?rev=296945&view=auto
==
--- lldb/trunk/include/lldb/Host/ThisThread.h (original)
+++ lldb/trunk/include/lldb/Host/ThisThread.h (removed)
@@ -1,37 +0,0 @@
-//===-- ThisThread.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_Host_ThisThread_h_
-#define lldb_Host_ThisThread_h_
-
-#include "llvm/ADT/StringRef.h"
-
-#include 
-
-namespace llvm {
-template  class SmallVectorImpl;
-}
-
-namespace lldb_private {
-
-class ThisThread {
-private:
-  ThisThread();
-
-public:
-  // ThisThread common functions.
-  static void SetName(llvm::StringRef name, int max_length);
-
-  // ThisThread platform-specific functions.
-  static void SetName(llvm::StringRef name);
-  static void GetName(llvm::SmallVectorImpl &name);
-};
-}
-
-#endif

Modified: lldb/trunk/source/Host/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=296946&r1=296945&r2=296946&view=diff
==
--- lldb/trunk/source/Host/CMakeLists.txt (original)
+++ lldb/trunk/source/Host/CMakeLists.txt Fri Mar  3 19:31:06 2017
@@ -35,7 +35,6 @@ add_host_subdirectory(common
   common/Symbols.cpp
   common/TCPSocket.cpp
   common/Terminal.cpp
-  common/ThisThread.cpp
   common/ThreadLauncher.cpp
   common/XML.cpp
   common/UDPSocket.cpp
@@ -73,7 +72,6 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
 windows/PipeWindows.cpp
 windows/ProcessLauncherWindows.cpp
 windows/ProcessRunLock.cpp
-windows/ThisThread.cpp
 windows/Windows.cpp
 )
 else()
@@ -107,7 +105,6 @@ else()
   macosx/HostInfoMacOSX.mm
   macosx/HostThreadMacOSX.mm
   macosx/Symbols.cpp
-  macosx/ThisThread.cpp
   macosx/cfcpp/CFCBundle.cpp
   macosx/cfcpp/CFCData.cpp
   macosx/cfcpp/CFCMutableArray.cpp
@@ -124,7 +121,6 @@ else()
   linux/HostInfoLinux.cpp
   linux/HostThreadLinux.cpp
   linux/LibcGlue.cpp
-  linux/ThisThread.cpp
   )
 list(APPEND LLDB_PLUGINS lldbPluginProcessLinux)
 if (CMAKE_SYSTEM_NAME MATCHES "Android")
@@ -138,7 +134,6 @@ else()
   freebsd/Host.cpp
   freebsd/HostInfoFreeBSD.cpp
   freebsd/HostThreadFreeBSD.cpp
-  freebsd/ThisThread.cpp
   )
 
   elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
@@ -146,7 +141,6 @@ else()
   netbsd/Host.cpp
   netbsd/HostInfoNetBSD.cpp
   netbsd/HostThreadNetBSD.cpp
-  ne

[Lldb-commits] [lldb] r296944 - Add dependency on DynamicLoaderStatic to Utility.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 19:30:38 2017
New Revision: 296944

URL: http://llvm.org/viewvc/llvm-project?rev=296944&view=rev
Log:
Add dependency on DynamicLoaderStatic to Utility.

Modified:
lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt

Modified: lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt?rev=296944&r1=296943&r2=296944&view=diff
==
--- lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Static/CMakeLists.txt Fri Mar  3 
19:30:38 2017
@@ -6,4 +6,5 @@ add_lldb_library(lldbPluginDynamicLoader
 lldbHost
 lldbSymbol
 lldbTarget
+lldbUtility
   )


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


[Lldb-commits] [lldb] r296941 - Move UUID from Core -> Utility.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 19:28:55 2017
New Revision: 296941

URL: http://llvm.org/viewvc/llvm-project?rev=296941&view=rev
Log:
Move UUID from Core -> Utility.

Added:
lldb/trunk/include/lldb/Utility/UUID.h
lldb/trunk/source/Utility/UUID.cpp
Removed:
lldb/trunk/include/lldb/Core/UUID.h
lldb/trunk/source/Core/UUID.cpp
Modified:
lldb/trunk/include/lldb/Core/Module.h
lldb/trunk/include/lldb/Core/ModuleSpec.h
lldb/trunk/include/lldb/Interpreter/OptionValueUUID.h
lldb/trunk/include/lldb/Target/DynamicLoader.h
lldb/trunk/source/Core/CMakeLists.txt
lldb/trunk/source/Core/DataExtractor.cpp
lldb/trunk/source/Host/common/Symbols.cpp
lldb/trunk/source/Host/macosx/Symbols.cpp

lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.h

lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h
lldb/trunk/source/Utility/CMakeLists.txt

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=296941&r1=296940&r2=296941&view=diff
==
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Fri Mar  3 19:28:55 2017
@@ -14,7 +14,7 @@
 
 // Project includes
 #include "lldb/Core/ArchSpec.h"
-#include "lldb/Core/UUID.h"
+#include "lldb/Utility/UUID.h"
 #include "lldb/Host/FileSpec.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/PathMappingList.h"

Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=296941&r1=296940&r2=296941&view=diff
==
--- lldb/trunk/include/lldb/Core/ModuleSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleSpec.h Fri Mar  3 19:28:55 2017
@@ -12,7 +12,7 @@
 
 // Project includes
 #include "lldb/Core/ArchSpec.h"
-#include "lldb/Core/UUID.h"
+#include "lldb/Utility/UUID.h"
 #include "lldb/Host/FileSpec.h"
 #include "lldb/Target/PathMappingList.h"
 #include "lldb/Utility/Stream.h"

Removed: lldb/trunk/include/lldb/Core/UUID.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UUID.h?rev=296940&view=auto
==
--- lldb/trunk/include/lldb/Core/UUID.h (original)
+++ lldb/trunk/include/lldb/Core/UUID.h (removed)
@@ -1,96 +0,0 @@
-//===-- UUID.h --*- C++ 
-*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===--===//
-
-#ifndef liblldb_UUID_h_
-#define liblldb_UUID_h_
-
-// C Includes
-// C++ Includes
-#include 
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class UUID {
-public:
-  // Most UUIDs are 16 bytes, but some Linux build-ids (SHA1) are 20.
-  typedef uint8_t ValueType[20];
-
-  //--
-  // Constructors and Destructors
-  //--
-  UUID();
-  UUID(const UUID &rhs);
-  UUID(const void *uuid_bytes, uint32_t num_uuid_bytes);
-
-  ~UUID();
-
-  const UUID &operator=(const UUID &rhs);
-
-  void Clear();
-
-  void Dump(Stream *s) const;
-
-  const void *GetBytes() const;
-
-  size_t GetByteSize();
-
-  bool IsValid() const;
-
-  bool SetBytes(const void *uuid_bytes, uint32_t num_uuid_bytes = 16);
-
-  std::string GetAsString(const char *separator = nullptr) const;
-
-  size_t SetFromCString(const char *c_str, uint32_t num_uuid_bytes = 16);
-
-  // Decode as many UUID bytes (up to 16) as possible from the C string "cstr"
-  // This is used for auto completion where a partial UUID might have been
-  // typed in. It
-  //--
-  /// Decode as many UUID bytes (up to 16) as possible from the C
-  /// string \a cstr.
-  ///
-  /// @param[in] cstr

[Lldb-commits] [lldb] r296938 - Fix the macOS build all the way after r296909.

2017-03-03 Thread Jim Ingham via lldb-commits
Author: jingham
Date: Fri Mar  3 19:15:24 2017
New Revision: 296938

URL: http://llvm.org/viewvc/llvm-project?rev=296938&view=rev
Log:
Fix the macOS build all the way after r296909.

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296938&r1=296937&r2=296938&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 19:15:24 2017
@@ -721,6 +721,7 @@
4C0083401B9F9BA900D5CF24 /* UtilityFunction.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp 
*/; };
4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp 
*/; };
4C3ADCD61810D88B00357218 /* BreakpointResolverFileRegex.cpp in 
Sources */ = {isa = PBXBuildFile; fileRef = 4CAA56141422D986001FFA01 /* 
BreakpointResolverFileRegex.cpp */; };
+   4C4EB7811E6A4DCC002035C0 /* DumpDataExtractor.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 4C4EB77F1E6A4DB8002035C0 /* 
DumpDataExtractor.cpp */; };
4C562CC71CC07DF700C52EAC /* PDBASTParser.cpp in Sources */ = 
{isa = PBXBuildFile; fileRef = 4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */; 
};
4C56543119D1EFAA002E9C44 /* ThreadPlanPython.cpp in Sources */ 
= {isa = PBXBuildFile; fileRef = 4C56543019D1EFAA002E9C44 /* 
ThreadPlanPython.cpp */; };
4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */ = {isa 
= PBXBuildFile; fileRef = 4C56543419D2297A002E9C44 /* SBThreadPlan.h */; 
settings = {ATTRIBUTES = (Public, ); }; };
@@ -2503,6 +2504,8 @@
4C43DF8611069BFD00E55CBF /* ThreadPlanStepOverRange.h */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
= ThreadPlanStepOverRange.h; path = 
include/lldb/Target/ThreadPlanStepOverRange.h; sourceTree = ""; };
4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = ThreadPlanStepInRange.cpp; path = 
source/Target/ThreadPlanStepInRange.cpp; sourceTree = ""; };
4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = ThreadPlanStepOverRange.cpp; path = 
source/Target/ThreadPlanStepOverRange.cpp; sourceTree = ""; };
+   4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = DumpDataExtractor.cpp; path = source/Core/DumpDataExtractor.cpp; 
sourceTree = ""; };
+   4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
DumpDataExtractor.h; path = include/lldb/Core/DumpDataExtractor.h; sourceTree = 
""; };
4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = PDBASTParser.cpp; path = PDB/PDBASTParser.cpp; sourceTree = ""; };
4C562CC31CC07DDD00C52EAC /* PDBASTParser.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
PDBASTParser.h; path = PDB/PDBASTParser.h; sourceTree = ""; };
4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = ThreadPlanPython.cpp; path = source/Target/ThreadPlanPython.cpp; 
sourceTree = ""; };
@@ -4654,6 +4657,8 @@
263664921140A4930075843B /* Debugger.cpp */,
26BC7D5E10F1B77400F91463 /* Disassembler.h */,
26BC7E7610F1B85900F91463 /* Disassembler.cpp */,
+   4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h 
*/,
+   4C4EB77F1E6A4DB8002035C0 /* 
DumpDataExtractor.cpp */,
26BC7D5F10F1B77400F91463 /* dwarf.h */,
26D9FDC612F784E60003F2EE /* 
EmulateInstruction.h */,
26D9FDC812F784FD0003F2EE /* 
EmulateInstruction.cpp */,
@@ -7226,6 +7231,7 @@
2689007713353E1A00698AC0 /* CFCData.cpp in 
Sources */,
2689007813353E1A00698AC0 /* CFCMutableArray.cpp 
in Sources */,
9418EBCD1AA910910058B02E /* VectorType.cpp in 
Sources */,
+   4C4EB7811E6A4DCC002035C0 /* 
DumpDataExtractor.

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Jim Ingham via lldb-commits
Might also be useful to have a list of "files only compiled on platform X" 
somewhere.  Then in this sort of case, you could compile, then scrutinize 
carefully all the files in the "not my platform list."

Jim



> On Mar 3, 2017, at 4:51 PM, Jim Ingham via lldb-commits 
>  wrote:
> 
> Yeah, you could have grepped (is that how you spell that?) for "#include 
> "lldb/Core/DataExtractor.h" then looked at any Dump method in the files that 
> turned up.  That would have reduced the noise.
> 
> Ah, staircase wit...
> 
> Jim
> 
>> On Mar 3, 2017, at 4:46 PM, Zachary Turner  wrote:
>> 
>> I usually do this, like when I'm changing #includes I do grep / replace.  In 
>> this case it was a little tricky because a name liked Dump is so common that 
>> if my code doesn't compile it, I might not catch it.  (Granted, I should 
>> have caught DumpHexBytes, not sure how I missed that one).
>> 
>> On Fri, Mar 3, 2017 at 4:45 PM Jim Ingham  wrote:
>> I'll get this working, but in the future when you are making changes of this 
>> sort please chase down all the instances of functions you are changing, even 
>> in files you aren't building locally. There might be a use that your 
>> conversion doesn't handle, and you don't want to find that out after you've 
>> gone a ways down a particular path.
>> 
>> Jim
>> 
>> 
>>> On Mar 3, 2017, at 4:34 PM, Zachary Turner  wrote:
>>> 
>>> Is that still failing?  Extractor.dump(...) should be replaced by 
>>> DumpDataExtractor(Extractor, ...) and then everything will work
>>> 
>>> On Fri, Mar 3, 2017 at 4:29 PM Tim Hammerquist  
>>> wrote:
>>> Hi Zachary!
>>> 
>>> Thank you for your prompt attention!
>>> 
>>> I notice you added DumpHexBytes() back, but Dump() is still missing. Was 
>>> Dump() slated for a later patch?
>>> 
>>> -Tim
>>> 
 On 3 Mar 2017, at 15:48, Zachary Turner  wrote:
 
 Yea, it was a static method of DataExtractor before.  I noticed the same 
 thing when i saw it wasn't using any methods of DataExtractor.  Oops!  
 Anyway since this is no less weird than before I'll leave it this way for 
 now until we figure out something better.
 
 On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
 Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.  
 That's a little weird because it doesn't actually take a DataExtractor, 
 but...
 
 Jim
 
> On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits 
>  wrote:
> 
> I can fix that, I didn't see it in my tests because it doesn't compile 
> that file on Windows.  I'll get a fix in shortly.
> 
> On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist  
> wrote:
> Sure, Zachary. I try to step in when I can.
> 
> Now that you mention it, your r296910 (DumpDataExtractor) patch is 
> breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the 
> removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with 
> the Apple LLDB team on how they want to follow up on that, but they might 
> want to reach out to you about it.
> 
> -Tim
> 
>> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
>> 
>> Thanks Tim!
>> 
>> I have a few more file moves coming up as well, sorry for the trouble!
>> 
>> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits 
>>  wrote:
>> Author: penryu
>> Date: Fri Mar  3 17:17:29 2017
>> New Revision: 296925
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
>> Log:
>> Fix Darwin failures introduced in r296909
>> 
>> Modified:
>>lldb/trunk/lldb.xcodeproj/project.pbxproj
>> 
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
>> @@ -2052,7 +2052,7 @@
>>26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; 
>> sourceTree = ""; };
>>26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; 
>> sourceTree = ""; };
>>26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = 
>> ""; };
>> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
>> PBXFileReference; fileE

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Jim Ingham via lldb-commits
Yeah, you could have grepped (is that how you spell that?) for "#include 
"lldb/Core/DataExtractor.h" then looked at any Dump method in the files that 
turned up.  That would have reduced the noise.

Ah, staircase wit...

Jim

> On Mar 3, 2017, at 4:46 PM, Zachary Turner  wrote:
> 
> I usually do this, like when I'm changing #includes I do grep / replace.  In 
> this case it was a little tricky because a name liked Dump is so common that 
> if my code doesn't compile it, I might not catch it.  (Granted, I should have 
> caught DumpHexBytes, not sure how I missed that one).
> 
> On Fri, Mar 3, 2017 at 4:45 PM Jim Ingham  wrote:
> I'll get this working, but in the future when you are making changes of this 
> sort please chase down all the instances of functions you are changing, even 
> in files you aren't building locally. There might be a use that your 
> conversion doesn't handle, and you don't want to find that out after you've 
> gone a ways down a particular path.
> 
> Jim
> 
> 
> > On Mar 3, 2017, at 4:34 PM, Zachary Turner  wrote:
> >
> > Is that still failing?  Extractor.dump(...) should be replaced by 
> > DumpDataExtractor(Extractor, ...) and then everything will work
> >
> > On Fri, Mar 3, 2017 at 4:29 PM Tim Hammerquist  
> > wrote:
> > Hi Zachary!
> >
> > Thank you for your prompt attention!
> >
> > I notice you added DumpHexBytes() back, but Dump() is still missing. Was 
> > Dump() slated for a later patch?
> >
> > -Tim
> >
> >> On 3 Mar 2017, at 15:48, Zachary Turner  wrote:
> >>
> >> Yea, it was a static method of DataExtractor before.  I noticed the same 
> >> thing when i saw it wasn't using any methods of DataExtractor.  Oops!  
> >> Anyway since this is no less weird than before I'll leave it this way for 
> >> now until we figure out something better.
> >>
> >> On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
> >> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.  
> >> That's a little weird because it doesn't actually take a DataExtractor, 
> >> but...
> >>
> >> Jim
> >>
> >> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits 
> >> >  wrote:
> >> >
> >> > I can fix that, I didn't see it in my tests because it doesn't compile 
> >> > that file on Windows.  I'll get a fix in shortly.
> >> >
> >> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist  
> >> > wrote:
> >> > Sure, Zachary. I try to step in when I can.
> >> >
> >> > Now that you mention it, your r296910 (DumpDataExtractor) patch is 
> >> > breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the 
> >> > removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with 
> >> > the Apple LLDB team on how they want to follow up on that, but they 
> >> > might want to reach out to you about it.
> >> >
> >> > -Tim
> >> >
> >> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
> >> >>
> >> >> Thanks Tim!
> >> >>
> >> >> I have a few more file moves coming up as well, sorry for the trouble!
> >> >>
> >> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits 
> >> >>  wrote:
> >> >> Author: penryu
> >> >> Date: Fri Mar  3 17:17:29 2017
> >> >> New Revision: 296925
> >> >>
> >> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> >> >> Log:
> >> >> Fix Darwin failures introduced in r296909
> >> >>
> >> >> Modified:
> >> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> >>
> >> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> >> URL: 
> >> >> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
> >> >> ==
> >> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> >> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> >> >> @@ -2052,7 +2052,7 @@
> >> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
> >> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> >> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; 
> >> >> sourceTree = ""; };
> >> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa 
> >> >> = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
> >> >> sourcecode.c.h; name = IOStreamMacros.h; path = 
> >> >> include/lldb/Core/IOStreamMacros.h; sourceTree = ""; };
> >> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
> >> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> >> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = 
> >> >> ""; };
> >> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
> >> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> >> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> >> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
> >> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> 

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Zachary Turner via lldb-commits
I usually do this, like when I'm changing #includes I do grep / replace.
In this case it was a little tricky because a name liked Dump is so common
that if my code doesn't compile it, I might not catch it.  (Granted, I
should have caught DumpHexBytes, not sure how I missed that one).

On Fri, Mar 3, 2017 at 4:45 PM Jim Ingham  wrote:

> I'll get this working, but in the future when you are making changes of
> this sort please chase down all the instances of functions you are
> changing, even in files you aren't building locally. There might be a use
> that your conversion doesn't handle, and you don't want to find that out
> after you've gone a ways down a particular path.
>
> Jim
>
>
> > On Mar 3, 2017, at 4:34 PM, Zachary Turner  wrote:
> >
> > Is that still failing?  Extractor.dump(...) should be replaced by
> DumpDataExtractor(Extractor, ...) and then everything will work
> >
> > On Fri, Mar 3, 2017 at 4:29 PM Tim Hammerquist 
> wrote:
> > Hi Zachary!
> >
> > Thank you for your prompt attention!
> >
> > I notice you added DumpHexBytes() back, but Dump() is still missing. Was
> Dump() slated for a later patch?
> >
> > -Tim
> >
> >> On 3 Mar 2017, at 15:48, Zachary Turner  wrote:
> >>
> >> Yea, it was a static method of DataExtractor before.  I noticed the
> same thing when i saw it wasn't using any methods of DataExtractor.  Oops!
> Anyway since this is no less weird than before I'll leave it this way for
> now until we figure out something better.
> >>
> >> On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
> >> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.
> That's a little weird because it doesn't actually take a DataExtractor,
> but...
> >>
> >> Jim
> >>
> >> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >> >
> >> > I can fix that, I didn't see it in my tests because it doesn't
> compile that file on Windows.  I'll get a fix in shortly.
> >> >
> >> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist <
> thammerqu...@apple.com> wrote:
> >> > Sure, Zachary. I try to step in when I can.
> >> >
> >> > Now that you mention it, your r296910 (DumpDataExtractor) patch is
> breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the
> removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with the
> Apple LLDB team on how they want to follow up on that, but they might want
> to reach out to you about it.
> >> >
> >> > -Tim
> >> >
> >> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
> >> >>
> >> >> Thanks Tim!
> >> >>
> >> >> I have a few more file moves coming up as well, sorry for the
> trouble!
> >> >>
> >> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >> >> Author: penryu
> >> >> Date: Fri Mar  3 17:17:29 2017
> >> >> New Revision: 296925
> >> >>
> >> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> >> >> Log:
> >> >> Fix Darwin failures introduced in r296909
> >> >>
> >> >> Modified:
> >> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> >>
> >> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> >> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
> >> >>
> ==
> >> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> >> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29
> 2017
> >> >> @@ -2052,7 +2052,7 @@
> >> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa
> = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree
> = ""; };
> >> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ =
> {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType =
> sourcecode.c.h; name = IOStreamMacros.h; path =
> include/lldb/Core/IOStreamMacros.h; sourceTree = ""; };
> >> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree =
> ""; };
> >> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> >> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> >> >> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree =
> ""; };
> >> >> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa =
> PBXFileReference

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Jim Ingham via lldb-commits
I'll get this working, but in the future when you are making changes of this 
sort please chase down all the instances of functions you are changing, even in 
files you aren't building locally. There might be a use that your conversion 
doesn't handle, and you don't want to find that out after you've gone a ways 
down a particular path.

Jim


> On Mar 3, 2017, at 4:34 PM, Zachary Turner  wrote:
> 
> Is that still failing?  Extractor.dump(...) should be replaced by 
> DumpDataExtractor(Extractor, ...) and then everything will work
> 
> On Fri, Mar 3, 2017 at 4:29 PM Tim Hammerquist  wrote:
> Hi Zachary!
> 
> Thank you for your prompt attention!
> 
> I notice you added DumpHexBytes() back, but Dump() is still missing. Was 
> Dump() slated for a later patch?
> 
> -Tim
> 
>> On 3 Mar 2017, at 15:48, Zachary Turner  wrote:
>> 
>> Yea, it was a static method of DataExtractor before.  I noticed the same 
>> thing when i saw it wasn't using any methods of DataExtractor.  Oops!  
>> Anyway since this is no less weird than before I'll leave it this way for 
>> now until we figure out something better.
>> 
>> On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
>> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.  That's 
>> a little weird because it doesn't actually take a DataExtractor, but...
>> 
>> Jim
>> 
>> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits 
>> >  wrote:
>> >
>> > I can fix that, I didn't see it in my tests because it doesn't compile 
>> > that file on Windows.  I'll get a fix in shortly.
>> >
>> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist  
>> > wrote:
>> > Sure, Zachary. I try to step in when I can.
>> >
>> > Now that you mention it, your r296910 (DumpDataExtractor) patch is 
>> > breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the 
>> > removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with the 
>> > Apple LLDB team on how they want to follow up on that, but they might want 
>> > to reach out to you about it.
>> >
>> > -Tim
>> >
>> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
>> >>
>> >> Thanks Tim!
>> >>
>> >> I have a few more file moves coming up as well, sorry for the trouble!
>> >>
>> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits 
>> >>  wrote:
>> >> Author: penryu
>> >> Date: Fri Mar  3 17:17:29 2017
>> >> New Revision: 296925
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
>> >> Log:
>> >> Fix Darwin failures introduced in r296909
>> >>
>> >> Modified:
>> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> >>
>> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> >> URL: 
>> >> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
>> >> ==
>> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
>> >> @@ -2052,7 +2052,7 @@
>> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; 
>> >> sourceTree = ""; };
>> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; 
>> >> sourceTree = ""; };
>> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = 
>> >> ""; };
>> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
>> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; 
>> >> };
>> >> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = 
>> >> ""; };
>> >> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = 
>> >> ""; };
>> >> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = 
>> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
>> >> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree 
>> >> = ""; };
>> >> @@ -2139,7 +2139,7 @

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Zachary Turner via lldb-commits
Is that still failing?  Extractor.dump(...) should be replaced by
DumpDataExtractor(Extractor, ...) and then everything will work

On Fri, Mar 3, 2017 at 4:29 PM Tim Hammerquist 
wrote:

> Hi Zachary!
>
> Thank you for your prompt attention!
>
> I notice you added DumpHexBytes() back, but Dump() is still missing. Was
> Dump() slated for a later patch?
>
> -Tim
>
> On 3 Mar 2017, at 15:48, Zachary Turner  wrote:
>
> Yea, it was a static method of DataExtractor before.  I noticed the same
> thing when i saw it wasn't using any methods of DataExtractor.  Oops!
> Anyway since this is no less weird than before I'll leave it this way for
> now until we figure out something better.
>
> On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
>
> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.
> That's a little weird because it doesn't actually take a DataExtractor,
> but...
>
> Jim
>
> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > I can fix that, I didn't see it in my tests because it doesn't compile
> that file on Windows.  I'll get a fix in shortly.
> >
> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist 
> wrote:
> > Sure, Zachary. I try to step in when I can.
> >
> > Now that you mention it, your r296910 (DumpDataExtractor) patch is
> breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the
> removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with the
> Apple LLDB team on how they want to follow up on that, but they might want
> to reach out to you about it.
> >
> > -Tim
> >
> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
> >>
> >> Thanks Tim!
> >>
> >> I have a few more file moves coming up as well, sorry for the trouble!
> >>
> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >> Author: penryu
> >> Date: Fri Mar  3 17:17:29 2017
> >> New Revision: 296925
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> >> Log:
> >> Fix Darwin failures introduced in r296909
> >>
> >> Modified:
> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
> >>
> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
> >>
> ==
> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> >> @@ -2052,7 +2052,7 @@
> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree
> = ""; };
> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa
> = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h;
> sourceTree = ""; };
> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree =
> ""; };
> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> >> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree =
> ""; };
> >> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "";
> };
> >> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree =
> ""; };
> >> @@ -2139,7 +2139,7 @@
> >> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
> >> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa
> = PBXFileReference; fileEncoding = 4; lastKnownFileType =
> sourcecode.cpp.cpp; name = FileSpecList.cpp; path =
> source/Core/FileSpecList.cpp; sourceTree = ""; };
> >> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa =
> PBXFileReference; fileEncoding =

[Lldb-commits] [lldb] r296930 - Fix DataExtractor failures.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 17:52:09 2017
New Revision: 296930

URL: http://llvm.org/viewvc/llvm-project?rev=296930&view=rev
Log:
Fix DataExtractor failures.

Some code that doesn't get compiled on Windows had some references
that needed updating, and I missed those.

Modified:
lldb/trunk/include/lldb/Core/DumpDataExtractor.h
lldb/trunk/source/Core/DumpDataExtractor.cpp
lldb/trunk/source/Expression/Materializer.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp

Modified: lldb/trunk/include/lldb/Core/DumpDataExtractor.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/DumpDataExtractor.h?rev=296930&r1=296929&r2=296930&view=diff
==
--- lldb/trunk/include/lldb/Core/DumpDataExtractor.h (original)
+++ lldb/trunk/include/lldb/Core/DumpDataExtractor.h Fri Mar  3 17:52:09 2017
@@ -83,6 +83,9 @@ DumpDataExtractor(const DataExtractor &D
   size_t item_count, size_t num_per_line, uint64_t base_addr,
   uint32_t item_bit_size, uint32_t item_bit_offset,
   ExecutionContextScope *exe_scope = nullptr);
+
+void DumpHexBytes(Stream *s, const void *src, size_t src_len,
+  uint32_t bytes_per_line, lldb::addr_t base_addr);
 }
 
 #endif

Modified: lldb/trunk/source/Core/DumpDataExtractor.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DumpDataExtractor.cpp?rev=296930&r1=296929&r2=296930&view=diff
==
--- lldb/trunk/source/Core/DumpDataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DumpDataExtractor.cpp Fri Mar  3 17:52:09 2017
@@ -786,3 +786,17 @@ lldb::offset_t lldb_private::DumpDataExt
   }
   return offset; // Return the offset at which we ended up
 }
+
+void lldb_private::DumpHexBytes(Stream *s, const void *src, size_t src_len,
+uint32_t bytes_per_line,
+lldb::addr_t base_addr) {
+  DataExtractor data(src, src_len, lldb::eByteOrderLittle, 4);
+  DumpDataExtractor(data, s,
+0,  // Offset into "src"
+lldb::eFormatBytes, // Dump as hex bytes
+1,  // Size of each item is 1 for single bytes
+src_len,// Number of bytes
+bytes_per_line, // Num bytes per line
+base_addr,  // Base address
+0, 0);  // Bitfield info
+}

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=296930&r1=296929&r2=296930&view=diff
==
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Fri Mar  3 17:52:09 2017
@@ -30,19 +30,6 @@
 
 using namespace lldb_private;
 
-static void DumpHexBytes(Stream *s, const void *src, size_t src_len,
- uint32_t bytes_per_line, lldb::addr_t base_addr) {
-  DataExtractor data(src, src_len, lldb::eByteOrderLittle, 4);
-  DumpDataExtractor(data, s,
-0,  // Offset into "src"
-lldb::eFormatBytes, // Dump as hex bytes
-1,  // Size of each item is 1 for single bytes
-src_len,// Number of bytes
-bytes_per_line, // Num bytes per line
-base_addr,  // Base address
-0, 0);  // Bitfield info
-}
-
 uint32_t Materializer::AddStructMember(Entity &entity) {
   uint32_t size = entity.GetSize();
   uint32_t alignment = entity.GetAlignment();

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp?rev=296930&r1=296929&r2=296930&view=diff
==
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp 
(original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Fri 
Mar  3 17:52:09 2017
@@ -19,6 +19,7 @@
 // Other libraries and framework includes
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/DataExtractor.h"
+#include "lldb/Core/DumpDataExtractor.h"
 #include "lldb/Core/State.h"
 #include "lldb/Core/UUID.h"
 #include "lldb/Host/FileSpec.h"
@@ -259,8 +260,7 @@ bool CommunicationKDP::CheckForPacket(co
   if (src && src_len > 0) {
 if (log && log->GetVerbose()) {
   PacketStreamType log_strm;
-  DataExtractor::DumpHexBytes(&log_strm, src, src_len, UINT32_MAX,
-  LLDB_INVALID_ADDRESS);
+  DumpHexBytes(&log_strm, src, src_len, UINT32_MAX, LLDB_INVALID_ADDRESS);
  

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Jim Ingham via lldb-commits
I guess you could fudge by changing DumpDataExtractor.h to DataDumper.h to 
indicate that it is more general than just data extractors.

Jim

> On Mar 3, 2017, at 3:48 PM, Zachary Turner  wrote:
> 
> Yea, it was a static method of DataExtractor before.  I noticed the same 
> thing when i saw it wasn't using any methods of DataExtractor.  Oops!  Anyway 
> since this is no less weird than before I'll leave it this way for now until 
> we figure out something better.
> 
> On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:
> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.  That's 
> a little weird because it doesn't actually take a DataExtractor, but...
> 
> Jim
> 
> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits 
> >  wrote:
> >
> > I can fix that, I didn't see it in my tests because it doesn't compile that 
> > file on Windows.  I'll get a fix in shortly.
> >
> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist  
> > wrote:
> > Sure, Zachary. I try to step in when I can.
> >
> > Now that you mention it, your r296910 (DumpDataExtractor) patch is breaking 
> > building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the removal of 
> > Dump/DumpHexBytes from DataExtractor. I've coordinated with the Apple LLDB 
> > team on how they want to follow up on that, but they might want to reach 
> > out to you about it.
> >
> > -Tim
> >
> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
> >>
> >> Thanks Tim!
> >>
> >> I have a few more file moves coming up as well, sorry for the trouble!
> >>
> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits 
> >>  wrote:
> >> Author: penryu
> >> Date: Fri Mar  3 17:17:29 2017
> >> New Revision: 296925
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> >> Log:
> >> Fix Darwin failures introduced in r296909
> >>
> >> Modified:
> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
> >>
> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> URL: 
> >> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
> >> ==
> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> >> @@ -2052,7 +2052,7 @@
> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree 
> >> = ""; };
> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; 
> >> sourceTree = ""; };
> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = 
> >> ""; };
> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> >> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = 
> >> ""; };
> >> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = 
> >> ""; };
> >> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
> >> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = 
> >> ""; };
> >> @@ -2139,7 +2139,7 @@
> >> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = 
> >> sourcecode.cpp.cpp; name = Event.cpp; path = source/Core/Event.cpp; 
> >> sourceTree = ""; };
> >> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = 
> >> sourcecode.cpp.cpp; name = FileSpecList.cpp; path = 
> >> source/Core/FileSpecList.cpp; sourceTree = ""; };
> >> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa = 
> >> PBXFileReference; fileEncoding = 4; lastKnownFileType = 
> >> sourcecode.cpp.cpp; name = Listener.cpp; path = source/Core/Listener.cpp; 
> >> sourceTree = ""; };

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Zachary Turner via lldb-commits
Yea, it was a static method of DataExtractor before.  I noticed the same
thing when i saw it wasn't using any methods of DataExtractor.  Oops!
Anyway since this is no less weird than before I'll leave it this way for
now until we figure out something better.

On Fri, Mar 3, 2017 at 3:46 PM Jim Ingham  wrote:

> Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.
> That's a little weird because it doesn't actually take a DataExtractor,
> but...
>
> Jim
>
> > On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >
> > I can fix that, I didn't see it in my tests because it doesn't compile
> that file on Windows.  I'll get a fix in shortly.
> >
> > On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist 
> wrote:
> > Sure, Zachary. I try to step in when I can.
> >
> > Now that you mention it, your r296910 (DumpDataExtractor) patch is
> breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the
> removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with the
> Apple LLDB team on how they want to follow up on that, but they might want
> to reach out to you about it.
> >
> > -Tim
> >
> >> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
> >>
> >> Thanks Tim!
> >>
> >> I have a few more file moves coming up as well, sorry for the trouble!
> >>
> >> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
> >> Author: penryu
> >> Date: Fri Mar  3 17:17:29 2017
> >> New Revision: 296925
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> >> Log:
> >> Fix Darwin failures introduced in r296909
> >>
> >> Modified:
> >> lldb/trunk/lldb.xcodeproj/project.pbxproj
> >>
> >> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> >> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
> >>
> ==
> >> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> >> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> >> @@ -2052,7 +2052,7 @@
> >> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree
> = ""; };
> >> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa
> = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h;
> sourceTree = ""; };
> >> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree =
> ""; };
> >> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> >> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> >> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree =
> ""; };
> >> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "";
> };
> >> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree =
> ""; };
> >> @@ -2139,7 +2139,7 @@
> >> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
> >> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa
> = PBXFileReference; fileEncoding = 4; lastKnownFileType =
> sourcecode.cpp.cpp; name = FileSpecList.cpp; path =
> source/Core/FileSpecList.cpp; sourceTree = ""; };
> >> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree =
> ""; };
> >> -   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Log.cpp; path = source/Core/Log.cpp; sourceTree = ""; };
> >> +   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileE

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Jim Ingham via lldb-commits
Yeah, looks like you need to keep DumpHexBytes in DumpDataExtractor.  That's a 
little weird because it doesn't actually take a DataExtractor, but...

Jim

> On Mar 3, 2017, at 3:45 PM, Zachary Turner via lldb-commits 
>  wrote:
> 
> I can fix that, I didn't see it in my tests because it doesn't compile that 
> file on Windows.  I'll get a fix in shortly.
> 
> On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist  wrote:
> Sure, Zachary. I try to step in when I can.
> 
> Now that you mention it, your r296910 (DumpDataExtractor) patch is breaking 
> building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the removal of 
> Dump/DumpHexBytes from DataExtractor. I've coordinated with the Apple LLDB 
> team on how they want to follow up on that, but they might want to reach out 
> to you about it.
> 
> -Tim
> 
>> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
>> 
>> Thanks Tim!
>> 
>> I have a few more file moves coming up as well, sorry for the trouble!
>> 
>> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits 
>>  wrote:
>> Author: penryu
>> Date: Fri Mar  3 17:17:29 2017
>> New Revision: 296925
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
>> Log:
>> Fix Darwin failures introduced in r296909
>> 
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> 
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
>> @@ -2052,7 +2052,7 @@
>> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree = 
>> ""; };
>> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; sourceTree = 
>> ""; };
>> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = Listener.h; path = include/lldb/Core/Listener.h; sourceTree = ""; };
>> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
>> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
>> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = ""; };
>> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = Module.h; path = include/lldb/Core/Module.h; sourceTree = ""; };
>> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name 
>> = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = 
>> ""; };
>> @@ -2139,7 +2139,7 @@
>> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
>> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree = 
>> ""; };
>> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree = 
>> ""; };
>> -   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = Log.cpp; path = source/Core/Log.cpp; sourceTree = ""; };
>> +   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = ""; };
>> 26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa = 
>> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
>> name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = ""; 
>> };
>> 26BC7E8110F1B85900F91463 /* Modu

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Zachary Turner via lldb-commits
I can fix that, I didn't see it in my tests because it doesn't compile that
file on Windows.  I'll get a fix in shortly.

On Fri, Mar 3, 2017 at 3:38 PM Tim Hammerquist 
wrote:

> Sure, Zachary. I try to step in when I can.
>
> Now that you mention it, your r296910 (DumpDataExtractor) patch is
> breaking building CommunicationKDP.cpp in MacOSX-Kernel. Namely, the
> removal of Dump/DumpHexBytes from DataExtractor. I've coordinated with the
> Apple LLDB team on how they want to follow up on that, but they might want
> to reach out to you about it.
>
> -Tim
>
> On 3 Mar 2017, at 15:33, Zachary Turner  wrote:
>
> Thanks Tim!
>
> I have a few more file moves coming up as well, sorry for the trouble!
>
> On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
> Author: penryu
> Date: Fri Mar  3 17:17:29 2017
> New Revision: 296925
>
> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> Log:
> Fix Darwin failures introduced in r296909
>
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
>
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
>
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> @@ -2052,7 +2052,7 @@
> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree
> = ""; };
> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h;
> sourceTree = ""; };
> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree =
> ""; };
> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree =
> ""; };
> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "";
> };
> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree =
> ""; };
> @@ -2139,7 +2139,7 @@
> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree =
> ""; };
> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree =
> ""; };
> -   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Log.cpp; path = source/Core/Log.cpp; sourceTree = ""; };
> +   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = ""; };
> 26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = "";
> };
> 26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Module.cpp; path = source/Core/Module.cpp; sourceTree = ""; };
> 26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> na

Re: [Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Zachary Turner via lldb-commits
Thanks Tim!

I have a few more file moves coming up as well, sorry for the trouble!

On Fri, Mar 3, 2017 at 3:29 PM Tim Hammerquist via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: penryu
> Date: Fri Mar  3 17:17:29 2017
> New Revision: 296925
>
> URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
> Log:
> Fix Darwin failures introduced in r296909
>
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
>
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
>
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
> @@ -2052,7 +2052,7 @@
> 26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree
> = ""; };
> 26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h;
> sourceTree = ""; };
> 26BC7D6710F1B77400F91463 /* Listener.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Listener.h; path = include/lldb/Core/Listener.h; sourceTree =
> ""; };
> -   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Core/Log.h; sourceTree = ""; };
> +   26BC7D6810F1B77400F91463 /* Log.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = ""; };
> 26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree =
> ""; };
> 26BC7D6A10F1B77400F91463 /* Module.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "";
> };
> 26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree =
> ""; };
> @@ -2139,7 +2139,7 @@
> 26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
> 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree =
> ""; };
> 26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree =
> ""; };
> -   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Log.cpp; path = source/Core/Log.cpp; sourceTree = ""; };
> +   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = ""; };
> 26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = "";
> };
> 26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = Module.cpp; path = source/Core/Module.cpp; sourceTree = ""; };
> 26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> name = ModuleChild.cpp; path = source/Core/ModuleChild.cpp; sourceTree =
> ""; };
> @@ -2335,8 +2335,8 @@
> 33E5E8411A672A240024ED68 /* StringConvert.cpp */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
> path = StringConvert.cpp; sourceTree = ""; };
> 33E5E8451A6736D30024ED68 /* StringConvert.h */ = {isa =
> PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
> name = StringConvert.h; path = include/lldb/Host/StringConvert.h;
> sourceTree = SOURCE_ROOT; };
> 3F5E8AF31A40D4A500A73232 /* PipeBase.h */ = {isa =
> PB

[Lldb-commits] [lldb] r296925 - Fix Darwin failures introduced in r296909

2017-03-03 Thread Tim Hammerquist via lldb-commits
Author: penryu
Date: Fri Mar  3 17:17:29 2017
New Revision: 296925

URL: http://llvm.org/viewvc/llvm-project?rev=296925&view=rev
Log:
Fix Darwin failures introduced in r296909

Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=296925&r1=296924&r2=296925&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Mar  3 17:17:29 2017
@@ -2052,7 +2052,7 @@
26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree = 
""; };
26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; sourceTree = 
""; };
26BC7D6710F1B77400F91463 /* Listener.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
Listener.h; path = include/lldb/Core/Listener.h; sourceTree = ""; };
-   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Log.h; path = 
include/lldb/Core/Log.h; sourceTree = ""; };
+   26BC7D6810F1B77400F91463 /* Log.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Log.h; path = 
include/lldb/Utility/Log.h; sourceTree = ""; };
26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = ""; };
26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
Module.h; path = include/lldb/Core/Module.h; sourceTree = ""; };
26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = ""; 
};
@@ -2139,7 +2139,7 @@
26BC7E7910F1B85900F91463 /* Event.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Event.cpp; path = source/Core/Event.cpp; sourceTree = ""; };
26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree = 
""; };
26BC7E7E10F1B85900F91463 /* Listener.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Listener.cpp; path = source/Core/Listener.cpp; sourceTree = ""; };
-   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Log.cpp; path = source/Core/Log.cpp; sourceTree = ""; };
+   26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = ""; };
26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = ""; };
26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Module.cpp; path = source/Core/Module.cpp; sourceTree = ""; };
26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = ModuleChild.cpp; path = source/Core/ModuleChild.cpp; sourceTree = 
""; };
@@ -2335,8 +2335,8 @@
33E5E8411A672A240024ED68 /* StringConvert.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = StringConvert.cpp; sourceTree = ""; };
33E5E8451A6736D30024ED68 /* StringConvert.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
StringConvert.h; path = include/lldb/Host/StringConvert.h; sourceTree = 
SOURCE_ROOT; };
3F5E8AF31A40D4A500A73232 /* PipeBase.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PipeBase.h; path = 
include/lldb/Host/PipeBase.h; sourceTree = ""; };
-   3F8160A51AB9F7DD001DA9DF /* Logging.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = Logging.cpp; path = source/Core/Log

[Lldb-commits] [lldb] r296924 - Fixed repo.py to not send git errors to stderr.

2017-03-03 Thread Sean Callanan via lldb-commits
Author: spyffe
Date: Fri Mar  3 17:13:30 2017
New Revision: 296924

URL: http://llvm.org/viewvc/llvm-project?rev=296924&view=rev
Log:
Fixed repo.py to not send git errors to stderr.

Some repos are not git repos, so git is expected 
to fail.  These errors should not go to stderr,
because Xcode interprets them as failures.

Modified:
lldb/trunk/scripts/Xcode/repo.py

Modified: lldb/trunk/scripts/Xcode/repo.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/repo.py?rev=296924&r1=296923&r2=296924&view=diff
==
--- lldb/trunk/scripts/Xcode/repo.py (original)
+++ lldb/trunk/scripts/Xcode/repo.py Fri Mar  3 17:13:30 2017
@@ -11,7 +11,7 @@ def identifier():
except:
pass
try:
-   git_remote_and_branch = subprocess.check_output(["git", 
"rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"]).rstrip()
+   git_remote_and_branch = subprocess.check_output(["git", 
"rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"], 
stderr=subprocess.STDOUT).rstrip()
git_remote = git_remote_and_branch.split("/")[0]
git_branch = "/".join(git_remote_and_branch.split("/")[1:])
git_url = subprocess.check_output(["git", "remote", "get-url", 
git_remote]).rstrip()


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


[Lldb-commits] [lldb] r296920 - Add a script to dump out all project inter-dependencies.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 16:40:46 2017
New Revision: 296920

URL: http://llvm.org/viewvc/llvm-project?rev=296920&view=rev
Log:
Add a script to dump out all project inter-dependencies.

Added:
lldb/trunk/scripts/analyze-project-deps.py

Added: lldb/trunk/scripts/analyze-project-deps.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/analyze-project-deps.py?rev=296920&view=auto
==
--- lldb/trunk/scripts/analyze-project-deps.py (added)
+++ lldb/trunk/scripts/analyze-project-deps.py Fri Mar  3 16:40:46 2017
@@ -0,0 +1,65 @@
+import os
+import re
+
+from use_lldb_suite import lldb_root
+
+src_dir = os.path.join(lldb_root, "source")
+inc_dir = os.path.join(lldb_root, "include")
+
+src_map = {}
+
+include_regex = re.compile('#include \"(lldb(.*/)+).*\"')
+
+def scan_deps(this_dir, file):
+includes = set()
+with open(file) as f:
+for line in list(f):
+m = include_regex.match(line)
+if m is not None:
+relative = m.groups()[0].rstrip("/")
+if relative != this_dir:
+includes.add(relative)
+return includes
+
+def insert_or_add_mapping(base, deps):
+global src_map
+if len(deps) > 0:
+if base in src_map:
+existing_deps = src_map[base]
+existing_deps.update(deps)
+else:
+src_map[base] = deps
+
+for (base, dirs, files) in os.walk(inc_dir):
+dir = os.path.basename(base)
+relative = os.path.relpath(base, inc_dir)
+inc_files = filter(lambda x : os.path.splitext(x)[1] in [".h"], files)
+deps = set()
+for inc in inc_files:
+inc_path = os.path.join(base, inc)
+deps.update(scan_deps(relative, inc_path))
+insert_or_add_mapping(relative, deps)
+
+for (base, dirs, files) in os.walk(src_dir):
+dir = os.path.basename(base)
+relative = os.path.relpath(base, src_dir)
+src_files = filter(lambda x : os.path.splitext(x)[1] in [".cpp", ".h", 
".mm"], files)
+deps = set()
+norm_base_path = os.path.normpath(os.path.join("lldb", relative))
+norm_base_path = norm_base_path.replace("\\", "/")
+for src in src_files:
+src_path = os.path.join(base, src)
+deps.update(scan_deps(norm_base_path, src_path))
+insert_or_add_mapping(norm_base_path, deps)
+pass
+
+items = list(src_map.iteritems())
+items.sort(lambda A, B : cmp(A[0], B[0]))
+
+for (path, deps) in items:
+print path + ":"
+sorted_deps = list(deps)
+sorted_deps.sort()
+for dep in sorted_deps:
+print "\t" + dep
+pass
\ No newline at end of file


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


[Lldb-commits] [PATCH] D30560: Split DataExtractor into two classes.

2017-03-03 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL296910: Isolate Target-specific functionality of 
DataExtractor. (authored by zturner).

Changed prior to commit:
  https://reviews.llvm.org/D30560?vs=90432&id=90526#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30560

Files:
  lldb/trunk/include/lldb/Core/DataExtractor.h
  lldb/trunk/include/lldb/Core/DumpDataExtractor.h
  lldb/trunk/include/lldb/Symbol/CompilerType.h
  lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
  lldb/trunk/include/lldb/Symbol/Type.h
  lldb/trunk/source/API/SBData.cpp
  lldb/trunk/source/Commands/CommandObjectMemory.cpp
  lldb/trunk/source/Core/Address.cpp
  lldb/trunk/source/Core/CMakeLists.txt
  lldb/trunk/source/Core/DataExtractor.cpp
  lldb/trunk/source/Core/DumpDataExtractor.cpp
  lldb/trunk/source/Core/Event.cpp
  lldb/trunk/source/Core/RegisterValue.cpp
  lldb/trunk/source/DataFormatters/TypeFormat.cpp
  lldb/trunk/source/Expression/Materializer.cpp
  
lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDataExtractor.h
  
lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
  lldb/trunk/source/Symbol/ClangASTContext.cpp
  lldb/trunk/source/Symbol/CompilerType.cpp
  lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
  lldb/trunk/source/Symbol/GoASTContext.cpp
  lldb/trunk/source/Symbol/JavaASTContext.cpp
  lldb/trunk/source/Symbol/OCamlASTContext.cpp

Index: lldb/trunk/include/lldb/Symbol/Type.h
===
--- lldb/trunk/include/lldb/Symbol/Type.h
+++ lldb/trunk/include/lldb/Symbol/Type.h
@@ -23,7 +23,6 @@
 #include 
 
 namespace lldb_private {
-
 //--
 // CompilerContext allows an array of these items to be passed to
 // perform detailed lookups in SymbolVendor and SymbolFile functions.
Index: lldb/trunk/include/lldb/Symbol/CompilerType.h
===
--- lldb/trunk/include/lldb/Symbol/CompilerType.h
+++ lldb/trunk/include/lldb/Symbol/CompilerType.h
@@ -23,6 +23,8 @@
 
 namespace lldb_private {
 
+class DataExtractor;
+
 //--
 // A class that can carry around a clang ASTContext and a opaque clang
 // QualType. A clang::QualType can be easily reconstructed from an
Index: lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
===
--- lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
+++ lldb/trunk/include/lldb/Symbol/DWARFCallFrameInfo.h
@@ -14,7 +14,6 @@
 #include 
 
 #include "lldb/Core/AddressRange.h"
-#include "lldb/Core/DataExtractor.h"
 #include "lldb/Utility/Flags.h"
 
 #include "lldb/Core/RangeMap.h"
Index: lldb/trunk/include/lldb/Core/DataExtractor.h
===
--- lldb/trunk/include/lldb/Core/DataExtractor.h
+++ lldb/trunk/include/lldb/Core/DataExtractor.h
@@ -43,8 +43,6 @@
   //--
   /// @typedef DataExtractor::Type
   /// @brief Type enumerations used in the dump routines.
-  /// @see DataExtractor::Dump()
-  /// @see DataExtractor::DumpRawHexBytes()
   //--
   typedef enum {
 TypeUInt8,   ///< Format output as unsigned 8 bit integers
@@ -57,12 +55,6 @@
 TypeSLEB128  ///< Format output as SLEB128 numbers
   } Type;
 
-  static void DumpHexBytes(Stream *s, const void *src, size_t src_len,
-   uint32_t bytes_per_line,
-   lldb::addr_t base_addr); // Pass LLDB_INVALID_ADDRESS
-// to not show address at
-// start of line
-
   //--
   /// Default constructor.
   ///
@@ -172,7 +164,9 @@
   /// reference count on the data will be decremented, and if zero,
   /// the data will be freed.
   //--
-  ~DataExtractor();
+  virtual ~DataExtractor();
+
+  uint32_t getTargetByteSize() const { return m_target_byte_size; }
 
   //--
   /// Clears the object state.
@@ -225,73 +219,6 @@
   const char *type_format = nullptr) const;
 
   //--
-  /// Dumps \a item_count objects into the stream \a s.
-  ///
-  /// Dumps \a item_count objects using \a item_format, each of which
-  /// are \a item_byte_size bytes long starting at offset \a offset
-  /// bytes into the contained da

[Lldb-commits] [lldb] r296906 - [Windows] Remove the #include hack.

2017-03-03 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Fri Mar  3 14:21:59 2017
New Revision: 296906

URL: http://llvm.org/viewvc/llvm-project?rev=296906&view=rev
Log:
[Windows] Remove the #include  hack.

Prior to MSVC 2015 we had to manually include this header any
time we were going to include  or  due to a
bug in MSVC's STL implementation.  This has been fixed in MSVC
for some time now, and we require VS 2015 minimum, so we can
remove this across all subprojects.

Modified:
lldb/trunk/include/lldb/Host/msvc/Config.h
lldb/trunk/include/lldb/Utility/TaskPool.h
lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h
lldb/trunk/tools/driver/Platform.h
lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h
lldb/trunk/tools/lldb-mi/Platform.h
lldb/trunk/unittests/Core/DataExtractorTest.cpp
lldb/trunk/unittests/Core/ScalarTest.cpp
lldb/trunk/unittests/Core/TimerTest.cpp
lldb/trunk/unittests/Expression/GoParserTest.cpp
lldb/trunk/unittests/Host/SocketTest.cpp
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
lldb/trunk/unittests/Process/gdb-remote/GDBRemoteTestUtils.cpp
lldb/trunk/unittests/gtest_common.h

Modified: lldb/trunk/include/lldb/Host/msvc/Config.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/msvc/Config.h?rev=296906&r1=296905&r2=296906&view=diff
==
--- lldb/trunk/include/lldb/Host/msvc/Config.h (original)
+++ lldb/trunk/include/lldb/Host/msvc/Config.h Fri Mar  3 14:21:59 2017
@@ -27,13 +27,4 @@
 
 //#define LLDB_CONFIG_FCNTL_GETPATH_SUPPORTED 1
 
-#if _HAS_EXCEPTIONS == 0
-// Due to a bug in , when _HAS_EXCEPTIONS == 0 the header will try to
-// call
-// uncaught_exception() without having a declaration for it.  The fix for this
-// is
-// to manually #include , which contains this declaration.
-#include 
-#endif
-
 #endif // #ifndef liblldb_Platform_Config_h_

Modified: lldb/trunk/include/lldb/Utility/TaskPool.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TaskPool.h?rev=296906&r1=296905&r2=296906&view=diff
==
--- lldb/trunk/include/lldb/Utility/TaskPool.h (original)
+++ lldb/trunk/include/lldb/Utility/TaskPool.h Fri Mar  3 14:21:59 2017
@@ -10,22 +10,6 @@
 #ifndef utility_TaskPool_h_
 #define utility_TaskPool_h_
 
-#if defined(__cplusplus) && defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0)
-// Compiling MSVC libraries with _HAS_EXCEPTIONS=0, eliminates most but not all
-// calls to __uncaught_exception.  Unfortunately, it does seem to eliminate
-// the delcaration of __uncaught_excpeiton.  Including  ensures that it 
is
-// declared.  This may not be necessary after MSVC 12.
-#include 
-#endif
-
-#if defined(_MSC_VER)
-// Due to another bug in MSVC 2013, including  will generate hundreds 
of
-// warnings in the Concurrency Runtime.  This can be removed when we switch to
-// MSVC 2015
-#pragma warning(push)
-#pragma warning(disable : 4062)
-#endif
-
 #include 
 #include 
 #include 
@@ -203,8 +187,4 @@ template  void TaskRunner
 ;
 }
 
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
-
 #endif // #ifndef utility_TaskPool_h_

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h?rev=296906&r1=296905&r2=296906&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/test_common.h Fri Mar  3 
14:21:59 2017
@@ -10,14 +10,6 @@
 #define LLDB_TEST_API
 #endif
 
-#if defined(__cplusplus) && defined(_MSC_VER) && (_HAS_EXCEPTIONS == 0)
-// Compiling MSVC libraries with _HAS_EXCEPTIONS=0, eliminates most but not all
-// calls to __uncaught_exception.  Unfortunately, it does seem to eliminate
-// the delcaration of __uncaught_excpeiton.  Including  ensures that it 
is
-// declared.  This may not be necessary after MSVC 12.
-#include 
-#endif
-
 #if defined(_WIN32)
 #define LLVM_PRETTY_FUNCTION __FUNCSIG__
 #else

Modified: lldb/trunk/tools/driver/Platform.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=296906&r1=296905&r2=296906&view=diff
==
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Fri Mar  3 14:21:59 2017
@@ -15,7 +15,6 @@
 #include "lldb/Host/HostGetOpt.h"
 #include 
 #if defined(_MSC_VER)
-#include 
 #include 
 #endif
 #include "lldb/Host/windows/windows.h"

Modified: lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilThreadBaseStd.h?rev=296906&r1=296905&r2=296906&view=diff
=

[Lldb-commits] [PATCH] D29581: Initial implementation of SB APIs for Tracing support.

2017-03-03 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

Greg is taking a couple of weeks off between jobs, so he may not get to this 
right away.  But it should wait on his approval since he had substantial 
comments.

I'm pretty sure Kate isn't doing any work on lldb these days, I wouldn't wait 
on her to review patches.


https://reviews.llvm.org/D29581



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


Re: [Lldb-commits] [PATCH] D30560: Split DataExtractor into two classes.

2017-03-03 Thread Jim Ingham via lldb-commits
That sounds right.  Please do fix the function names.  We can have another 
discussion about naming at some point, but we shouldn't do it piecemeal.

Jim

> On Mar 3, 2017, at 9:53 AM, Zachary Turner  wrote:
> 
> Yea, I can see splitting the target specific stuff into a separate "target 
> aware" dump function and having the base one not require the exeuction 
> context and go in Utility.  In the interest of not breaking anything it seems 
> reasonable to try to do that as a separate patch so we the functional and non 
> functional change portions can be separated from each other.
> 
> On Fri, Mar 3, 2017 at 9:51 AM Jim Ingham via Phabricator 
>  wrote:
> jingham added a comment.
> 
> Yes, that is a good solution.  It's still a little awkward that 
> DataExtractors live in Utility and their dumper lives in Core.  Especially as 
> almost all the functionality of the dumper could live in Utility.  If you 
> were serious about using Utility separate from Core you would want to put the 
> non-target parts of DumpDataExtractor into Core and assert if those are 
> passed the unsupported flavors, and then have DumpDataExtractorTarget, with 
> the instruction and fancy float bits.  But maybe that's work for another day.
> 
> We name functions starting with a Capitol first letter, so these should be 
> "Dump..." not "dump...".  But other than that, this seems good.
> 
> 
> https://reviews.llvm.org/D30560
> 
> 
> 

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


[Lldb-commits] [PATCH] D30520: Make LLDB skip server-client roundtrip for signals that don't require any actions

2017-03-03 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

That still seems wrong to me.  The UnixSignals class manages the data about 
signal state including how to respond to them, so it should be the class that 
comprehends that data.  The mental exercise of "if I had to do this in another 
place, would I have to duplicate an algorithm wholly specific to this class" is 
not over-engineering, it's how you decide where responsibility lies.  And in 
this case it's clear that if another process class wanted to do this job, it 
would have to duplicate this code, which means it doesn't belong in Process.


https://reviews.llvm.org/D30520



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


Re: [Lldb-commits] [PATCH] D30560: Split DataExtractor into two classes.

2017-03-03 Thread Zachary Turner via lldb-commits
Yea, I can see splitting the target specific stuff into a separate "target
aware" dump function and having the base one not require the exeuction
context and go in Utility.  In the interest of not breaking anything it
seems reasonable to try to do that as a separate patch so we the functional
and non functional change portions can be separated from each other.

On Fri, Mar 3, 2017 at 9:51 AM Jim Ingham via Phabricator <
revi...@reviews.llvm.org> wrote:

> jingham added a comment.
>
> Yes, that is a good solution.  It's still a little awkward that
> DataExtractors live in Utility and their dumper lives in Core.  Especially
> as almost all the functionality of the dumper could live in Utility.  If
> you were serious about using Utility separate from Core you would want to
> put the non-target parts of DumpDataExtractor into Core and assert if those
> are passed the unsupported flavors, and then have DumpDataExtractorTarget,
> with the instruction and fancy float bits.  But maybe that's work for
> another day.
>
> We name functions starting with a Capitol first letter, so these should be
> "Dump..." not "dump...".  But other than that, this seems good.
>
>
> https://reviews.llvm.org/D30560
>
>
>
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D30560: Split DataExtractor into two classes.

2017-03-03 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment.

Yes, that is a good solution.  It's still a little awkward that DataExtractors 
live in Utility and their dumper lives in Core.  Especially as almost all the 
functionality of the dumper could live in Utility.  If you were serious about 
using Utility separate from Core you would want to put the non-target parts of 
DumpDataExtractor into Core and assert if those are passed the unsupported 
flavors, and then have DumpDataExtractorTarget, with the instruction and fancy 
float bits.  But maybe that's work for another day.

We name functions starting with a Capitol first letter, so these should be 
"Dump..." not "dump...".  But other than that, this seems good.


https://reviews.llvm.org/D30560



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


[Lldb-commits] [lldb] r296885 - Android.rules: fix building on mac

2017-03-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Fri Mar  3 11:03:46 2017
New Revision: 296885

URL: http://llvm.org/viewvc/llvm-project?rev=296885&view=rev
Log:
Android.rules: fix building on mac

realpath is not available as an executable on mac. I give up, I am just
going to leave the path with ..'s in it.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules?rev=296885&r1=296884&r2=296885&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules Fri Mar  3 
11:03:46 2017
@@ -1,5 +1,4 @@
 NDK_ROOT := $(shell dirname $(CC))/../../../../..
-NDK_ROOT := $(shell realpath $(NDK_ROOT))
 
 ifeq "$(findstring 64, $(ARCH))" "64"
# lowest 64-bit API level


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


[Lldb-commits] [lldb] r296876 - Android.rules: fix building on windows

2017-03-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Fri Mar  3 10:29:56 2017
New Revision: 296876

URL: http://llvm.org/viewvc/llvm-project?rev=296876&view=rev
Log:
Android.rules: fix building on windows

$(realpath), which I guess is a make builtin, gives strange results on
Windows. $(shell realpath) invokes the gnuwin external binary, which
works correctly.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules?rev=296876&r1=296875&r2=296876&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules Fri Mar  3 
10:29:56 2017
@@ -1,5 +1,5 @@
 NDK_ROOT := $(shell dirname $(CC))/../../../../..
-NDK_ROOT := $(realpath $(NDK_ROOT))
+NDK_ROOT := $(shell realpath $(NDK_ROOT))
 
 ifeq "$(findstring 64, $(ARCH))" "64"
# lowest 64-bit API level


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


[Lldb-commits] [PATCH] D30574: Android.rules: add support for clang compiler

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
Herald added a subscriber: srhines.

building executables with the NDK clang requires -target and
-gcc-toolchain arguments.


https://reviews.llvm.org/D30574

Files:
  packages/Python/lldbsuite/test/make/Android.rules
  packages/Python/lldbsuite/test/make/Makefile.rules

Index: packages/Python/lldbsuite/test/make/Makefile.rules
===
--- packages/Python/lldbsuite/test/make/Makefile.rules
+++ packages/Python/lldbsuite/test/make/Makefile.rules
@@ -32,6 +32,22 @@
 
 
 #--
+# If OS is not defined, use 'uname -s' to determine the OS name.
+#
+# uname on Windows gives "windows32", but most environments standardize
+# on "Windows_NT", so we'll make it consistent here.  When running
+# tests from Visual Studio, the environment variable isn't inherited
+# all the way down to the process spawned for make.
+#--
+HOST_OS = $(shell uname -s)
+ifeq "$(HOST_OS)" "windows32"
+	HOST_OS = Windows_NT
+endif
+ifeq "$(OS)" ""
+	OS = $(HOST_OS)
+endif
+
+#--
 # If TRIPLE is not defined try to set the ARCH, CC, CFLAGS, and more
 # from the triple alone
 #--
@@ -69,22 +85,6 @@
 endif
 
 #--
-# If OS is not defined, use 'uname -s' to determine the OS name.
-#
-# uname on Windows gives "windows32", but most environments standardize
-# on "Windows_NT", so we'll make it consistent here.  When running
-# tests from Visual Studio, the environment variable isn't inherited
-# all the way down to the process spawned for make.
-#--
-HOST_OS = $(shell uname -s)
-ifeq "$(HOST_OS)" "windows32"
-	HOST_OS = Windows_NT
-endif
-ifeq "$(OS)" ""
-	OS = $(HOST_OS)
-endif
-
-#--
 # If ARCH is not defined, default to x86_64.
 #--
 ifeq "$(ARCH)" ""
Index: packages/Python/lldbsuite/test/make/Android.rules
===
--- packages/Python/lldbsuite/test/make/Android.rules
+++ packages/Python/lldbsuite/test/make/Android.rules
@@ -15,22 +15,51 @@
 ifeq "$(ARCH)" "arm"
 	SYSROOT_ARCH := arm
 	STL_ARCH := armeabi-v7a
+	TRIPLE_ARCH := armv7
 	ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
 else ifeq "$(ARCH)" "aarch64"
 	SYSROOT_ARCH := arm64
+	TRIPLE_ARCH := aarch64
 	STL_ARCH := arm64-v8a
 else ifeq "$(ARCH)" "i386"
 	SYSROOT_ARCH := x86
 	STL_ARCH := x86
+	TRIPLE_ARCH := i686
 else ifeq "$(ARCH)" "mips64r6"
 	SYSROOT_ARCH := mips64
 	STL_ARCH := mips64
+	TRIPLE_ARCH := mips64el
 else ifeq "$(ARCH)" "mips32"
 	SYSROOT_ARCH := mips
 	STL_ARCH := mips
+	TRIPLE_ARCH := mipsel
 else
 	SYSROOT_ARCH := $(ARCH)
 	STL_ARCH := $(ARCH)
+	TRIPLE_ARCH := $(ARCH)
+endif
+
+ifeq "$(findstring 86,$(ARCH))" "86"
+	TOOLCHAIN_DIR := $(STL_ARCH)-4.9
+else
+	TOOLCHAIN_DIR := $(TRIPLE_ARCH)-linux-android-4.9
+endif
+
+ifeq "$(HOST_OS)" "Linux"
+	HOST_TAG := linux-x86_64
+else ifeq "$(HOST_OS)" "Darwin"
+	HOST_TAG := darwin-x86_64
+else
+	HOST_TAG := windows-x86_64
+endif
+
+ifeq "$(findstring clang,$(CC))" "clang"
+	ARCH_CFLAGS += \
+		-target $(TRIPLE_ARCH)-none-linux-android \
+		-gcc-toolchain $(NDK_ROOT)/toolchains/$(TOOLCHAIN_DIR)/prebuilt/$(HOST_TAG)
+	ARCH_LDFLAGS += \
+		-target $(TRIPLE_ARCH)-none-linux-android \
+		-gcc-toolchain $(NDK_ROOT)/toolchains/$(TOOLCHAIN_DIR)/prebuilt/$(HOST_TAG)
 endif
 
 ARCH_CFLAGS += \
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D30520: Make LLDB skip server-client roundtrip for signals that don't require any actions

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.






Comment at: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:3766-3776
+  llvm::SmallVector signals_to_ignore;
+  int32_t signo = m_unix_signals_sp->GetFirstSignalNumber();
+  while (signo != LLDB_INVALID_SIGNAL_NUMBER) {
+bool should_ignore = !m_unix_signals_sp->GetShouldStop(signo) &&
+ !m_unix_signals_sp->GetShouldNotify(signo) &&
+ !m_unix_signals_sp->GetShouldSuppress(signo);
+

eugene wrote:
> jingham wrote:
> > This code should go into the UnixSignals class.  Any other Process plugin 
> > that wanted to implement expedited signal handling would also have to do 
> > this computation, and we shouldn't duplicate the code.
> I think it would be a mistake to over-engineer it and try to anticipate needs 
> of any possible implementation at this point.
> Maybe another implementation would require a list of signals that need to be 
> stopped instead of ignored. 
> 
> Whenever  we have an alternative implementation that needs to do such thins 
> we can always go back and generalize this code, as for now I think we need to 
> keep things simple. 
> 
> I like the concise interface that UnixSignals provides and  I don't want to 
> pollute it with things can be easily done in the code that uses it.
I agree with Eugene. I think there are advantages to the UnixSignals class 
being "dumb", and having the process plugin decide what to do with the data 
there. If anything, what this code needs is a better signal iteration API, so 
you could write this as something like:
```
for (auto signal: signals) {
  if (!signal.stop && !signal.notify && !signal.supress)
my_list.push_back(signal.number);
}
```


https://reviews.llvm.org/D30520



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


Re: [Lldb-commits] [PATCH] D30410: testsuite/android: build test executables with the android ndk directly

2017-03-03 Thread Zachary Turner via lldb-commits
It works because we already require GnuWin32 (even just to run make at all)
On Fri, Mar 3, 2017 at 6:02 AM Pavel Labath via Phabricator via
lldb-commits  wrote:

> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL296869: testsuite/android: build test executables with
> the android ndk directly (authored by labath).
>
> Changed prior to commit:
>   https://reviews.llvm.org/D30410?vs=89890&id=90470#toc
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D30410
>
> Files:
>   lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
>   lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D30410: testsuite/android: build test executables with the android ndk directly

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL296869: testsuite/android: build test executables with the 
android ndk directly (authored by labath).

Changed prior to commit:
  https://reviews.llvm.org/D30410?vs=89890&id=90470#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30410

Files:
  lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
  lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules

Index: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
===
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
@@ -0,0 +1,43 @@
+NDK_ROOT := $(shell dirname $(CC))/../../../../..
+NDK_ROOT := $(realpath $(NDK_ROOT))
+
+ifeq "$(findstring 64, $(ARCH))" "64"
+	# lowest 64-bit API level
+	API_LEVEL := 21
+else ifeq "$(ARCH)" "i386"
+	# clone(2) declaration is present only since this api level
+	API_LEVEL := 17
+else
+	# lowest supported 32-bit API level
+	API_LEVEL := 9
+endif
+
+ifeq "$(ARCH)" "arm"
+	SYSROOT_ARCH := arm
+	STL_ARCH := armeabi-v7a
+	ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
+else ifeq "$(ARCH)" "aarch64"
+	SYSROOT_ARCH := arm64
+	STL_ARCH := arm64-v8a
+else ifeq "$(ARCH)" "i386"
+	SYSROOT_ARCH := x86
+	STL_ARCH := x86
+else ifeq "$(ARCH)" "mips64r6"
+	SYSROOT_ARCH := mips64
+	STL_ARCH := mips64
+else ifeq "$(ARCH)" "mips32"
+	SYSROOT_ARCH := mips
+	STL_ARCH := mips
+else
+	SYSROOT_ARCH := $(ARCH)
+	STL_ARCH := $(ARCH)
+endif
+
+ARCH_CFLAGS += \
+	--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) \
+	-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include \
+	-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/include \
+	-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
+ARCH_LDFLAGS += -lm \
+	$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/libgnustl_static.a \
+	--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH)
Index: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
===
--- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -35,7 +35,7 @@
 # If TRIPLE is not defined try to set the ARCH, CC, CFLAGS, and more
 # from the triple alone
 #--
-TRIPLE_CFLAGS :=
+ARCH_CFLAGS :=
 ifneq "$(TRIPLE)" ""
 	triple_space = $(subst -, ,$(TRIPLE))
 	ARCH =$(word 1, $(triple_space))
@@ -52,18 +52,21 @@
 	ifeq "$(TRIPLE_VERSION)" ""
 		TRIPLE_VERSION =$(shell echo $(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/')
 	endif
-	TRIPLE_CFLAGS :=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+	ARCH_CFLAGS :=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
 else
 	SDKROOT = $(shell xcrun --sdk iphonesimulator --show-sdk-path)
 	ifeq "$(TRIPLE_VERSION)" ""
 		TRIPLE_VERSION =$(shell echo $(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/')
 	endif
-	TRIPLE_CFLAGS :=-mios-simulator-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+	ARCH_CFLAGS :=-mios-simulator-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
 endif
 			endif
 		endif
 	endif
 endif
+ifeq "$(OS)" "Android"
+	include $(THIS_FILE_DIR)/Android.rules
+endif
 
 #--
 # If OS is not defined, use 'uname -s' to determine the OS name.
@@ -199,13 +202,13 @@
 	CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
 endif
 
-CFLAGS += -include $(THIS_FILE_DIR)test_common.h $(TRIPLE_CFLAGS)
+CFLAGS += -include $(THIS_FILE_DIR)test_common.h $(ARCH_CFLAGS)
 
 # Use this one if you want to build one part of the result without debug information:
 ifeq "$(OS)" "Darwin"
-	CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(TRIPLE_CFLAGS)
+	CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(ARCH_CFLAGS)
 else
-	CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(TRIPLE_CFLAGS)
+	CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) $(ARCH_CFLAGS)
 endif
 
 ifeq "$(MAKE_DWO)" "YES"
@@ -221,7 +224,7 @@
 CXXFLAGS += $(subst -fmodules,, $(CFLAGS))
 LD = $(CC)
 LDFLAGS ?= $(CFLAGS)
-LDFLAGS += $(LD_EXTRAS)
+LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
 ifeq (,$(filter $(OS), Windows_NT Android))
 	ifneq (,$(filter YES,$(ENABLE_THREADS)))
 		LDFLAGS += -pthread
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r296869 - testsuite/android: build test executables with the android ndk directly

2017-03-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Fri Mar  3 07:49:34 2017
New Revision: 296869

URL: http://llvm.org/viewvc/llvm-project?rev=296869&view=rev
Log:
testsuite/android: build test executables with the android ndk directly

Summary:
This teaches the test makefiles about the Android NDK, so we are able to
run the tests without first going through the make_standalone_toolchain
script. The motivation for this is the ability to run both libc++ and
libstdc++ tests together, which previously was not possible because
make_standalone_toolchain bakes in the STL to use during toolchain
creation time. The support for this is not present yet -- this change
only make sure we don't regress for existing funcionality (gcc w/
libstdc++). Clang and libc++ support will be added later.

I've checked that the mips android targets compile after this change,
but I have no way of checking whether this breaks anything. If you are
reading this and it broke you, let me know.

Reviewers: tberghammer, danalbert

Subscribers: srhines, lldb-commits

Differential Revision: https://reviews.llvm.org/D30410

Added:
lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
Modified:
lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules

Added: lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules?rev=296869&view=auto
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules (added)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Android.rules Fri Mar  3 
07:49:34 2017
@@ -0,0 +1,43 @@
+NDK_ROOT := $(shell dirname $(CC))/../../../../..
+NDK_ROOT := $(realpath $(NDK_ROOT))
+
+ifeq "$(findstring 64, $(ARCH))" "64"
+   # lowest 64-bit API level
+   API_LEVEL := 21
+else ifeq "$(ARCH)" "i386"
+   # clone(2) declaration is present only since this api level
+   API_LEVEL := 17
+else
+   # lowest supported 32-bit API level
+   API_LEVEL := 9
+endif
+
+ifeq "$(ARCH)" "arm"
+   SYSROOT_ARCH := arm
+   STL_ARCH := armeabi-v7a
+   ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
+else ifeq "$(ARCH)" "aarch64"
+   SYSROOT_ARCH := arm64
+   STL_ARCH := arm64-v8a
+else ifeq "$(ARCH)" "i386"
+   SYSROOT_ARCH := x86
+   STL_ARCH := x86
+else ifeq "$(ARCH)" "mips64r6"
+   SYSROOT_ARCH := mips64
+   STL_ARCH := mips64
+else ifeq "$(ARCH)" "mips32"
+   SYSROOT_ARCH := mips
+   STL_ARCH := mips
+else
+   SYSROOT_ARCH := $(ARCH)
+   STL_ARCH := $(ARCH)
+endif
+
+ARCH_CFLAGS += \
+   
--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) \
+   -isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include \
+   -isystem 
$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/include \
+   -isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
+ARCH_LDFLAGS += -lm \
+   
$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/libgnustl_static.a
 \
+   
--sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH)

Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=296869&r1=296868&r2=296869&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Fri Mar  3 
07:49:34 2017
@@ -35,7 +35,7 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)../../.
 # If TRIPLE is not defined try to set the ARCH, CC, CFLAGS, and more
 # from the triple alone
 #--
-TRIPLE_CFLAGS :=
+ARCH_CFLAGS :=
 ifneq "$(TRIPLE)" ""
triple_space = $(subst -, ,$(TRIPLE))
ARCH =$(word 1, $(triple_space))
@@ -52,18 +52,21 @@ ifneq "$(TRIPLE)" ""
ifeq "$(TRIPLE_VERSION)" ""
TRIPLE_VERSION =$(shell echo 
$(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/')
endif
-   TRIPLE_CFLAGS 
:=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+   ARCH_CFLAGS 
:=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
else
SDKROOT = $(shell xcrun --sdk 
iphonesimulator --show-sdk-path)
ifeq "$(TRIPLE_VERSION)" ""
TRIPLE_VERSION =$(shell echo 
$(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/')
endif
-   TRIPLE_CFLAGS 

[Lldb-commits] [lldb] r296870 - test: shorten test trace file names

2017-03-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Fri Mar  3 07:49:38 2017
New Revision: 296870

URL: http://llvm.org/viewvc/llvm-project?rev=296870&view=rev
Log:
test: shorten test trace file names

Make sure we don't generate extremely long file names for test trace log
file, as this can cause path-too-long errors. As the compilers in the
android ndk are deeply nested, it's very easy to trigger these.

I chose to output at most 4 path components -- this should keep the full
path for common cases like /usr/bin/gcc with room to spare, and should
be enough to uniquely identify the compiler for more deeply nested
cases.

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=296870&r1=296869&r2=296870&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Fri Mar  3 07:49:38 
2017
@@ -1119,8 +1119,11 @@ class Base(unittest2.TestCase):
 compiler = compiler[2:]
 if os.path.altsep is not None:
 compiler = compiler.replace(os.path.altsep, os.path.sep)
-components.extend(
-[x for x in compiler.split(os.path.sep) if x != ""])
+path_components = [x for x in compiler.split(os.path.sep) if x 
!= ""]
+
+# Add at most 4 path components to avoid generating very long
+# filenames
+components.extend(path_components[-4:])
 elif c == 'a':
 components.append(self.getArchitecture())
 elif c == 'm':


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


[Lldb-commits] [lldb] r296868 - Made GetClangTargetCPU() const.

2017-03-03 Thread Pavel Labath via lldb-commits
Author: labath
Date: Fri Mar  3 07:35:49 2017
New Revision: 296868

URL: http://llvm.org/viewvc/llvm-project?rev=296868&view=rev
Log:
Made GetClangTargetCPU() const.

Summary:
It does not change members or call non-const members.
HostInfo::GetArchitecture() returns a const object ref (maybe others?),
which can't access the non-const function.

Reviewers: labath, eugene

Reviewed By: labath, eugene

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D30515
Author: Jason Majors 

Modified:
lldb/trunk/include/lldb/Core/ArchSpec.h
lldb/trunk/source/Core/ArchSpec.cpp

Modified: lldb/trunk/include/lldb/Core/ArchSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=296868&r1=296867&r2=296868&view=diff
==
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ArchSpec.h Fri Mar  3 07:35:49 2017
@@ -307,7 +307,7 @@ public:
   /// @return A string representing target CPU for the current
   /// architecture.
   //--
-  std::string GetClangTargetCPU();
+  std::string GetClangTargetCPU() const;
 
   //--
   /// Return a string representing target application ABI.

Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=296868&r1=296867&r2=296868&view=diff
==
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Fri Mar  3 07:35:49 2017
@@ -657,7 +657,7 @@ void ArchSpec::SetFlags(std::string elf_
   SetFlags(flag);
 }
 
-std::string ArchSpec::GetClangTargetCPU() {
+std::string ArchSpec::GetClangTargetCPU() const {
   std::string cpu;
   const llvm::Triple::ArchType machine = GetMachine();
 


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


[Lldb-commits] [PATCH] D30515: Made GetClangTargetCPU() const.

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL296868: Made GetClangTargetCPU() const. (authored by labath).

Changed prior to commit:
  https://reviews.llvm.org/D30515?vs=90255&id=90467#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30515

Files:
  lldb/trunk/include/lldb/Core/ArchSpec.h
  lldb/trunk/source/Core/ArchSpec.cpp


Index: lldb/trunk/source/Core/ArchSpec.cpp
===
--- lldb/trunk/source/Core/ArchSpec.cpp
+++ lldb/trunk/source/Core/ArchSpec.cpp
@@ -657,7 +657,7 @@
   SetFlags(flag);
 }
 
-std::string ArchSpec::GetClangTargetCPU() {
+std::string ArchSpec::GetClangTargetCPU() const {
   std::string cpu;
   const llvm::Triple::ArchType machine = GetMachine();
 
Index: lldb/trunk/include/lldb/Core/ArchSpec.h
===
--- lldb/trunk/include/lldb/Core/ArchSpec.h
+++ lldb/trunk/include/lldb/Core/ArchSpec.h
@@ -307,7 +307,7 @@
   /// @return A string representing target CPU for the current
   /// architecture.
   //--
-  std::string GetClangTargetCPU();
+  std::string GetClangTargetCPU() const;
 
   //--
   /// Return a string representing target application ABI.


Index: lldb/trunk/source/Core/ArchSpec.cpp
===
--- lldb/trunk/source/Core/ArchSpec.cpp
+++ lldb/trunk/source/Core/ArchSpec.cpp
@@ -657,7 +657,7 @@
   SetFlags(flag);
 }
 
-std::string ArchSpec::GetClangTargetCPU() {
+std::string ArchSpec::GetClangTargetCPU() const {
   std::string cpu;
   const llvm::Triple::ArchType machine = GetMachine();
 
Index: lldb/trunk/include/lldb/Core/ArchSpec.h
===
--- lldb/trunk/include/lldb/Core/ArchSpec.h
+++ lldb/trunk/include/lldb/Core/ArchSpec.h
@@ -307,7 +307,7 @@
   /// @return A string representing target CPU for the current
   /// architecture.
   //--
-  std::string GetClangTargetCPU();
+  std::string GetClangTargetCPU() const;
 
   //--
   /// Return a string representing target application ABI.
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D30560: Split DataExtractor into two classes.

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

I like the free-standing function approach a lot.


https://reviews.llvm.org/D30560



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


[Lldb-commits] [PATCH] D29581: Initial implementation of SB APIs for Tracing support.

2017-03-03 Thread Ravitheja Addepally via Phabricator via lldb-commits
ravitheja added inline comments.



Comment at: include/lldb/API/SBProcess.h:269
+  lldb::user_id_t StartTrace(SBTraceOptions &sboptions, lldb::SBError &sberror,
+ lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID);
+

clayborg wrote:
> Should the thread be in the SBTraceOptions? What if you want to trace N 
> threads, but not all? Seems like this would be better represented in the 
> SBTraceOptions.
We wanted to keep some symmetry among the APIs , the threadid could go in the 
TraceOptions as well.



Comment at: include/lldb/API/SBProcess.h:281-288
+  /// @param[in] buf
+  /// Buffer to write the trace data to.
+  ///
+  /// @param[in] size
+  /// The size of the buffer used to read the data. This is
+  /// also the size of the data intended to read. It is also
+  /// possible to partially read the trace data for some trace

clayborg wrote:
> Should we make a SBTraceData object instead of getting a buffer of bytes? I 
> haven't looked past this code to the code below, so I am not sure how this 
> data will be used. Just thinking out loud here.
So the idea we have is that we don't want to interpret the trace data inside 
lldb. Now one could go and make a class SBTraceData but it would just be a 
buffer of trace data, which is why we left it as a buffer of bytes.



Comment at: include/lldb/API/SBProcess.h:290-291
+  ///
+  /// @param[in] offset
+  /// The start offset to begin reading the trace data.
+  ///

clayborg wrote:
> Should the trace data not be a stream? Can you elaborate on why you think you 
> need the offset?
For processor Trace implementation buffer was more suitable for decoding 
purposes. The reason for offset was that it gives the plugin the chance to 
request partial segments of the trace data which it could decode.


https://reviews.llvm.org/D29581



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


[Lldb-commits] [PATCH] D29581: Initial implementation of SB APIs for Tracing support.

2017-03-03 Thread Ravitheja Addepally via Phabricator via lldb-commits
ravitheja updated this revision to Diff 90461.
ravitheja added a comment.
Herald added a subscriber: mgorny.

Changes according to the comments.


https://reviews.llvm.org/D29581

Files:
  include/lldb/API/LLDB.h
  include/lldb/API/SBDefines.h
  include/lldb/API/SBError.h
  include/lldb/API/SBProcess.h
  include/lldb/API/SBStream.h
  include/lldb/API/SBTrace.h
  include/lldb/API/SBTraceOptions.h
  include/lldb/Target/Process.h
  include/lldb/lldb-enumerations.h
  include/lldb/lldb-forward.h
  scripts/interface/SBProcess.i
  scripts/interface/SBTrace.i
  scripts/interface/SBTraceOptions.i
  scripts/lldb.swig
  source/API/CMakeLists.txt
  source/API/SBProcess.cpp
  source/API/SBTrace.cpp
  source/API/SBTraceOptions.cpp

Index: source/API/SBTraceOptions.cpp
===
--- /dev/null
+++ source/API/SBTraceOptions.cpp
@@ -0,0 +1,83 @@
+//===-- SBTraceOptions.cpp --*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "lldb/API/SBTraceOptions.h"
+#include "lldb/API/SBError.h"
+#include "lldb/API/SBStream.h"
+#include "lldb/Core/Log.h"
+#include "lldb/Target/Process.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+SBTraceOptions::SBTraceOptions(lldb::TraceType type, uint64_t trace_buffer_size,
+   uint64_t meta_data_buffer_size) {
+  m_traceoptions_sp.reset(
+  new TraceOptions(type, trace_buffer_size, meta_data_buffer_size));
+}
+
+lldb::TraceType SBTraceOptions::getType() const {
+  if (m_traceoptions_sp)
+return m_traceoptions_sp->getType();
+  return lldb::TraceType::eTraceTypeNone;
+}
+
+uint64_t SBTraceOptions::getTraceBufferSize() const {
+  if (m_traceoptions_sp)
+return m_traceoptions_sp->getTraceBufferSize();
+  return 0;
+}
+
+lldb::SBError SBTraceOptions::getTraceParams(lldb::SBStream &ss) {
+  const lldb_private::StructuredData::DictionarySP dict_obj =
+  m_traceoptions_sp->getTraceParams();
+  lldb::SBError error;
+  if (dict_obj) {
+dict_obj->Dump(ss.ref(), false);
+  } else
+error.SetErrorString("Empty trace params");
+  return error;
+}
+
+uint64_t SBTraceOptions::getMetaDataBufferSize() const {
+  if (m_traceoptions_sp)
+return m_traceoptions_sp->getTraceBufferSize();
+  return 0;
+}
+
+void SBTraceOptions::setTraceParams(lldb::SBStream ¶ms) {
+  if (params.GetData() == NULL)
+return;
+  if (m_traceoptions_sp) {
+std::string str(params.GetData());
+m_traceoptions_sp->setTraceParams(str);
+return;
+  }
+}
+
+void SBTraceOptions::setType(lldb::TraceType type) {
+  if (m_traceoptions_sp)
+m_traceoptions_sp->setType(type);
+}
+
+void SBTraceOptions::setTraceBufferSize(uint64_t size) {
+  if (m_traceoptions_sp)
+m_traceoptions_sp->setTraceBufferSize(size);
+}
+
+void SBTraceOptions::setMetaDataBufferSize(uint64_t size) {
+  if (m_traceoptions_sp)
+m_traceoptions_sp->setMetaDataBufferSize(size);
+}
+
+bool SBTraceOptions::IsValid() {
+  if (m_traceoptions_sp)
+return true;
+  return false;
+}
Index: source/API/SBTrace.cpp
===
--- /dev/null
+++ source/API/SBTrace.cpp
@@ -0,0 +1,128 @@
+//===-- SBTrace.cpp -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "lldb/Core/Log.h"
+#include "lldb/Target/Process.h"
+
+#include "lldb/API/SBTrace.h"
+#include "lldb/API/SBTraceOptions.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+class SBTraceImpl {
+public:
+  lldb::user_id_t uid;
+};
+
+lldb::ProcessSP SBTrace::GetSP() const { return m_opaque_wp.lock(); }
+
+size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size,
+ size_t offset, lldb::tid_t thread_id) {
+  size_t bytes_read = 0;
+  ProcessSP process_sp(GetSP());
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
+  error.Clear();
+
+  if (log)
+log->Printf("SBProcess:: %s", __FUNCTION__);
+
+  if (!process_sp) {
+error.SetErrorString("invalid process");
+  } else {
+bytes_read = process_sp->GetData(GetTraceUID(), thread_id, error.ref(), buf,
+ size, offset);
+if (log)
+  log->Printf("SBProcess:: %s bytes_read - %" PRIx64, __FUNCTION__,
+  bytes_read);
+  }
+  return bytes_read;
+}
+
+size_t SBTrace::GetMetaData(SBError &error, void *buf, size_t size,
+size_t offset, lldb::tid_t thread_id) {
+  size_t bytes_read = 0;

[Lldb-commits] [PATCH] D30559: Move Log from Core -> Utility

2017-03-03 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I was building up to this, but I guess you beat me to it. :)


https://reviews.llvm.org/D30559



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