[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

2017-03-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment.

Next, I will work on a code to extend the NetBSD Process Plugin from a stub to 
a version that actually works.


Repository:
  rL LLVM

https://reviews.llvm.org/D31231



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


[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

2017-03-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment.

With x86_64 general purpose registers going before that.


Repository:
  rL LLVM

https://reviews.llvm.org/D31231



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


[Lldb-commits] [lldb] r298509 - Revert "Delete the remainder of platform specific code in FileSpec."

2017-03-22 Thread Pavel Labath via lldb-commits
Author: labath
Date: Wed Mar 22 09:04:43 2017
New Revision: 298509

URL: http://llvm.org/viewvc/llvm-project?rev=298509&view=rev
Log:
Revert "Delete the remainder of platform specific code in FileSpec."

This reverts commit r298465 as it breaks
TestLLVM.TestHomeDirectory.test_tilde_home_directory.

Removed:
lldb/trunk/unittests/Utility/Mocks/CMakeLists.txt
lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp
lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.h
lldb/trunk/unittests/Utility/TildeExpressionResolverTest.cpp
Modified:
lldb/trunk/include/lldb/Host/FileSpec.h
lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h
lldb/trunk/source/API/SBDeclaration.cpp
lldb/trunk/source/API/SBFileSpec.cpp
lldb/trunk/source/API/SBFileSpecList.cpp
lldb/trunk/source/API/SBLineEntry.cpp
lldb/trunk/source/Host/common/FileSpec.cpp
lldb/trunk/source/Host/windows/FileSystem.cpp
lldb/trunk/source/Host/windows/HostInfoWindows.cpp
lldb/trunk/source/Target/TargetList.cpp
lldb/trunk/source/Utility/TildeExpressionResolver.cpp
lldb/trunk/unittests/CMakeLists.txt
lldb/trunk/unittests/Interpreter/CMakeLists.txt
lldb/trunk/unittests/Interpreter/TestCompletion.cpp
lldb/trunk/unittests/Utility/CMakeLists.txt

Modified: lldb/trunk/include/lldb/Host/FileSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=298509&r1=298508&r2=298509&view=diff
==
--- lldb/trunk/include/lldb/Host/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Host/FileSpec.h Wed Mar 22 09:04:43 2017
@@ -17,6 +17,7 @@
 
 // Other libraries and framework includes
 // Project includes
+#include "lldb/Host/PosixApi.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/lldb-private.h"
 
@@ -538,6 +539,26 @@ public:
 
   ConstString GetLastPathComponent() const;
 
+  //--
+  /// Resolves the user name at the beginning of \a src_path, and writes the
+  /// output
+  /// to \a dst_path.  Note, \a src_path can contain other path components 
after
+  /// the
+  /// user name, they will be copied over, and if the path doesn't start with
+  /// "~" it
+  /// will also be copied over to \a dst_path.
+  ///
+  /// @param[in] src_path
+  /// Input path to be resolved.
+  ///
+  /// @param[in] dst_path
+  /// Buffer to store the resolved path.
+  //--
+  static void ResolveUsername(llvm::SmallVectorImpl &path);
+
+  static size_t ResolvePartialUsername(llvm::StringRef partial_name,
+   StringList &matches);
+
   enum EnumerateDirectoryResult {
 eEnumerateDirectoryResultNext,  // Enumerate next entry in the current
 // directory

Modified: lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h?rev=298509&r1=298508&r2=298509&view=diff
==
--- lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h (original)
+++ lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h Wed Mar 22 
09:04:43 2017
@@ -44,11 +44,6 @@ public:
   /// \returns true if there were any matches, false otherwise.
   virtual bool ResolvePartial(llvm::StringRef Expr,
   llvm::StringSet<> &Output) = 0;
-
-  /// \brief Resolve an entire path that begins with a tilde expression,
-  /// replacing the username portion with the matched result.
-  bool ResolveFullPath(llvm::StringRef Expr,
-   llvm::SmallVectorImpl &Output);
 };
 
 class StandardTildeExpressionResolver : public TildeExpressionResolver {

Modified: lldb/trunk/source/API/SBDeclaration.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=298509&r1=298508&r2=298509&view=diff
==
--- lldb/trunk/source/API/SBDeclaration.cpp (original)
+++ lldb/trunk/source/API/SBDeclaration.cpp Wed Mar 22 09:04:43 2017
@@ -1,4 +1,5 @@
-//===-- SBDeclaration.cpp *- 
C++-*-===//
+//===-- SBDeclaration.cpp -*- C++
+//-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -9,7 +10,6 @@
 
 #include "lldb/API/SBDeclaration.h"
 #include "lldb/API/SBStream.h"
-#include "lldb/Host/PosixApi.h"
 #include "lldb/Symbol/Declaration.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"

Modified: lldb/trunk/source/API/SBFileSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=298509&r1=298508&r2=298509&view=diff

[Lldb-commits] [lldb] r298517 - Merge changes from r298466 into Xcode project

2017-03-22 Thread Tim Hammerquist via lldb-commits
Author: penryu
Date: Wed Mar 22 11:47:14 2017
New Revision: 298517

URL: http://llvm.org/viewvc/llvm-project?rev=298517&view=rev
Log:
Merge changes from r298466 into Xcode project

rdar://problem/31197116

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=298517&r1=298516&r2=298517&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Mar 22 11:47:14 2017
@@ -1345,8 +1345,8 @@
23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
RegisterInfoInterface.h; path = Utility/RegisterInfoInterface.h; sourceTree = 
""; };
23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
SBTypeEnumMember.h; path = include/lldb/API/SBTypeEnumMember.h; sourceTree = 
""; };
23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
SBTypeEnumMember.cpp; path = source/API/SBTypeEnumMember.cpp; sourceTree = 
""; };
-   23F403471926C8D50046DC9B /* NativeRegisterContextRegisterInfo.h 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = NativeRegisterContextRegisterInfo.h; path = 
include/lldb/Host/common/NativeRegisterContextRegisterInfo.h; sourceTree = 
""; };
-   23F403481926CC250046DC9B /* 
NativeRegisterContextRegisterInfo.cpp */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = 
NativeRegisterContextRegisterInfo.cpp; path = 
source/Host/common/NativeRegisterContextRegisterInfo.cpp; sourceTree = 
""; };
+   23F403471926C8D50046DC9B /* NativeRegisterContextRegisterInfo.h 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = NativeRegisterContextRegisterInfo.h; path = 
Utility/NativeRegisterContextRegisterInfo.h; sourceTree = ""; };
+   23F403481926CC250046DC9B /* 
NativeRegisterContextRegisterInfo.cpp */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = 
NativeRegisterContextRegisterInfo.cpp; path = 
Utility/NativeRegisterContextRegisterInfo.cpp; sourceTree = ""; };
250D6AE11A9679270049CC70 /* FileSystem.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = FileSystem.cpp; sourceTree = ""; };
25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = OptionValueChar.cpp; path = source/Interpreter/OptionValueChar.cpp; 
sourceTree = ""; };
25420ECE1A64911B009ADBCB /* OptionValueChar.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionValueChar.h; 
path = include/lldb/Interpreter/OptionValueChar.h; sourceTree = ""; };
@@ -4506,6 +4506,8 @@
26B4666E11A2080F00CF6220 /* Utility */ = {
isa = PBXGroup;
children = (
+   23F403471926C8D50046DC9B /* 
NativeRegisterContextRegisterInfo.h */,
+   23F403481926CC250046DC9B /* 
NativeRegisterContextRegisterInfo.cpp */,
B287E63E12EFAE2C00C9BEFE /* ARMDefines.h */,
B23DD24F12EDFAC1000C3894 /* ARMUtils.h */,
26954EBC1401EE8B00294D09 /* 
DynamicRegisterInfo.cpp */,
@@ -5302,8 +5304,6 @@
26E3EEBD11A9870400FBADB6 /* Unwind.h */,
264D8D4E13661BCC003A368F /* UnwindAssembly.h */,
264D8D4F13661BD7003A368F /* UnwindAssembly.cpp 
*/,
-   23F403471926C8D50046DC9B /* 
NativeRegisterContextRegisterInfo.h */,
-   23F403481926CC250046DC9B /* 
NativeRegisterContextRegisterInfo.cpp */,
);
name = Target;
sourceTree = "";


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


[Lldb-commits] [lldb] r298519 - Delete TestLLVM.py

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 12:08:25 2017
New Revision: 298519

URL: http://llvm.org/viewvc/llvm-project?rev=298519&view=rev
Log:
Delete TestLLVM.py

This was added to workaround a limitation in LLVM's implementation
of getting the current user's home directory, since it would
only look at the value of $HOME, but we did not want to rely
on that being set so we would also look in the password database.

Adding the ability to look in the password database to LLVM was
a straightforward patch that was submitted in r298513, so since
that is done this test is no longer needed.

Removed:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/llvm/

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


[Lldb-commits] [lldb] r298524 - Reuse appropriate Launch and Attach on NetBSD

2017-03-22 Thread Kamil Rytarowski via lldb-commits
Author: kamil
Date: Wed Mar 22 12:24:37 2017
New Revision: 298524

URL: http://llvm.org/viewvc/llvm-project?rev=298524&view=rev
Log:
Reuse appropriate Launch and Attach on NetBSD

Summary:
NetBSD ships with NativeProcessNetBSD  inherited from NativeProcessProtocol.

Link Plugins/Process/gdb-remote with lldbPluginProcessNetBSD in order to resolve
correctly the linking to Launch and Attach from the NetBSD plugin.

Sponsored by 

Reviewers: kettenis, labath, emaste, joerg

Reviewed By: labath, emaste

Subscribers: mgorny, #lldb

Tags: #lldb

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

Modified:
lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt

Modified: lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeProcessProtocol.cpp?rev=298524&r1=298523&r2=298524&view=diff
==
--- lldb/trunk/source/Host/common/NativeProcessProtocol.cpp (original)
+++ lldb/trunk/source/Host/common/NativeProcessProtocol.cpp Wed Mar 22 12:24:37 
2017
@@ -504,7 +504,7 @@ Error NativeProcessProtocol::ResolveProc
 return Error("failed to retrieve a valid architecture from the exe 
module");
 }
 
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__NetBSD__)
 // These need to be implemented to support lldb-gdb-server on a given platform.
 // Stubs are
 // provided to make the rest of the code link on non-supported platforms.

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt?rev=298524&r1=298523&r2=298524&view=diff
==
--- lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/CMakeLists.txt Wed Mar 22 
12:24:37 2017
@@ -11,6 +11,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux|Andr
   list(APPEND LLDB_PLUGINS lldbPluginProcessLinux)
 endif()
 
+if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+  list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD)
+endif()
+
 add_lldb_library(lldbPluginProcessGDBRemote PLUGIN
   GDBRemoteClientBase.cpp
   GDBRemoteCommunication.cpp


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


[Lldb-commits] [lldb] r298526 - Resubmit "Delete the remainder of platform specific code in FileSpec."

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 12:33:23 2017
New Revision: 298526

URL: http://llvm.org/viewvc/llvm-project?rev=298526&view=rev
Log:
Resubmit "Delete the remainder of platform specific code in FileSpec."

This was causing a test failure in one of LLDB's tests which
specifically dealt with a limitation in LLVM's implementation
of home_directory() that LLDB's own implementation had worked
around.

This limitation has been addressed in r298513 on the LLVM side,
so the failing test (which is now unnecessary as the limitation
no longer exists) was removed in r298519, allowing this patch to
be re-submitted without modification.

Added:
lldb/trunk/unittests/Utility/Mocks/CMakeLists.txt
lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp
lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.h
lldb/trunk/unittests/Utility/TildeExpressionResolverTest.cpp
Modified:
lldb/trunk/include/lldb/Host/FileSpec.h
lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h
lldb/trunk/source/API/SBDeclaration.cpp
lldb/trunk/source/API/SBFileSpec.cpp
lldb/trunk/source/API/SBFileSpecList.cpp
lldb/trunk/source/API/SBLineEntry.cpp
lldb/trunk/source/Host/common/FileSpec.cpp
lldb/trunk/source/Host/windows/FileSystem.cpp
lldb/trunk/source/Host/windows/HostInfoWindows.cpp
lldb/trunk/source/Target/TargetList.cpp
lldb/trunk/source/Utility/TildeExpressionResolver.cpp
lldb/trunk/unittests/CMakeLists.txt
lldb/trunk/unittests/Interpreter/CMakeLists.txt
lldb/trunk/unittests/Interpreter/TestCompletion.cpp
lldb/trunk/unittests/Utility/CMakeLists.txt

Modified: lldb/trunk/include/lldb/Host/FileSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=298526&r1=298525&r2=298526&view=diff
==
--- lldb/trunk/include/lldb/Host/FileSpec.h (original)
+++ lldb/trunk/include/lldb/Host/FileSpec.h Wed Mar 22 12:33:23 2017
@@ -17,7 +17,6 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Host/PosixApi.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/lldb-private.h"
 
@@ -539,26 +538,6 @@ public:
 
   ConstString GetLastPathComponent() const;
 
-  //--
-  /// Resolves the user name at the beginning of \a src_path, and writes the
-  /// output
-  /// to \a dst_path.  Note, \a src_path can contain other path components 
after
-  /// the
-  /// user name, they will be copied over, and if the path doesn't start with
-  /// "~" it
-  /// will also be copied over to \a dst_path.
-  ///
-  /// @param[in] src_path
-  /// Input path to be resolved.
-  ///
-  /// @param[in] dst_path
-  /// Buffer to store the resolved path.
-  //--
-  static void ResolveUsername(llvm::SmallVectorImpl &path);
-
-  static size_t ResolvePartialUsername(llvm::StringRef partial_name,
-   StringList &matches);
-
   enum EnumerateDirectoryResult {
 eEnumerateDirectoryResultNext,  // Enumerate next entry in the current
 // directory

Modified: lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h?rev=298526&r1=298525&r2=298526&view=diff
==
--- lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h (original)
+++ lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h Wed Mar 22 
12:33:23 2017
@@ -44,6 +44,11 @@ public:
   /// \returns true if there were any matches, false otherwise.
   virtual bool ResolvePartial(llvm::StringRef Expr,
   llvm::StringSet<> &Output) = 0;
+
+  /// \brief Resolve an entire path that begins with a tilde expression,
+  /// replacing the username portion with the matched result.
+  bool ResolveFullPath(llvm::StringRef Expr,
+   llvm::SmallVectorImpl &Output);
 };
 
 class StandardTildeExpressionResolver : public TildeExpressionResolver {

Modified: lldb/trunk/source/API/SBDeclaration.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=298526&r1=298525&r2=298526&view=diff
==
--- lldb/trunk/source/API/SBDeclaration.cpp (original)
+++ lldb/trunk/source/API/SBDeclaration.cpp Wed Mar 22 12:33:23 2017
@@ -1,5 +1,4 @@
-//===-- SBDeclaration.cpp -*- C++
-//-*-===//
+//===-- SBDeclaration.cpp *- 
C++-*-===//
 //
 // The LLVM Compiler Infrastructure
 //
@@ -10,6 +9,7 @@
 
 #include "lldb/API/SBDeclaration.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/Host/PosixApi.h"
 #includ

[Lldb-commits] [lldb] r298530 - [analyze deps] Also show cycle islands.

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 13:04:20 2017
New Revision: 298530

URL: http://llvm.org/viewvc/llvm-project?rev=298530&view=rev
Log:
[analyze deps] Also show cycle islands.

We currently display a list of all minimal cycles, but it's
useful to be able to see the big picture impact of these cycles
by merging them all together into groups of interconnected
components.

Because the cycle discovery algorithm only considers "minimal"
cycles, it discards all information for dependencies which are
not considered part of the minimal cycle.  So all we know is that
the components of each island definitely all depend on each other
but it's still possible that there are hidden dependencies due
to transitive includes.

The cycle list should still be the authoritative reference for
deciding where the easiest places to break cycles are, though.

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=298530&r1=298529&r2=298530&view=diff
==
--- lldb/trunk/scripts/analyze-project-deps.py (original)
+++ lldb/trunk/scripts/analyze-project-deps.py Wed Mar 22 13:04:20 2017
@@ -105,6 +105,7 @@ def expand(path_queue, path_lengths, cyc
 
 next_len = path_lengths.pop(0) + 1
 last_component = cur_path[-1]
+
 for item in src_map[last_component]:
 if item.startswith("clang"):
 continue
@@ -177,5 +178,18 @@ if args.discover_cycles:
 for cycle in cycles:
 cycle.append(cycle[0])
 print " -> ".join(cycle)
+
+print "Analyzing islands..."
+islands = []
+for cycle in cycles:
+this_cycle = set(cycle)
+disjoints = [x for x in islands if this_cycle.isdisjoint(x)]
+overlaps = [x for x in islands if not this_cycle.isdisjoint(x)]
+islands = disjoints + [set.union(this_cycle, *overlaps)]
+print "Found {} disjoint cycle islands...".format(len(islands))
+for island in islands:
+print "Island ({} elements)".format(len(island))
+for node in island:
+print "  {0}".format(node)
 sys.stdout.flush()
 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] [lldb] r298535 - [analyze deps] Show incoming and outgoing counts on island members.

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 13:23:14 2017
New Revision: 298535

URL: http://llvm.org/viewvc/llvm-project?rev=298535&view=rev
Log:
[analyze deps] Show incoming and outgoing counts on island members.

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=298535&r1=298534&r2=298535&view=diff
==
--- lldb/trunk/scripts/analyze-project-deps.py (original)
+++ lldb/trunk/scripts/analyze-project-deps.py Wed Mar 22 13:23:14 2017
@@ -3,6 +3,7 @@ import itertools
 import os
 import re
 import sys
+from collections import defaultdict
 
 from use_lldb_suite import lldb_root
 
@@ -165,8 +166,8 @@ if args.discover_cycles:
 average = sum([len(x)+1 for x in cycles]) / len(cycles)
 
 print "Found {} cycles.  Average cycle length = {}.".format(len(cycles), 
average)
+counted = list(iter_cycles(cycles))
 if args.show_counts:
-counted = list(iter_cycles(cycles))
 counted.sort(lambda A, B: cmp(A[0], B[0]))
 for (total, smallest, cycle) in counted:
 sys.stdout.write("{} deps to break: ".format(total))
@@ -181,6 +182,12 @@ if args.discover_cycles:
 
 print "Analyzing islands..."
 islands = []
+outgoing_counts = defaultdict(int)
+incoming_counts = defaultdict(int)
+for (total, smallest, cycle) in counted:
+for (first, count, last) in cycle:
+outgoing_counts[first] += count
+incoming_counts[last] += count
 for cycle in cycles:
 this_cycle = set(cycle)
 disjoints = [x for x in islands if this_cycle.isdisjoint(x)]
@@ -189,7 +196,11 @@ if args.discover_cycles:
 print "Found {} disjoint cycle islands...".format(len(islands))
 for island in islands:
 print "Island ({} elements)".format(len(island))
+sorted = []
 for node in island:
-print "  {0}".format(node)
+sorted.append((node, incoming_counts[node], outgoing_counts[node]))
+sorted.sort(lambda x, y: cmp(x[1]+x[2], y[1]+y[2]))
+for (node, inc, outg) in sorted:
+print "  {} [{} in, {} out]".format(node, inc, outg)
 sys.stdout.flush()
 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] [lldb] r298541 - Remove dead include from GoASTContext.cpp.

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 14:24:17 2017
New Revision: 298541

URL: http://llvm.org/viewvc/llvm-project?rev=298541&view=rev
Log:
Remove dead include from GoASTContext.cpp.

This #include was the cause of a dependency from Symbol ->
DataFormatters.  However, nothing from the header was being
used anyway, so we can just remove it with no adverse effects.

This reduces the overall cycle count from 44 to 43.

Modified:
lldb/trunk/source/Symbol/CMakeLists.txt
lldb/trunk/source/Symbol/GoASTContext.cpp

Modified: lldb/trunk/source/Symbol/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CMakeLists.txt?rev=298541&r1=298540&r2=298541&view=diff
==
--- lldb/trunk/source/Symbol/CMakeLists.txt (original)
+++ lldb/trunk/source/Symbol/CMakeLists.txt Wed Mar 22 14:24:17 2017
@@ -42,7 +42,6 @@ add_lldb_library(lldbSymbol
 clangBasic
 clangFrontend
 lldbCore
-lldbDataFormatters
 lldbExpression
 lldbHost
 lldbTarget

Modified: lldb/trunk/source/Symbol/GoASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/GoASTContext.cpp?rev=298541&r1=298540&r2=298541&view=diff
==
--- lldb/trunk/source/Symbol/GoASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/GoASTContext.cpp Wed Mar 22 14:24:17 2017
@@ -17,7 +17,6 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/Core/ValueObject.h"
-#include "lldb/DataFormatters/StringPrinter.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/GoASTContext.h"
 #include "lldb/Symbol/ObjectFile.h"


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


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

2017-03-22 Thread Galina Kistanova via lldb-commits
Hello everyone,

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

Thanks

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


[Lldb-commits] [lldb] r298547 - Merge r298536 changes to Xcode

2017-03-22 Thread Tim Hammerquist via lldb-commits
Author: penryu
Date: Wed Mar 22 15:21:52 2017
New Revision: 298547

URL: http://llvm.org/viewvc/llvm-project?rev=298547&view=rev
Log:
Merge r298536 changes to Xcode

rdar://problem/31202813

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=298547&r1=298546&r2=298547&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Mar 22 15:21:52 2017
@@ -2301,8 +2301,8 @@
26F5C37410F3F61B009D5894 /* libobjc.dylib */ = {isa = 
PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = 
libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = ""; };
26F5C39010F3FA26009D5894 /* CoreFoundation.framework */ = {isa 
= PBXFileReference; lastKnownFileType = wrapper.framework; name = 
CoreFoundation.framework; path = 
/System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; 
};
26F996A7119B79C300412154 /* ARM_DWARF_Registers.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
ARM_DWARF_Registers.h; path = source/Utility/ARM_DWARF_Registers.h; sourceTree 
= ""; };
-   26FA4315130103F400E71120 /* FileSpec.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
FileSpec.h; path = include/lldb/Host/FileSpec.h; sourceTree = ""; };
-   26FA43171301048600E71120 /* FileSpec.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = FileSpec.cpp; sourceTree = ""; };
+   26FA4315130103F400E71120 /* FileSpec.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
FileSpec.h; path = include/lldb/Utility/FileSpec.h; sourceTree = ""; };
+   26FA43171301048600E71120 /* FileSpec.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = FileSpec.cpp; path = source/Utility/FileSpec.cpp; sourceTree = 
""; };
26FFC19314FC072100087D58 /* AuxVector.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = AuxVector.cpp; sourceTree = ""; };
26FFC19414FC072100087D58 /* AuxVector.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
AuxVector.h; sourceTree = ""; };
26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = DYLDRendezvous.cpp; sourceTree = ""; };
@@ -4181,6 +4181,8 @@
2682F168115ED9C800CCFF99 /* Utility */ = {
isa = PBXGroup;
children = (
+   26FA4315130103F400E71120 /* FileSpec.h */,
+   26FA43171301048600E71120 /* FileSpec.cpp */,
26CF992414428766001E4138 /* AnsiTerminal.h */,
26F996A7119B79C300412154 /* 
ARM_DWARF_Registers.h */,
264A12FF137252C700875C42 /* 
ARM64_DWARF_Registers.h */,
@@ -5032,7 +5034,6 @@
260C6EA013011578005E16B0 /* File.h */,
3FDFDDC0199D34E2009756A7 /* FileCache.h */,
3FDFDDBE199D345E009756A7 /* FileCache.cpp */,
-   26FA4315130103F400E71120 /* FileSpec.h */,
3FDFDDC1199D34E2009756A7 /* FileSystem.h */,
26BC7DD410F1B7D500F91463 /* Host.h */,
3FDFED1F19BA6D55009756A7 /* HostGetOpt.h */,
@@ -5857,7 +5858,6 @@
25420ED11A649D88009ADBCB /* PipeBase.cpp */,
26CFDCA2186163A4000E63E5 /* Editline.cpp */,
260C6EA213011581005E16B0 /* File.cpp */,
-   26FA43171301048600E71120 /* FileSpec.cpp */,
69A01E1C1236C5D400C660B5 /* Host.cpp */,
3FDFE53419A29327009756A7 /* HostInfoBase.cpp */,
3FDFED2419BA6D96009756A7 /* 
HostNativeThreadBase.cpp */,


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


[Lldb-commits] [lldb] r298561 - Delete some more dead includes.

2017-03-22 Thread Zachary Turner via lldb-commits
Author: zturner
Date: Wed Mar 22 18:33:16 2017
New Revision: 298561

URL: http://llvm.org/viewvc/llvm-project?rev=298561&view=rev
Log:
Delete some more dead includes.

This breaks the cycle between Target and PluginLanguageC++, reducing
the overall cycle count from 43 to 42.

Modified:
lldb/trunk/include/lldb/Interpreter/Args.h
lldb/trunk/source/Commands/CommandObjectArgs.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectHelp.h
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/source/Core/RegisterValue.cpp
lldb/trunk/source/Core/Scalar.cpp
lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/CommandHistory.cpp
lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp
lldb/trunk/source/Interpreter/OptionGroupFile.cpp
lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
lldb/trunk/source/Interpreter/OptionGroupString.cpp
lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp
lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
lldb/trunk/source/Interpreter/OptionValueString.cpp
lldb/trunk/source/Interpreter/Options.cpp

lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
lldb/trunk/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt

lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/trunk/source/Target/CMakeLists.txt
lldb/trunk/source/Target/LanguageRuntime.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/include/lldb/Interpreter/Args.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?rev=298561&r1=298560&r2=298561&view=diff
==
--- lldb/trunk/include/lldb/Interpreter/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Wed Mar 22 18:33:16 2017
@@ -21,13 +21,14 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringRef.h"
 // Project includes
-#include "lldb/Host/OptionParser.h"
 #include "lldb/Utility/Error.h"
 #include "lldb/lldb-private-types.h"
 #include "lldb/lldb-types.h"
 
 namespace lldb_private {
 
+struct Option;
+
 typedef std::vector> OptionArgVector;
 typedef std::shared_ptr OptionArgVectorSP;
 

Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=298561&r1=298560&r2=298561&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Wed Mar 22 18:33:16 2017
@@ -17,6 +17,7 @@
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Host/Host.h"
+#include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/Arg