[Lldb-commits] [lldb] r333299 - Fix typo in CMake comments

2018-05-25 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri May 25 11:59:21 2018
New Revision: 333299

URL: http://llvm.org/viewvc/llvm-project?rev=333299&view=rev
Log:
Fix typo in CMake comments

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=333299&r1=333298&r2=333299&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Fri May 25 11:59:21 2018
@@ -100,7 +100,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
 
   # Import CMake library targets from LLVM and Clang.
   
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
-  # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built 
together.
+  # cmake/clang/ClangConfig.cmake is not created when LLVM and Clang are built 
together.
   if (EXISTS 
"${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
 
include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
   endif()
@@ -112,7 +112,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
   # Next three include directories are needed when llvm-config is located in 
build directory.
-  # LLVM and Cland are assumed to be built together
+  # LLVM and Clang are assumed to be built together
   if (EXISTS "${LLVM_OBJ_ROOT}/include")
 include_directories("${LLVM_OBJ_ROOT}/include")
   endif()


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


[Lldb-commits] [lldb] r333304 - Move SystemInitializerFull header to source/API

2018-05-25 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri May 25 13:28:16 2018
New Revision: 04

URL: http://llvm.org/viewvc/llvm-project?rev=04&view=rev
Log:
Move SystemInitializerFull header to source/API

Summary:
It seems to me that files in include/lldb/API/ are headers that should
be exposed to liblldb users. Because SystemInitializerFull.h exposes details of
lldb_private, I think having it there is not the right thing to do. Since it's
only included from files in source/API, we should move it there and treat it as
private.

Reviewers: labath, clayborg

Reviewed By: labath, clayborg

Subscribers: lldb-commits

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

Added:
lldb/trunk/source/API/SystemInitializerFull.h
  - copied, changed from r333208, 
lldb/trunk/include/lldb/API/SystemInitializerFull.h
Removed:
lldb/trunk/include/lldb/API/SystemInitializerFull.h
Modified:
lldb/trunk/source/API/SBDebugger.cpp
lldb/trunk/source/API/SystemInitializerFull.cpp

Removed: lldb/trunk/include/lldb/API/SystemInitializerFull.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SystemInitializerFull.h?rev=03&view=auto
==
--- lldb/trunk/include/lldb/API/SystemInitializerFull.h (original)
+++ lldb/trunk/include/lldb/API/SystemInitializerFull.h (removed)
@@ -1,38 +0,0 @@
-//===-- SystemInitializerFull.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_API_SYSTEM_INITIALIZER_FULL_H
-#define LLDB_API_SYSTEM_INITIALIZER_FULL_H
-
-#include "lldb/Initialization/SystemInitializerCommon.h"
-
-namespace lldb_private {
-//--
-/// Initializes lldb.
-///
-/// This class is responsible for initializing all of lldb system
-/// services needed to use the full LLDB application.  This class is
-/// not intended to be used externally, but is instead used
-/// internally by SBDebugger to initialize the system.
-//--
-class SystemInitializerFull : public SystemInitializerCommon {
-public:
-  SystemInitializerFull();
-  ~SystemInitializerFull() override;
-
-  void Initialize() override;
-  void Terminate() override;
-
-private:
-  void InitializeSWIG();
-};
-
-} // namespace lldb_private
-
-#endif // LLDB_API_SYSTEM_INITIALIZER_FULL_H

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=04&r1=03&r2=04&view=diff
==
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Fri May 25 13:28:16 2018
@@ -11,6 +11,9 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
+
+#include "SystemInitializerFull.h"
+
 #include "lldb/API/SBDebugger.h"
 
 #include "lldb/lldb-private.h"
@@ -35,7 +38,6 @@
 #include "lldb/API/SBTypeNameSpecifier.h"
 #include "lldb/API/SBTypeSummary.h"
 #include "lldb/API/SBTypeSynthetic.h"
-#include "lldb/API/SystemInitializerFull.h"
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/PluginManager.h"

Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=04&r1=03&r2=04&view=diff
==
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Fri May 25 13:28:16 2018
@@ -11,7 +11,7 @@
 #include "Plugins/ScriptInterpreter/Python/lldb-python.h"
 #endif
 
-#include "lldb/API/SystemInitializerFull.h"
+#include "SystemInitializerFull.h"
 
 #include "lldb/API/SBCommandInterpreter.h"
 

Copied: lldb/trunk/source/API/SystemInitializerFull.h (from r333208, 
lldb/trunk/include/lldb/API/SystemInitializerFull.h)
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.h?p2=lldb/trunk/source/API/SystemInitializerFull.h&p1=lldb/trunk/include/lldb/API/SystemInitializerFull.h&r1=333208&r2=04&rev=04&view=diff
==
(empty)


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


[Lldb-commits] [lldb] r333322 - Fix Xcode build broken by SystemInitializerFull.h move

2018-05-25 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri May 25 16:21:07 2018
New Revision: 22

URL: http://llvm.org/viewvc/llvm-project?rev=22&view=rev
Log:
Fix Xcode build broken by SystemInitializerFull.h move

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=22&r1=21&r2=22&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri May 25 16:21:07 2018
@@ -2409,7 +2409,6 @@
3F8169181ABA2419001DA9DF /* NameMatches.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = NameMatches.cpp; path = source/Utility/NameMatches.cpp; sourceTree = 
""; };
3F81691C1ABA242B001DA9DF /* NameMatches.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NameMatches.h; 
path = include/lldb/Utility/NameMatches.h; sourceTree = ""; };
3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SystemInitializerFull.cpp; path = source/API/SystemInitializerFull.cpp; 
sourceTree = ""; };
-   3F81692D1ABB7A40001DA9DF /* SystemInitializerFull.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
SystemInitializerFull.h; path = include/lldb/API/SystemInitializerFull.h; 
sourceTree = ""; };
3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SystemInitializer.cpp; path = 
source/Initialization/SystemInitializer.cpp; sourceTree = ""; };
3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.cpp.cpp; name = SystemInitializerCommon.cpp; path = 
source/Initialization/SystemInitializerCommon.cpp; sourceTree = ""; };
3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SystemLifetimeManager.cpp; path = 
source/Initialization/SystemLifetimeManager.cpp; sourceTree = ""; };
@@ -3230,6 +3229,7 @@
B2B7CCED15D1BFB700EEFB57 /* WatchpointOptions.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
WatchpointOptions.h; path = include/lldb/Breakpoint/WatchpointOptions.h; 
sourceTree = ""; };
B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = WatchpointOptions.cpp; path = source/Breakpoint/WatchpointOptions.cpp; 
sourceTree = ""; };
B2D3033612EFA5C500F84EB3 /* InstructionUtils.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
InstructionUtils.h; path = Utility/InstructionUtils.h; sourceTree = ""; 
};
+   CDC75CF920B8D1DF002209BC /* SystemInitializerFull.h */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.h; name = 
SystemInitializerFull.h; path = source/API/SystemInitializerFull.h; sourceTree 
= ""; };
D67521351EA17C3900439694 /* MainLoop.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = MainLoop.cpp; sourceTree = ""; };
E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = GDBRemoteSignals.cpp; path = Utility/GDBRemoteSignals.cpp; sourceTree = 
""; };
E73A15A51B548EC500786197 /* GDBRemoteSignals.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
GDBRemoteSignals.h; path = Utility/GDBRemoteSignals.h; sourceTree = ""; 
};
@@ -4261,8 +4261,8 @@
94235B9B1A8D5FF300EB2EED /* 
SBVariablesOptions.cpp */,
B2A58721143119810092BFBA /* SBWatchpoint.h */,
B2A58723143119D50092BFBA /* SBWatchpoint.cpp */,
-   3F81692D1ABB7A40001DA9DF /* 
SystemInitializerFull.h */,
3F81692A1ABB7A16001DA9DF /* 
SystemInitializerFull.cpp */,
+   CDC75CF920B8D1DF002209BC /* 
SystemInitializerFull.h */,
);
name = API;
sourceTree = "";


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


[Lldb-commits] [lldb] r333444 - Remove lldb-private headers when building LLDB.framework with CMake

2018-05-29 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue May 29 11:09:09 2018
New Revision: 333444

URL: http://llvm.org/viewvc/llvm-project?rev=333444&view=rev
Log:
Remove lldb-private headers when building LLDB.framework with CMake

Summary:
Generating LLDB.framework when building with CMake+Ninja will copy the
lldb-private headers because public_headers contains them, even though we try
to make sure they don't get copied by removing root_private_headers from
root_public_headers.

This patch also removes SystemInitializerFull.h from the LLDB.framework headers 
when building with CMake.

Reviewers: compnerd, sas, labath, beanz, zturner

Reviewed By: labath

Subscribers: clayborg, mgorny, lldb-commits

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

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=333444&r1=333443&r2=333444&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Tue May 29 11:09:09 2018
@@ -162,8 +162,7 @@ if (LLDB_WRAP_PYTHON)
 endif()
 
 if(LLDB_BUILD_FRAMEWORK)
-  file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h)
+  file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h)
   file(GLOB root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h)
   file(GLOB root_private_headers 
${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h)
   list(REMOVE_ITEM root_public_headers ${root_private_headers})


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


[Lldb-commits] [lldb] r333777 - Add dependency on clang-headers when building LLDB.framework using CMake

2018-06-01 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jun  1 11:14:49 2018
New Revision: 333777

URL: http://llvm.org/viewvc/llvm-project?rev=333777&view=rev
Log:
Add dependency on clang-headers when building LLDB.framework using CMake

Summary:
The LLDB.framework generated when building with CMake + Ninja/Make is
completely missing the clang headers. Although the code to copy them exists, we
don't even generate them unless we're building LLDB standalone.

Reviewers: clayborg, labath, sas

Subscribers: mgorny, lldb-commits

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

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=333777&r1=333776&r2=333777&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Fri Jun  1 11:14:49 2018
@@ -187,6 +187,9 @@ if(LLDB_BUILD_FRAMEWORK)
 PUBLIC_HEADER "${framework_headers}")
 
   if(NOT IOS)
+if (NOT LLDB_BUILT_STANDALONE)
+  add_dependencies(liblldb clang-headers)
+endif()
 add_custom_command(TARGET liblldb POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
   COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Headers


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


[Lldb-commits] [lldb] r333968 - Change SWIG output directory when building LLDB.framework with CMake

2018-06-04 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Jun  4 16:47:36 2018
New Revision: 333968

URL: http://llvm.org/viewvc/llvm-project?rev=333968&view=rev
Log:
Change SWIG output directory when building LLDB.framework with CMake

Instead of assuming that SWIG generated files (e.g. lldb.py) will live
in scripts, we should set it to $LLDB_PYTHON_TARGET_DIR. This variable is set to
scripts, except when building LLDB.framework when it is set to
LLDB_FRAMEWORK_DIR.

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

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/scripts/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=333968&r1=333967&r2=333968&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Mon Jun  4 16:47:36 2018
@@ -138,7 +138,7 @@ if (NOT LLDB_DISABLE_PYTHON)
${PYTHON_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
--srcRoot=${LLDB_SOURCE_DIR}
--targetDir=${LLDB_PYTHON_TARGET_DIR}
-   --cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}/scripts
+   --cfgBldDir=${LLDB_PYTHON_TARGET_DIR}
--prefix=${CMAKE_BINARY_DIR}
--cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}
--lldbLibDir=lib${LLVM_LIBDIR_SUFFIX}
@@ -146,7 +146,7 @@ if (NOT LLDB_DISABLE_PYTHON)
${FINISH_EXTRA_ARGS}
 VERBATIM
 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
-DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/scripts/lldb.py
+DEPENDS ${LLDB_PYTHON_TARGET_DIR}/lldb.py
 COMMENT "Python script sym-linking LLDB Python API")
 # We depend on liblldb being built before we can do this step.
 add_dependencies(finish_swig liblldb lldb-argdumper)

Modified: lldb/trunk/scripts/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/CMakeLists.txt?rev=333968&r1=333967&r2=333968&view=diff
==
--- lldb/trunk/scripts/CMakeLists.txt (original)
+++ lldb/trunk/scripts/CMakeLists.txt Mon Jun  4 16:47:36 2018
@@ -35,7 +35,7 @@ get_filename_component(CFGBLDDIR ${LLDB_
 find_package(SWIG REQUIRED)
 add_custom_command(
   OUTPUT ${LLDB_WRAP_PYTHON}
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
+  OUTPUT ${LLDB_PYTHON_TARGET_DIR}/lldb.py
   DEPENDS ${SWIG_SOURCES}
   DEPENDS ${SWIG_INTERFACES}
   DEPENDS ${SWIG_HEADERS}


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


[Lldb-commits] [lldb] r334219 - Check for process_vm_readv using CheckSymbolExists

2018-06-07 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jun  7 12:53:25 2018
New Revision: 334219

URL: http://llvm.org/viewvc/llvm-project?rev=334219&view=rev
Log:
Check for process_vm_readv using CheckSymbolExists

Instead of checking if code compiles, I think it is a better to check
if the symbol exists. This is simpler and should do the same thing.

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

Modified:
lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake

Modified: lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake?rev=334219&r1=334218&r2=334219&view=diff
==
--- lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake Thu Jun  7 12:53:25 2018
@@ -14,14 +14,8 @@ check_cxx_symbol_exists(accept4 "sys/soc
 check_include_file(termios.h HAVE_TERMIOS_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
-check_cxx_source_compiles("
-  #include 
-  int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }"
-  HAVE_PROCESS_VM_READV)
-check_cxx_source_compiles("
-#include 
-int main() { return __NR_process_vm_readv; }"
-HAVE_NR_PROCESS_VM_READV)
+check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
+check_cxx_symbol_exists(__NR_process_vm_readv "sys/syscall.h" 
HAVE_NR_PROCESS_VM_READV)
 
 check_library_exists(compression compression_encode_buffer "" 
HAVE_LIBCOMPRESSION)
 


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


[Lldb-commits] [lldb] r334225 - Remove commented out line from top-level CMakeLists.txt

2018-06-07 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jun  7 13:17:46 2018
New Revision: 334225

URL: http://llvm.org/viewvc/llvm-project?rev=334225&view=rev
Log:
Remove commented out line from top-level CMakeLists.txt

Modified:
lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=334225&r1=334224&r2=334225&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Thu Jun  7 13:17:46 2018
@@ -42,7 +42,6 @@ if(LLDB_BUILD_FRAMEWORK)
 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
 endif()
 
-# add_subdirectory(include)
 add_subdirectory(docs)
 if (NOT LLDB_DISABLE_PYTHON)
   if(LLDB_USE_SYSTEM_SIX)


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


[Lldb-commits] [lldb] r334320 - Delete some dead code

2018-06-08 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jun  8 14:13:26 2018
New Revision: 334320

URL: http://llvm.org/viewvc/llvm-project?rev=334320&view=rev
Log:
Delete some dead code

Modified:
lldb/trunk/source/Host/macosx/Host.mm
lldb/trunk/tools/debugserver/source/RNBRemote.cpp
lldb/trunk/tools/driver/Driver.cpp

Modified: lldb/trunk/source/Host/macosx/Host.mm
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Host.mm?rev=334320&r1=334319&r2=334320&view=diff
==
--- lldb/trunk/source/Host/macosx/Host.mm (original)
+++ lldb/trunk/source/Host/macosx/Host.mm Fri Jun  8 14:13:26 2018
@@ -182,175 +182,6 @@ static bool WaitForProcessToSIGSTOP(cons
 }
 #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
 
-// static lldb::pid_t
-// LaunchInNewTerminalWithCommandFile
-//(
-//const char **argv,
-//const char **envp,
-//const char *working_dir,
-//const ArchSpec *arch_spec,
-//bool stop_at_entry,
-//bool disable_aslr
-//)
-//{
-//if (!argv || !argv[0])
-//return LLDB_INVALID_PROCESS_ID;
-//
-//OSStatus error = 0;
-//
-//FileSpec program (argv[0], false);
-//
-//
-//std::string unix_socket_name;
-//
-//char temp_file_path[PATH_MAX];
-//const char *tmpdir = ::getenv ("TMPDIR");
-//if (tmpdir == NULL)
-//tmpdir = "/tmp/";
-//::snprintf (temp_file_path, sizeof(temp_file_path), "%s%s-XX", 
tmpdir,
-//program.GetFilename().AsCString());
-//
-//if (::mktemp (temp_file_path) == NULL)
-//return LLDB_INVALID_PROCESS_ID;
-//
-//unix_socket_name.assign (temp_file_path);
-//
-//::strlcat (temp_file_path, ".command", sizeof (temp_file_path));
-//
-//StreamFile command_file;
-//command_file.GetFile().Open (temp_file_path,
-// File::eOpenOptionWrite |
-// File::eOpenOptionCanCreate,
-// lldb::eFilePermissionsDefault);
-//
-//if (!command_file.GetFile().IsValid())
-//return LLDB_INVALID_PROCESS_ID;
-//
-//FileSpec darwin_debug_file_spec;
-//if (!HostInfo::GetLLDBPath (ePathTypeSupportExecutableDir,
-//darwin_debug_file_spec))
-//return LLDB_INVALID_PROCESS_ID;
-//darwin_debug_file_spec.GetFilename().SetCString("darwin-debug");
-//
-//if (!darwin_debug_file_spec.Exists())
-//return LLDB_INVALID_PROCESS_ID;
-//
-//char launcher_path[PATH_MAX];
-//darwin_debug_file_spec.GetPath(launcher_path, sizeof(launcher_path));
-//command_file.Printf("\"%s\" ", launcher_path);
-//
-//command_file.Printf("--unix-socket=%s ", unix_socket_name.c_str());
-//
-//if (arch_spec && arch_spec->IsValid())
-//{
-//command_file.Printf("--arch=%s ", arch_spec->GetArchitectureName());
-//}
-//
-//if (disable_aslr)
-//{
-//command_file.PutCString("--disable-aslr ");
-//}
-//
-//command_file.PutCString("-- ");
-//
-//if (argv)
-//{
-//for (size_t i=0; argv[i] != NULL; ++i)
-//{
-//command_file.Printf("\"%s\" ", argv[i]);
-//}
-//}
-//command_file.PutCString("\necho Process exited with status $?\n");
-//command_file.GetFile().Close();
-//if (::chmod (temp_file_path, S_IRWXU | S_IRWXG) != 0)
-//return LLDB_INVALID_PROCESS_ID;
-//
-//CFCMutableDictionary cf_env_dict;
-//
-//const bool can_create = true;
-//if (envp)
-//{
-//for (size_t i=0; envp[i] != NULL; ++i)
-//{
-//const char *env_entry = envp[i];
-//const char *equal_pos = strchr(env_entry, '=');
-//if (equal_pos)
-//{
-//std::string env_key (env_entry, equal_pos);
-//std::string env_val (equal_pos + 1);
-//CFCString cf_env_key (env_key.c_str(), 
kCFStringEncodingUTF8);
-//CFCString cf_env_val (env_val.c_str(), 
kCFStringEncodingUTF8);
-//cf_env_dict.AddValue (cf_env_key.get(), cf_env_val.get(),
-//can_create);
-//}
-//}
-//}
-//
-//LSApplicationParameters app_params;
-//::memset (&app_params, 0, sizeof (app_params));
-//app_params.flags = kLSLaunchDontAddToRecents | kLSLaunchAsync;
-//app_params.argv = NULL;
-//app_params.environment = (CFDictionaryRef)cf_env_dict.get();
-//
-//CFCReleaser command_file_url
-//(::CFURLCreateFromFileSystemRepresentation (NULL,
-// 
  (const UInt8 *)temp_file_path,
-// 
  strlen(temp_file_path),
-// 
  false));
-//
-//CFCMutableArray urls;
-//
-//// Terminal.app will open the ".command" file we have created
-//// and run o

[Lldb-commits] [lldb] r334333 - Delete dead code in NativeProcessLinux

2018-06-08 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jun  8 15:14:29 2018
New Revision: 334333

URL: http://llvm.org/viewvc/llvm-project?rev=334333&view=rev
Log:
Delete dead code in NativeProcessLinux

As far as I can tell, this code has always been guarded by `#if 0`. If
this is useful code, it can be added back.

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

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=334333&r1=334332&r2=334333&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Fri Jun  8 
15:14:29 2018
@@ -1622,155 +1622,6 @@ Status NativeProcessLinux::GetSoftwareBr
   }
 }
 
-#if 0
-ProcessMessage::CrashReason
-NativeProcessLinux::GetCrashReasonForSIGSEGV(const siginfo_t *info)
-{
-ProcessMessage::CrashReason reason;
-assert(info->si_signo == SIGSEGV);
-
-reason = ProcessMessage::eInvalidCrashReason;
-
-switch (info->si_code)
-{
-default:
-assert(false && "unexpected si_code for SIGSEGV");
-break;
-case SI_KERNEL:
-// Linux will occasionally send spurious SI_KERNEL codes. (this is
-// poorly documented in sigaction) One way to get this is via unaligned
-// SIMD loads.
-reason = ProcessMessage::eInvalidAddress; // for lack of anything 
better
-break;
-case SEGV_MAPERR:
-reason = ProcessMessage::eInvalidAddress;
-break;
-case SEGV_ACCERR:
-reason = ProcessMessage::ePrivilegedAddress;
-break;
-}
-
-return reason;
-}
-#endif
-
-#if 0
-ProcessMessage::CrashReason
-NativeProcessLinux::GetCrashReasonForSIGILL(const siginfo_t *info)
-{
-ProcessMessage::CrashReason reason;
-assert(info->si_signo == SIGILL);
-
-reason = ProcessMessage::eInvalidCrashReason;
-
-switch (info->si_code)
-{
-default:
-assert(false && "unexpected si_code for SIGILL");
-break;
-case ILL_ILLOPC:
-reason = ProcessMessage::eIllegalOpcode;
-break;
-case ILL_ILLOPN:
-reason = ProcessMessage::eIllegalOperand;
-break;
-case ILL_ILLADR:
-reason = ProcessMessage::eIllegalAddressingMode;
-break;
-case ILL_ILLTRP:
-reason = ProcessMessage::eIllegalTrap;
-break;
-case ILL_PRVOPC:
-reason = ProcessMessage::ePrivilegedOpcode;
-break;
-case ILL_PRVREG:
-reason = ProcessMessage::ePrivilegedRegister;
-break;
-case ILL_COPROC:
-reason = ProcessMessage::eCoprocessorError;
-break;
-case ILL_BADSTK:
-reason = ProcessMessage::eInternalStackError;
-break;
-}
-
-return reason;
-}
-#endif
-
-#if 0
-ProcessMessage::CrashReason
-NativeProcessLinux::GetCrashReasonForSIGFPE(const siginfo_t *info)
-{
-ProcessMessage::CrashReason reason;
-assert(info->si_signo == SIGFPE);
-
-reason = ProcessMessage::eInvalidCrashReason;
-
-switch (info->si_code)
-{
-default:
-assert(false && "unexpected si_code for SIGFPE");
-break;
-case FPE_INTDIV:
-reason = ProcessMessage::eIntegerDivideByZero;
-break;
-case FPE_INTOVF:
-reason = ProcessMessage::eIntegerOverflow;
-break;
-case FPE_FLTDIV:
-reason = ProcessMessage::eFloatDivideByZero;
-break;
-case FPE_FLTOVF:
-reason = ProcessMessage::eFloatOverflow;
-break;
-case FPE_FLTUND:
-reason = ProcessMessage::eFloatUnderflow;
-break;
-case FPE_FLTRES:
-reason = ProcessMessage::eFloatInexactResult;
-break;
-case FPE_FLTINV:
-reason = ProcessMessage::eFloatInvalidOperation;
-break;
-case FPE_FLTSUB:
-reason = ProcessMessage::eFloatSubscriptRange;
-break;
-}
-
-return reason;
-}
-#endif
-
-#if 0
-ProcessMessage::CrashReason
-NativeProcessLinux::GetCrashReasonForSIGBUS(const siginfo_t *info)
-{
-ProcessMessage::CrashReason reason;
-assert(info->si_signo == SIGBUS);
-
-reason = ProcessMessage::eInvalidCrashReason;
-
-switch (info->si_code)
-{
-default:
-assert(false && "unexpected si_code for SIGBUS");
-break;
-case BUS_ADRALN:
-reason = ProcessMessage::eIllegalAlignment;
-break;
-case BUS_ADRERR:
-reason = ProcessMessage::eIllegalAddress;
-break;
-case BUS_OBJERR:
-reason = ProcessMessage::eHardwareError;
-break;
-}
-
-return reason;
-}
-#endif
-
 Status NativeProcessLinux::ReadMemory(lldb::addr_t addr, void *buf, size_t 
size,
   size_t &bytes_read) {
   if (ProcessVmReadvSupported()) {


___
lldb-co

[Lldb-commits] [lldb] r334336 - Remove more dead code from NativeProcessLinux

2018-06-08 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jun  8 15:28:41 2018
New Revision: 334336

URL: http://llvm.org/viewvc/llvm-project?rev=334336&view=rev
Log:
Remove more dead code from NativeProcessLinux

This should have been removed in r334333.

Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h?rev=334336&r1=334335&r2=334336&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h Fri Jun  8 
15:28:41 2018
@@ -184,20 +184,6 @@ private:
 
   Status SetupSoftwareSingleStepping(NativeThreadLinux &thread);
 
-#if 0
-static ::ProcessMessage::CrashReason
-GetCrashReasonForSIGSEGV(const siginfo_t *info);
-
-static ::ProcessMessage::CrashReason
-GetCrashReasonForSIGILL(const siginfo_t *info);
-
-static ::ProcessMessage::CrashReason
-GetCrashReasonForSIGFPE(const siginfo_t *info);
-
-static ::ProcessMessage::CrashReason
-GetCrashReasonForSIGBUS(const siginfo_t *info);
-#endif
-
   bool HasThreadNoLock(lldb::tid_t thread_id);
 
   bool StopTrackingThread(lldb::tid_t thread_id);


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


[Lldb-commits] [lldb] r334968 - Introduce lldb-framework CMake target and centralize its logic

2018-06-18 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Jun 18 11:27:16 2018
New Revision: 334968

URL: http://llvm.org/viewvc/llvm-project?rev=334968&view=rev
Log:
Introduce lldb-framework CMake target and centralize its logic

Summary:
In this patch I aim to do the following:

1) Create an lldb-framework target that acts as the target that handles 
generating LLDB.framework. Previously, liblldb acted as the target for 
generating the framework in addition to generating the actual lldb library. 
This made the target feel overloaded.
2) Centralize framework generation as much as it makes sense to do so.
3) Create a target lldb-suite, which depends on every tool and library that 
makes liblldb fully functional. One result of having this target is it makes 
tracking dependencies much clearer.

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

Added:
lldb/trunk/cmake/modules/LLDBFramework.cmake
Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/AddLLDB.cmake
lldb/trunk/source/API/CMakeLists.txt
lldb/trunk/tools/argdumper/CMakeLists.txt
lldb/trunk/tools/darwin-debug/CMakeLists.txt
lldb/trunk/tools/debugserver/source/CMakeLists.txt
lldb/trunk/tools/driver/CMakeLists.txt
lldb/trunk/tools/lldb-server/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=334968&r1=334967&r2=334968&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Mon Jun 18 11:27:16 2018
@@ -37,7 +37,18 @@ if(APPLE)
   add_definitions(-DLLDB_USE_OS_LOG)
 endif()
 
+# lldb-suite is a dummy target that encompasses all the necessary tools and
+# libraries for building a fully-functioning liblldb.
+add_custom_target(lldb-suite)
+
+option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
 if(LLDB_BUILD_FRAMEWORK)
+  if (CMAKE_VERSION VERSION_LESS 3.7)
+message(FATAL_ERROR "LLDB_BUILD_FRAMEWORK is not supported on CMake < 3.7")
+  endif()
+  if (NOT APPLE)
+message(FATAL_ERROR "LLDB.framework can only be generated when targeting 
Apple platforms")
+  endif()
   set(LLDB_FRAMEWORK_DIR
 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
 endif()
@@ -129,6 +140,12 @@ if(LLDB_INCLUDE_TESTS)
   add_subdirectory(utils/lldb-dotest)
 endif()
 
+if (LLDB_BUILD_FRAMEWORK)
+  add_custom_target(lldb-framework)
+  include(LLDBFramework)
+  add_dependencies(lldb-suite lldb-framework)
+endif()
+
 if (NOT LLDB_DISABLE_PYTHON)
 # Add a Post-Build Event to copy over Python files and create the symlink
 # to liblldb.so for the Python API(hardlink on Windows)
@@ -147,8 +164,9 @@ if (NOT LLDB_DISABLE_PYTHON)
 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
 DEPENDS ${LLDB_PYTHON_TARGET_DIR}/lldb.py
 COMMENT "Python script sym-linking LLDB Python API")
-# We depend on liblldb being built before we can do this step.
-add_dependencies(finish_swig liblldb lldb-argdumper)
+
+# We depend on liblldb and lldb-argdumper being built before we can do 
this step.
+add_dependencies(finish_swig lldb-suite)
 
 # If we build the readline module, we depend on that happening
 # first.
@@ -159,8 +177,8 @@ if (NOT LLDB_DISABLE_PYTHON)
 # Ensure we do the python post-build step when building lldb.
 add_dependencies(lldb finish_swig)
 
-if(LLDB_BUILD_FRAMEWORK)
-  # The target to install libLLDB needs to depend on finish swig so that 
the
+if (LLDB_BUILD_FRAMEWORK)
+  # The target to install libLLDB needs to depend on finish_swig so that 
the
   # framework build properly copies over the Python files.
   add_dependencies(install-liblldb finish_swig)
 endif()

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=334968&r1=334967&r2=334968&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Mon Jun 18 11:27:16 2018
@@ -86,7 +86,7 @@ endfunction(add_lldb_library)
 
 function(add_lldb_executable name)
   cmake_parse_arguments(ARG
-"INCLUDE_IN_FRAMEWORK;GENERATE_INSTALL"
+"INCLUDE_IN_SUITE;GENERATE_INSTALL"
 ""
 "LINK_LIBS;LINK_COMPONENTS"
 ${ARGN}
@@ -99,8 +99,9 @@ function(add_lldb_executable name)
   set_target_properties(${name} PROPERTIES
 FOLDER "lldb executables")
 
-  if(LLDB_BUILD_FRAMEWORK)
-if(ARG_INCLUDE_IN_FRAMEWORK)
+  if(ARG_INCLUDE_IN_SUITE)
+add_dependencies(lldb-suite ${name})
+if(LLDB_BUILD_FRAMEWORK)
   if(NOT IOS)
 set(resource_dir "/Resources")
 set(resource_dots "../")
@@ -122,14 +123,16 @@ function(add_lldb_executable name)
 add_custom_target(install-${name}-stripped DEPENDS ${name})
 add_dependencies(install-liblldb-stripped ${name})
   

[Lldb-commits] [lldb] r335014 - Fix up Info.plist when building LLDB.framework with CMake

2018-06-18 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Jun 18 19:59:30 2018
New Revision: 335014

URL: http://llvm.org/viewvc/llvm-project?rev=335014&view=rev
Log:
Fix up Info.plist when building LLDB.framework with CMake

Summary:
We weren't using the Info.plist template in resources previously.
When using that template, some of the key's values weren't being populated
because some variables were not being defined. In one case, CMake didn't
like the substring expansion syntax of CFBundleIdentifier so I got rid of that.

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

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/resources/LLDB-Info.plist

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=335014&r1=335013&r2=335014&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Mon Jun 18 19:59:30 2018
@@ -49,6 +49,13 @@ if(LLDB_BUILD_FRAMEWORK)
   if (NOT APPLE)
 message(FATAL_ERROR "LLDB.framework can only be generated when targeting 
Apple platforms")
   endif()
+
+  # These are used to fill out LLDB-Info.plist. These are relevant when 
building
+  # the framework, and must be defined before building liblldb.
+  set(PRODUCT_NAME "LLDB")
+  set(EXECUTABLE_NAME "LLDB")
+  set(CURRENT_PROJECT_VERSION "360.99.0")
+
   set(LLDB_FRAMEWORK_DIR
 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
 endif()

Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=335014&r1=335013&r2=335014&view=diff
==
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Mon Jun 18 19:59:30 2018
@@ -36,6 +36,7 @@ set_target_properties(liblldb PROPERTIES
   OUTPUT_NAME LLDB
   FRAMEWORK On
   FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}
+  MACOSX_FRAMEWORK_INFO_PLIST ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist
   LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}
   PUBLIC_HEADER "${framework_headers}")
 

Modified: lldb/trunk/resources/LLDB-Info.plist
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/resources/LLDB-Info.plist?rev=335014&r1=335013&r2=335014&view=diff
==
--- lldb/trunk/resources/LLDB-Info.plist (original)
+++ lldb/trunk/resources/LLDB-Info.plist Mon Jun 18 19:59:30 2018
@@ -7,7 +7,7 @@
CFBundleExecutable
${EXECUTABLE_NAME}
CFBundleIdentifier
-   com.apple.${PRODUCT_NAME:rfc1034identifier}.framework
+   com.apple.${PRODUCT_NAME}.framework
CFBundleInfoDictionaryVersion
6.0
CFBundlePackageType


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


[Lldb-commits] [lldb] r336395 - [CMake] Simplify a few framework build rules

2018-07-05 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jul  5 15:16:15 2018
New Revision: 336395

URL: http://llvm.org/viewvc/llvm-project?rev=336395&view=rev
Log:
[CMake] Simplify a few framework build rules

Modified:
lldb/trunk/cmake/modules/LLDBFramework.cmake

Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=336395&r1=336394&r2=336395&view=diff
==
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Thu Jul  5 15:16:15 2018
@@ -22,8 +22,8 @@ if (NOT IOS)
   endif()
   add_custom_command(TARGET lldb-framework POST_BUILD
 COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
-COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Headers
-COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} 
${CMAKE_BINARY_DIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/Current
+COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
+COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
 COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} 
$/Resources/Clang
   )
 else()


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


[Lldb-commits] [lldb] r337202 - [CMake] Give lldb tools functional install targets when building LLDB.framework

2018-07-16 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Jul 16 12:19:56 2018
New Revision: 337202

URL: http://llvm.org/viewvc/llvm-project?rev=337202&view=rev
Log:
[CMake] Give lldb tools functional install targets when building LLDB.framework

Summary:
This change makes the install targets for lldb tools functional when
building for the framework.

I am currently working on the install rules for lldb-framework and this will
let me make `install-lldb-framework` rely on `install-lldb-argdumper` for
instance. This is especially important for `install-lldb-framework-stripped`. It
is much better for `install-lldb-framework-stripped` to rely on
`install-lldb-argdumper-stripped` than to copy and strip lldb-argdumper
manually.

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

Modified:
lldb/trunk/cmake/modules/AddLLDB.cmake

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=337202&r1=337201&r2=337202&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Mon Jul 16 12:19:56 2018
@@ -111,18 +111,6 @@ function(add_lldb_executable name)
 RUNTIME_OUTPUT_DIRECTORY $${resource_dir}
 BUILD_WITH_INSTALL_RPATH On
 INSTALL_RPATH 
"@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}")
-  # For things inside the framework we don't need functional install 
targets
-  # because CMake copies the resources and headers from the build 
directory.
-  # But we still need this target to exist in order to use the
-  # LLVM_DISTRIBUTION_COMPONENTS build option. We also need the
-  # install-liblldb target to depend on this tool, so that it gets put into
-  # the Resources directory before the framework is installed.
-  if(ARG_GENERATE_INSTALL)
-add_custom_target(install-${name} DEPENDS ${name})
-add_dependencies(install-liblldb ${name})
-add_custom_target(install-${name}-stripped DEPENDS ${name})
-add_dependencies(install-liblldb-stripped ${name})
-  endif()
 endif()
   endif()
 
@@ -132,10 +120,14 @@ function(add_lldb_executable name)
   INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}")
   endif()
 
-  if(ARG_GENERATE_INSTALL AND NOT (ARG_INCLUDE_IN_SUITE AND 
LLDB_BUILD_FRAMEWORK ))
+  if(ARG_GENERATE_INSTALL)
+set(out_dir "bin")
+if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE)
+  set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR})
+endif()
 install(TARGETS ${name}
   COMPONENT ${name}
-  RUNTIME DESTINATION bin)
+  RUNTIME DESTINATION ${out_dir})
 if (NOT CMAKE_CONFIGURATION_TYPES)
   add_llvm_install_targets(install-${name}
DEPENDS ${name}


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


[Lldb-commits] [lldb] r337311 - Invert dependency between lldb-framework and lldb-suite

2018-07-17 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Jul 17 11:28:51 2018
New Revision: 337311

URL: http://llvm.org/viewvc/llvm-project?rev=337311&view=rev
Log:
Invert dependency between lldb-framework and lldb-suite

Summary:
Currently, if you build lldb-framework the entire framework doesn't
actually build. In order to build the entire framework, you need to actually
build lldb-suite. This abstraction doesn't feel quite right because
lldb-framework truly does depend on lldb-suite (liblldb + related tools).

In this change I want to invert their dependency. This will mean that lldb and
finish_swig will depend on lldb-framework in a framework build, and lldb-suite
otherwise. Instead of adding conditional logic everywhere to handle this, I
introduce LLDB_SUITE_TARGET to handle it.

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

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/source/API/CMakeLists.txt
lldb/trunk/tools/driver/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Tue Jul 17 11:28:51 2018
@@ -40,6 +40,7 @@ endif()
 # lldb-suite is a dummy target that encompasses all the necessary tools and
 # libraries for building a fully-functioning liblldb.
 add_custom_target(lldb-suite)
+set(LLDB_SUITE_TARGET lldb-suite)
 
 option(LLDB_BUILD_FRAMEWORK "Build the Darwin LLDB.framework" Off)
 if(LLDB_BUILD_FRAMEWORK)
@@ -55,6 +56,7 @@ if(LLDB_BUILD_FRAMEWORK)
   set(PRODUCT_NAME "LLDB")
   set(EXECUTABLE_NAME "LLDB")
   set(CURRENT_PROJECT_VERSION "360.99.0")
+  set(LLDB_SUITE_TARGET lldb-framework)
 
   set(LLDB_FRAMEWORK_DIR
 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
@@ -163,9 +165,7 @@ endif()
 if (LLDB_BUILD_FRAMEWORK)
   add_custom_target(lldb-framework)
   include(LLDBFramework)
-  add_dependencies(lldb-suite lldb-framework)
 endif()
-add_dependencies(lldb-suite liblldb)
 
 if (NOT LLDB_DISABLE_PYTHON)
 # Add a Post-Build Event to copy over Python files and create the symlink
@@ -187,7 +187,7 @@ if (NOT LLDB_DISABLE_PYTHON)
 COMMENT "Python script sym-linking LLDB Python API")
 
 # We depend on liblldb and lldb-argdumper being built before we can do 
this step.
-add_dependencies(finish_swig lldb-suite)
+add_dependencies(finish_swig ${LLDB_SUITE_TARGET})
 
 # If we build the readline module, we depend on that happening
 # first.

Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=337311&r1=337310&r2=337311&view=diff
==
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Tue Jul 17 11:28:51 2018
@@ -41,5 +41,5 @@ set_target_properties(liblldb PROPERTIES
   PUBLIC_HEADER "${framework_headers}")
 
 add_dependencies(lldb-framework
-  liblldb
-  lldb-framework-headers)
+  lldb-framework-headers
+  lldb-suite)

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Tue Jul 17 11:28:51 2018
@@ -91,6 +91,8 @@ add_lldb_library(liblldb SHARED
 Support
   )
 
+add_dependencies(lldb-suite liblldb)
+
 if (MSVC)
   set_property(SOURCE ${LLDB_WRAP_PYTHON} APPEND_STRING PROPERTY COMPILE_FLAGS 
" /W0")
 else()
@@ -111,7 +113,7 @@ endif ()
 set_target_properties(liblldb
   PROPERTIES
   VERSION ${LLDB_VERSION}
-  )
+)
 
 if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
   if (NOT LLDB_EXPORT_ALL_SYMBOLS)
@@ -138,7 +140,7 @@ else()
   set_target_properties(liblldb
 PROPERTIES
 OUTPUT_NAME lldb
-)
+  )
 endif()
 
 if (LLDB_WRAP_PYTHON)

Modified: lldb/trunk/tools/driver/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/CMakeLists.txt?rev=337311&r1=337310&r2=337311&view=diff
==
--- lldb/trunk/tools/driver/CMakeLists.txt (original)
+++ lldb/trunk/tools/driver/CMakeLists.txt Tue Jul 17 11:28:51 2018
@@ -24,4 +24,4 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows"
   add_definitions( -DIMPORT_LIBLLDB )
 endif()
 
-add_dependencies(lldb lldb-suite)
+add_dependencies(lldb ${LLDB_SUITE_TARGET})


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


[Lldb-commits] [lldb] r338058 - Make framework-header-fix process copied headers

2018-07-26 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jul 26 12:04:46 2018
New Revision: 338058

URL: http://llvm.org/viewvc/llvm-project?rev=338058&view=rev
Log:
Make framework-header-fix process copied headers

Summary:
Previously the framework-header-fix script would change the sources
before they were copied, leading to unnecessary rebuilds on repeat
`ninja lldb` invocations. This runs the script on the headers after
they're copied into the produced LLDB.framework, meaning it doesn't
affect any files being built.

Patch by Keith Smiley !

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

Modified:
lldb/trunk/cmake/modules/LLDBFramework.cmake

Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=338058&r1=338057&r2=338058&view=diff
==
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Thu Jul 26 12:04:46 2018
@@ -12,24 +12,21 @@ foreach(header
  COMMAND ${CMAKE_COMMAND} -E copy ${header} 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
+
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
$/Headers ${LLDB_VERSION}
+)
 
 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
 add_dependencies(lldb-framework clang-headers)
   endif()
   add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} 
${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
 COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/clang/${LLDB_VERSION} 
$/Resources/Clang
   )
-else()
-  add_custom_command(TARGET lldb-framework POST_BUILD
-COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
-  )
 endif()
 
 set_target_properties(liblldb PROPERTIES
@@ -41,5 +38,4 @@ set_target_properties(liblldb PROPERTIES
   PUBLIC_HEADER "${framework_headers}")
 
 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)


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


[Lldb-commits] [lldb] r338074 - Add back lldb-framework-headers target

2018-07-26 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jul 26 14:55:14 2018
New Revision: 338074

URL: http://llvm.org/viewvc/llvm-project?rev=338074&view=rev
Log:
Add back lldb-framework-headers target

In r338058 we removed the target `lldb-framework-headers`, which mean
lldb-framework no longer depended on `framework_headers`, so they never
actually got generated. This is a partial revert of r338058: I added
back the lldb-framework-headers target, but the framework-header-fix.sh
script still runs on the copied headers.

Modified:
lldb/trunk/cmake/modules/LLDBFramework.cmake

Modified: lldb/trunk/cmake/modules/LLDBFramework.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBFramework.cmake?rev=338074&r1=338073&r2=338074&view=diff
==
--- lldb/trunk/cmake/modules/LLDBFramework.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBFramework.cmake Thu Jul 26 14:55:14 2018
@@ -13,6 +13,8 @@ foreach(header
   list(APPEND framework_headers 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
 
+add_custom_target(lldb-framework-headers DEPENDS ${framework_headers})
+
 add_custom_command(TARGET lldb-framework POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E copy_directory 
${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $/Headers
   COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh 
$/Headers ${LLDB_VERSION}
@@ -38,4 +40,5 @@ set_target_properties(liblldb PROPERTIES
   PUBLIC_HEADER "${framework_headers}")
 
 add_dependencies(lldb-framework
+  lldb-framework-headers
   lldb-suite)


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


[Lldb-commits] [lldb] r338154 - Stop building liblldb with CMake's framework functionality

2018-07-27 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jul 27 12:41:17 2018
New Revision: 338154

URL: http://llvm.org/viewvc/llvm-project?rev=338154&view=rev
Log:
Stop building liblldb with CMake's framework functionality

Summary:
CMake has a bug in its ninja generator that prevents you from
installing targets that are built with framework support. Therefore, I want to
not rely on CMake's framework support.
See https://gitlab.kitware.com/cmake/cmake/issues/18216

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

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/AddLLDB.cmake
lldb/trunk/cmake/modules/LLDBConfig.cmake
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/scripts/CMakeLists.txt
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=338154&r1=338153&r2=338154&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Fri Jul 27 12:41:17 2018
@@ -51,15 +51,16 @@ if(LLDB_BUILD_FRAMEWORK)
 message(FATAL_ERROR "LLDB.framework can only be generated when targeting 
Apple platforms")
   endif()
 
+  add_custom_target(lldb-framework)
+  set(LLDB_SUITE_TARGET lldb-framework)
+  set(LLDB_FRAMEWORK_DIR
+
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework)
   # These are used to fill out LLDB-Info.plist. These are relevant when 
building
   # the framework, and must be defined before building liblldb.
   set(PRODUCT_NAME "LLDB")
   set(EXECUTABLE_NAME "LLDB")
   set(CURRENT_PROJECT_VERSION "360.99.0")
-  set(LLDB_SUITE_TARGET lldb-framework)
-
-  set(LLDB_FRAMEWORK_DIR
-${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
+  include(LLDBFramework)
 endif()
 
 add_subdirectory(docs)
@@ -71,7 +72,7 @@ if (NOT LLDB_DISABLE_PYTHON)
   set(LLDB_PYTHON_TARGET_DIR ${LLDB_BINARY_DIR}/scripts)
   set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp)
   if(LLDB_BUILD_FRAMEWORK)
-set(LLDB_PYTHON_TARGET_DIR ${LLDB_FRAMEWORK_DIR})
+set(LLDB_PYTHON_TARGET_DIR "${LLDB_FRAMEWORK_DIR}/..")
 set(LLDB_WRAP_PYTHON ${LLDB_PYTHON_TARGET_DIR}/LLDBWrapPython.cpp)
   else()
 # Don't set -m when building the framework.
@@ -162,11 +163,6 @@ if(LLDB_INCLUDE_TESTS)
   add_subdirectory(utils/lldb-dotest)
 endif()
 
-if (LLDB_BUILD_FRAMEWORK)
-  add_custom_target(lldb-framework)
-  include(LLDBFramework)
-endif()
-
 if (NOT LLDB_DISABLE_PYTHON)
 # Add a Post-Build Event to copy over Python files and create the symlink
 # to liblldb.so for the Python API(hardlink on Windows)

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=338154&r1=338153&r2=338154&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Fri Jul 27 12:41:17 2018
@@ -52,7 +52,7 @@ function(add_lldb_library name)
   if (PARAM_SHARED)
 set(out_dir lib${LLVM_LIBDIR_SUFFIX})
 if(${name} STREQUAL "liblldb" AND LLDB_BUILD_FRAMEWORK)
-  set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR})
+  set(out_dir 
${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION})
 endif()
 install(TARGETS ${name}
   COMPONENT ${name}
@@ -108,7 +108,7 @@ function(add_lldb_executable name)
   endif()
   string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR})
   set_target_properties(${name} PROPERTIES
-RUNTIME_OUTPUT_DIRECTORY $${resource_dir}
+RUNTIME_OUTPUT_DIRECTORY 
${LLDB_FRAMEWORK_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR}
 BUILD_WITH_INSTALL_RPATH On
 INSTALL_RPATH 
"@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}")
 endif()
@@ -123,7 +123,7 @@ function(add_lldb_executable name)
   if(ARG_GENERATE_INSTALL)
 set(out_dir "bin")
 if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE)
-  set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR})
+  set(out_dir 
${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/${LLDB_FRAMEWORK_RESOURCE_DIR})
 endif()
 install(TARGETS ${name}
   COMPONENT ${name}

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=338154&r1=338153&r2=338154&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Fri Jul 27 12:41:17 2018
@@ -326,7 +326,9 @@ if (APPLE)
   set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Output 
directory for LLDB.framework")
   set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework vers

[Lldb-commits] [lldb] r338178 - Revert "Stop building liblldb with CMake's framework functionality"

2018-07-27 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jul 27 16:38:58 2018
New Revision: 338178

URL: http://llvm.org/viewvc/llvm-project?rev=338178&view=rev
Log:
Revert "Stop building liblldb with CMake's framework functionality"

This reverts r338154. This change is actually unnecessary, as the CMake
bug I referred to was actually not a bug but a misunderstanding of
CMake.

Original Differential Revision: https://reviews.llvm.org/D49888

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/AddLLDB.cmake
lldb/trunk/cmake/modules/LLDBConfig.cmake
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/scripts/CMakeLists.txt
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=338178&r1=338177&r2=338178&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Fri Jul 27 16:38:58 2018
@@ -51,16 +51,15 @@ if(LLDB_BUILD_FRAMEWORK)
 message(FATAL_ERROR "LLDB.framework can only be generated when targeting 
Apple platforms")
   endif()
 
-  add_custom_target(lldb-framework)
-  set(LLDB_SUITE_TARGET lldb-framework)
-  set(LLDB_FRAMEWORK_DIR
-
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework)
   # These are used to fill out LLDB-Info.plist. These are relevant when 
building
   # the framework, and must be defined before building liblldb.
   set(PRODUCT_NAME "LLDB")
   set(EXECUTABLE_NAME "LLDB")
   set(CURRENT_PROJECT_VERSION "360.99.0")
-  include(LLDBFramework)
+  set(LLDB_SUITE_TARGET lldb-framework)
+
+  set(LLDB_FRAMEWORK_DIR
+${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
 endif()
 
 add_subdirectory(docs)
@@ -72,7 +71,7 @@ if (NOT LLDB_DISABLE_PYTHON)
   set(LLDB_PYTHON_TARGET_DIR ${LLDB_BINARY_DIR}/scripts)
   set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp)
   if(LLDB_BUILD_FRAMEWORK)
-set(LLDB_PYTHON_TARGET_DIR "${LLDB_FRAMEWORK_DIR}/..")
+set(LLDB_PYTHON_TARGET_DIR ${LLDB_FRAMEWORK_DIR})
 set(LLDB_WRAP_PYTHON ${LLDB_PYTHON_TARGET_DIR}/LLDBWrapPython.cpp)
   else()
 # Don't set -m when building the framework.
@@ -163,6 +162,11 @@ if(LLDB_INCLUDE_TESTS)
   add_subdirectory(utils/lldb-dotest)
 endif()
 
+if (LLDB_BUILD_FRAMEWORK)
+  add_custom_target(lldb-framework)
+  include(LLDBFramework)
+endif()
+
 if (NOT LLDB_DISABLE_PYTHON)
 # Add a Post-Build Event to copy over Python files and create the symlink
 # to liblldb.so for the Python API(hardlink on Windows)

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=338178&r1=338177&r2=338178&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Fri Jul 27 16:38:58 2018
@@ -52,7 +52,7 @@ function(add_lldb_library name)
   if (PARAM_SHARED)
 set(out_dir lib${LLVM_LIBDIR_SUFFIX})
 if(${name} STREQUAL "liblldb" AND LLDB_BUILD_FRAMEWORK)
-  set(out_dir 
${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION})
+  set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR})
 endif()
 install(TARGETS ${name}
   COMPONENT ${name}
@@ -108,7 +108,7 @@ function(add_lldb_executable name)
   endif()
   string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR})
   set_target_properties(${name} PROPERTIES
-RUNTIME_OUTPUT_DIRECTORY 
${LLDB_FRAMEWORK_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR}
+RUNTIME_OUTPUT_DIRECTORY $${resource_dir}
 BUILD_WITH_INSTALL_RPATH On
 INSTALL_RPATH 
"@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}")
 endif()
@@ -123,7 +123,7 @@ function(add_lldb_executable name)
   if(ARG_GENERATE_INSTALL)
 set(out_dir "bin")
 if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE)
-  set(out_dir 
${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/${LLDB_FRAMEWORK_RESOURCE_DIR})
+  set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR})
 endif()
 install(TARGETS ${name}
   COMPONENT ${name}

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=338178&r1=338177&r2=338178&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Fri Jul 27 16:38:58 2018
@@ -326,9 +326,7 @@ if (APPLE)
   set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Output 
directory for LLDB.framework")
   set(LLDB_FRAMEWORK_VERSION A CACHE STRING "LLDB.framework version (default 
is A)")
   set(LLDB_FRAMEWORK_RESOURCE_DIR
-Versions/${LLDB_FRA

[Lldb-commits] [lldb] r338594 - Introduce install-lldb-framework target

2018-08-01 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Wed Aug  1 10:21:18 2018
New Revision: 338594

URL: http://llvm.org/viewvc/llvm-project?rev=338594&view=rev
Log:
Introduce install-lldb-framework target

Summary:
Previously, I thought that install-liblldb would fail because CMake had
a bug related to installing frameworks. In actuality, I misunderstood the
semantics of `add_custom_target`: the DEPENDS option refers to specific files,
not targets. Therefore `install-liblldb` should rely on the actual liblldb
getting generated rather than the target.

This means that the previous patch I committed (to stop relying on CMake's
framework support) is no longer needed and has been reverted. Using CMake's
framework support greatly simplifies the implementation.

`install-lldb-framework` (and the stripped variant) is as simple as
depending on `install-liblldb` because CMake knows that liblldb was built as a
framework and will install the whole framework for you. The stripped variant
will depend on the stripped variants of individual tools only to ensure they
actually are stripped as well.

Reviewers: labath, sas

Subscribers: mgorny, lldb-commits

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

Modified:
lldb/trunk/CMakeLists.txt
lldb/trunk/cmake/modules/AddLLDB.cmake
lldb/trunk/cmake/modules/LLDBFramework.cmake
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=338594&r1=338593&r2=338594&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Wed Aug  1 10:21:18 2018
@@ -51,6 +51,7 @@ if(LLDB_BUILD_FRAMEWORK)
 message(FATAL_ERROR "LLDB.framework can only be generated when targeting 
Apple platforms")
   endif()
 
+  add_custom_target(lldb-framework)
   # These are used to fill out LLDB-Info.plist. These are relevant when 
building
   # the framework, and must be defined before building liblldb.
   set(PRODUCT_NAME "LLDB")
@@ -60,6 +61,7 @@ if(LLDB_BUILD_FRAMEWORK)
 
   set(LLDB_FRAMEWORK_DIR
 ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_FRAMEWORK_INSTALL_DIR})
+  include(LLDBFramework)
 endif()
 
 add_subdirectory(docs)
@@ -162,10 +164,6 @@ if(LLDB_INCLUDE_TESTS)
   add_subdirectory(utils/lldb-dotest)
 endif()
 
-if (LLDB_BUILD_FRAMEWORK)
-  add_custom_target(lldb-framework)
-  include(LLDBFramework)
-endif()
 
 if (NOT LLDB_DISABLE_PYTHON)
 # Add a Post-Build Event to copy over Python files and create the symlink

Modified: lldb/trunk/cmake/modules/AddLLDB.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/AddLLDB.cmake?rev=338594&r1=338593&r2=338594&view=diff
==
--- lldb/trunk/cmake/modules/AddLLDB.cmake (original)
+++ lldb/trunk/cmake/modules/AddLLDB.cmake Wed Aug  1 10:21:18 2018
@@ -53,6 +53,11 @@ function(add_lldb_library name)
 set(out_dir lib${LLVM_LIBDIR_SUFFIX})
 if(${name} STREQUAL "liblldb" AND LLDB_BUILD_FRAMEWORK)
   set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR})
+  # The framework that is generated will install with install-liblldb
+  # because we enable CMake's framework support. CMake will copy all 
the
+  # headers and resources for us.
+  add_dependencies(install-lldb-framework install-${name})
+  add_dependencies(install-lldb-framework-stripped 
install-${name}-stripped)
 endif()
 install(TARGETS ${name}
   COMPONENT ${name}
@@ -67,12 +72,20 @@ function(add_lldb_library name)
   endif()
   if (NOT CMAKE_CONFIGURATION_TYPES)
 add_llvm_install_targets(install-${name}
- DEPENDS ${name}
+ DEPENDS $
  COMPONENT ${name})
+
+# install-liblldb{,-stripped} is the actual target that will install 
the
+# framework, so it must rely on the framework being fully built first.
+if (LLDB_BUILD_FRAMEWORK AND ${name} STREQUAL "liblldb")
+  add_dependencies(install-${name} lldb-framework)
+  add_dependencies(install-lldb-framework-stripped lldb-framework)
+endif()
   endif()
 endif()
   endif()
 
+
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,
   # but it is simple enough to make all of LLDB depend on some of those
   # headers without negatively impacting much of anything.
@@ -124,6 +137,10 @@ function(add_lldb_executable name)
 set(out_dir "bin")
 if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE)
   set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR})
+  # While install-liblldb-stripped will handle copying the tools, it will
+  # not strip them. We depend on this target to guarantee a stripped 
version
+  # will get installed in the framework.
+  add_dependencies(install-lldb-framew

[Lldb-commits] [lldb] r338923 - Modify lldb_suite.py to enable python debugging

2018-08-03 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Aug  3 14:37:01 2018
New Revision: 338923

URL: http://llvm.org/viewvc/llvm-project?rev=338923&view=rev
Log:
Modify lldb_suite.py to enable python debugging

Summary:
pudb and pdb interfere with the behavior of the inspect module. calling
`inspect.getfile(inspect.currentframe())` returns a different result
depending on whether or not you're in a debugger. Calling
`os.path.abspath` on the result of `inspect.getfile(...)` normalizes the
result between the two environments.

Patch by Nathan Lanza 

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

Modified:
lldb/trunk/test/use_lldb_suite.py

Modified: lldb/trunk/test/use_lldb_suite.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/use_lldb_suite.py?rev=338923&r1=338922&r2=338923&view=diff
==
--- lldb/trunk/test/use_lldb_suite.py (original)
+++ lldb/trunk/test/use_lldb_suite.py Fri Aug  3 14:37:01 2018
@@ -4,7 +4,9 @@ import sys
 
 
 def find_lldb_root():
-lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
+lldb_root = os.path.dirname(
+os.path.abspath(inspect.getfile(inspect.currentframe()))
+)
 while True:
 lldb_root = os.path.dirname(lldb_root)
 if lldb_root is None:


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


[Lldb-commits] [lldb] r339155 - Add instructions for building LLDB on Mac OS X with CMake

2018-08-07 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Aug  7 10:34:13 2018
New Revision: 339155

URL: http://llvm.org/viewvc/llvm-project?rev=339155&view=rev
Log:
Add instructions for building LLDB on Mac OS X with CMake

Summary:
There were previously no instructions for building LLDB on Mac OS X
with CMake. It's sufficiently close to building on Linux/FreeBSD/NetBSD that a
well-motivated developer could figure out the steps themselves. However, having
an explicit guide is better and can provide Mac OS X specific configurations
(e.g. LLDB_BUILD_FRAMEWORK).

Reviewers: labath, clayborg

Subscribers: emaste, krytarowski

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

Modified:
lldb/trunk/www/build.html

Modified: lldb/trunk/www/build.html
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/www/build.html?rev=339155&r1=339154&r2=339155&view=diff
==
--- lldb/trunk/www/build.html (original)
+++ lldb/trunk/www/build.html Tue Aug  7 10:34:13 2018
@@ -143,7 +143,7 @@
 
   Building LLDB on Mac OS X
   
-Building on Mac OS X is as easy as downloading the code and 
building the Xcode project or workspace:
+ There are two ways to build LLDB on Mac OS X: Using Xcode and 
using CMake
   
   
 Preliminaries
@@ -151,13 +151,34 @@
   XCode 4.3 or newer requires the "Command Line Tools" 
component (XCode->Preferences->Downloads->Components).
   Mac OS X Lion or newer requires installing http://swig.org";>Swig.
 
-Building LLDB
+Building LLDB with Xcode
+Building on Mac OS X with Xcode is as easy as downloading the 
code and building the Xcode project or workspace:
 
   Download the lldb sources.
   Follow the code signing instructions in 
lldb/docs/code-signing.txt
   In Xcode 3.x: lldb/lldb.xcodeproj, select the 
lldb-tool target, and build.
   In Xcode 4.x: lldb/lldb.xcworkspace, select the 
lldb-tool scheme, and build.
 
+Building LLDB with CMake
+ First download the LLVM, Clang, and LLDB sources. Refer to this page for precise instructions on this step.
+ Refer to the code signing instructions in 
lldb/docs/code-signing.txt for info on codesigning debugserver during 
the build.
+ Using CMake is documented on the http://llvm.org/docs/CMake.html";>Building LLVM with CMake page.
+Ninja is the recommended generator to use when building LLDB with 
CMake.
+
+  > cmake $PATH_TO_LLVM -G Ninja
+  > ninja lldb
+
+
+   As noted in the "Building LLVM with CMake" page mentioned 
above, you can pass
+   variables to cmake to change build behavior. If LLDB is built 
as a part of LLVM,
+   then you can pass LLVM-specific CMake variables to cmake when 
building LLDB.
+
+Here are some commonly used LLDB-specific CMake variables:
+
+  LLDB_EXPORT_ALL_SYMBOLS:BOOL : Exports 
all symbols. Useful in conjunction with CMAKE_BUILD_TYPE=Debug.
+  LLDB_BUILD_FRAMEWORK:BOOL : Builds 
LLDB.framework as Xcode would
+  LLDB_CODESIGN_IDENTITY:STRING : 
Determines the codesign identity to use. An empty string means skip building 
debugserver to avoid codesigning.
+
   
   
 


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


[Lldb-commits] [lldb] r339959 - Remove outdated TODOs in RegisterValue

2018-08-16 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Aug 16 15:48:46 2018
New Revision: 339959

URL: http://llvm.org/viewvc/llvm-project?rev=339959&view=rev
Log:
Remove outdated TODOs in RegisterValue

These TODOs were for setting m_type in RegisterValue::SetValueFromString
in the case where reg_info's encoding was eEncodingUint or
eEncodingSint. m_type is set by SetUInt{8,16,32,64.128} during the
SetUInt call.

Modified:
lldb/trunk/source/Utility/RegisterValue.cpp

Modified: lldb/trunk/source/Utility/RegisterValue.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/RegisterValue.cpp?rev=339959&r1=339958&r2=339959&view=diff
==
--- lldb/trunk/source/Utility/RegisterValue.cpp (original)
+++ lldb/trunk/source/Utility/RegisterValue.cpp Thu Aug 16 15:48:46 2018
@@ -380,7 +380,6 @@ Status RegisterValue::SetValueFromString
   "unsupported unsigned integer byte size: %u", byte_size);
   break;
 }
-// TODO: Shouldn't we be setting m_type here?
 break;
 
   case eEncodingSint:
@@ -410,8 +409,6 @@ Status RegisterValue::SetValueFromString
  byte_size);
   break;
 }
-
-// TODO: Shouldn't we be setting m_type here?
 break;
 
   case eEncodingIEEE754: {


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


[Lldb-commits] [lldb] r339965 - Remove commented out constructor from Scalar

2018-08-16 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Aug 16 16:23:18 2018
New Revision: 339965

URL: http://llvm.org/viewvc/llvm-project?rev=339965&view=rev
Log:
Remove commented out constructor from Scalar

This appears to have been commented out since the initial checkin of
lldb.

Modified:
lldb/trunk/source/Utility/Scalar.cpp

Modified: lldb/trunk/source/Utility/Scalar.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=339965&r1=339964&r2=339965&view=diff
==
--- lldb/trunk/source/Utility/Scalar.cpp (original)
+++ lldb/trunk/source/Utility/Scalar.cpp Thu Aug 16 16:23:18 2018
@@ -76,49 +76,6 @@ Scalar::Scalar() : m_type(e_void), m_flo
 Scalar::Scalar(const Scalar &rhs)
 : m_type(rhs.m_type), m_integer(rhs.m_integer), m_float(rhs.m_float) {}
 
-// Scalar::Scalar(const RegisterValue& reg) :
-//  m_type(e_void),
-//  m_data()
-//{
-//  switch (reg.info.encoding)
-//  {
-//  case eEncodingUint: // unsigned integer
-//  switch (reg.info.byte_size)
-//  {
-//  case 1: m_type = e_uint; m_data.uint = reg.value.uint8; break;
-//  case 2: m_type = e_uint; m_data.uint = reg.value.uint16; break;
-//  case 4: m_type = e_uint; m_data.uint = reg.value.uint32; break;
-//  case 8: m_type = e_ulonglong; m_data.ulonglong = reg.value.uint64;
-//  break;
-//  break;
-//  }
-//  break;
-//
-//  case eEncodingSint: // signed integer
-//  switch (reg.info.byte_size)
-//  {
-//  case 1: m_type = e_sint; m_data.sint = reg.value.sint8; break;
-//  case 2: m_type = e_sint; m_data.sint = reg.value.sint16; break;
-//  case 4: m_type = e_sint; m_data.sint = reg.value.sint32; break;
-//  case 8: m_type = e_slonglong; m_data.slonglong = reg.value.sint64;
-//  break;
-//  break;
-//  }
-//  break;
-//
-//  case eEncodingIEEE754:  // float
-//  switch (reg.info.byte_size)
-//  {
-//  case 4: m_type = e_float; m_data.flt = reg.value.float32; break;
-//  case 8: m_type = e_double; m_data.dbl = reg.value.float64; break;
-//  break;
-//  }
-//  break;
-//case eEncodingVector: // vector registers
-//  break;
-//  }
-//}
-
 bool Scalar::GetData(DataExtractor &data, size_t limit_byte_size) const {
   size_t byte_size = GetByteSize();
   if (byte_size > 0) {


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


[Lldb-commits] [lldb] r340560 - [cmake] Add option to skip building lldb-server

2018-08-23 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Aug 23 11:05:45 2018
New Revision: 340560

URL: http://llvm.org/viewvc/llvm-project?rev=340560&view=rev
Log:
[cmake] Add option to skip building lldb-server

Summary:
There is currently a way to skip the debugserver build. See how the CMake
variables SKIP_DEBUGSERVER and LLDB_CODESIGN_IDENTITY are used if you're
interested in that.

This allows us to skip building lldb-server as well. There is another
debug server called ds2 that can be used with LLDB. If you choose to use
ds2, this flag is very useful because it can cut down the build time of LLDB.

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

Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake
lldb/trunk/tools/CMakeLists.txt
lldb/trunk/unittests/tools/CMakeLists.txt

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=340560&r1=340559&r2=340560&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Thu Aug 23 11:05:45 2018
@@ -357,6 +357,8 @@ endif()
 
 list(APPEND system_libs ${CMAKE_DL_LIBS})
 
+SET(SKIP_LLDB_SERVER_BUILD OFF CACHE BOOL "Skip building lldb-server")
+
 # Figure out if lldb could use lldb-server.  If so, then we'll
 # ensure we build lldb-server when an lldb target is being built.
 if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")

Modified: lldb/trunk/tools/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=340560&r1=340559&r2=340560&view=diff
==
--- lldb/trunk/tools/CMakeLists.txt (original)
+++ lldb/trunk/tools/CMakeLists.txt Thu Aug 23 11:05:45 2018
@@ -6,7 +6,7 @@ add_subdirectory(argdumper)
 add_subdirectory(driver)
 add_subdirectory(lldb-mi)
 add_subdirectory(lldb-vscode)
-if (LLDB_CAN_USE_LLDB_SERVER)
+if (LLDB_CAN_USE_LLDB_SERVER AND NOT SKIP_LLDB_SERVER_BUILD)
   add_subdirectory(lldb-server)
 endif()
 add_subdirectory(intel-features)

Modified: lldb/trunk/unittests/tools/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/tools/CMakeLists.txt?rev=340560&r1=340559&r2=340560&view=diff
==
--- lldb/trunk/unittests/tools/CMakeLists.txt (original)
+++ lldb/trunk/unittests/tools/CMakeLists.txt Thu Aug 23 11:05:45 2018
@@ -1,5 +1,5 @@
 if(CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|Linux|NetBSD")
-  if (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_DEBUGSERVER)
+  if ((CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_DEBUGSERVER) OR (NOT 
CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_LLDB_SERVER_BUILD))
 # These tests are meant to test lldb-server/debugserver in isolation, and
 # don't provide any value if run against a server copied from somewhere.
   else()


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


[Lldb-commits] [lldb] r342066 - Add compatibility version to liblldb in framework builds

2018-09-12 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Wed Sep 12 11:10:22 2018
New Revision: 342066

URL: http://llvm.org/viewvc/llvm-project?rev=342066&view=rev
Log:
Add compatibility version to liblldb in framework builds

Summary:
Building LLDB with xcodebuild sets the compatibility version of liblldb
in LLDB.framework. Building the framework with cmake does not set the
compatibility version, and so it defaults to 0.0.0. This is a discrepency in the
difference between the xcode build and the cmake build.

I tested this change by building without this patch. From the build tree I ran
`otool -L Library/Frameworks/LLDB.framework/Versions/A/LLDB` and got this:
```
@rpath/LLDB.framework/Versions/A/LLDB (compatibility version 0.0.0, current 
version 8.0.0)
```

Did the same with this patch and the output contained this:
```
@rpath/LLDB.framework/Versions/A/LLDB (compatibility version 1.0.0, current 
version 8.0.0)
```

Reviewers: clayborg, labath

Subscribers: mgorny, lldb-commits

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

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=342066&r1=342065&r2=342066&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Wed Sep 12 11:10:22 2018
@@ -146,6 +146,7 @@ endif()
 if (LLDB_BUILD_FRAMEWORK)
   set_target_properties(liblldb
 PROPERTIES
+SOVERSION "1.0.0"
 OUTPUT_NAME LLDB
 FRAMEWORK On
 FRAMEWORK_VERSION ${LLDB_FRAMEWORK_VERSION}


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


[Lldb-commits] [lldb] r342266 - Fix lldb-vscode README.md

2018-09-14 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Sep 14 12:41:20 2018
New Revision: 342266

URL: http://llvm.org/viewvc/llvm-project?rev=342266&view=rev
Log:
Fix lldb-vscode README.md

Summary: The readme was missing "-" characters to enable links

Patch by Nathan Lanza 

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

Modified:
lldb/trunk/tools/lldb-vscode/README.md

Modified: lldb/trunk/tools/lldb-vscode/README.md
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-vscode/README.md?rev=342266&r1=342265&r2=342266&view=diff
==
--- lldb/trunk/tools/lldb-vscode/README.md (original)
+++ lldb/trunk/tools/lldb-vscode/README.md Fri Sep 14 12:41:20 2018
@@ -2,15 +2,15 @@
 # Table of Contents
 
 - [Introduction](#Introduction)
-- [Intallation](#Intallation Visual Studio Code)
+- [Installation](#Installation-Visual-Studio-Code)
 - [Configurations](#configurations)
-   - [Launch Configuration Settings](#launch configuration settings)
-   - [Attach Configuration Settings](#attach configuration settings)
-   - [Example configurations](#example configurations)
+   - [Launch Configuration Settings](#launch-configuration-settings)
+   - [Attach Configuration Settings](#attach-configuration-settings)
+   - [Example configurations](#example-configurations)
- [Launching](#launching)
-   - [Attach to process using process ID](#attach using pid)
-   - [Attach to process by name](#attach by name)
-   - [Loading a core file](#loading a core file)
+   - [Attach to process using process ID](#attach-using-pid)
+   - [Attach to process by name](#attach-by-name)
+   - [Loading a core file](#loading-a-core-file)
 
 # Introduction
 
@@ -20,7 +20,7 @@ It can be installed as an extension for
 The protocol is easy to run remotely and also can allow other tools and IDEs to
 get a full featured debugger with a well defined protocol. 
 
-# Intallation for Visual Studio Code
+# Installation for Visual Studio Code
 
 Installing the plug-in involves creating a directory in the 
`~/.vscode/extensions` folder and copying the package.json file that is in the 
same directory as this
 documentation into it, and copying to symlinking a lldb-vscode binary into 


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


Re: [Lldb-commits] [PATCH] D39307: Fix global data symbol resolution

2017-10-25 Thread Alex Langford via lldb-commits
$ nm /lib64/libm.so.6| grep " a$" 
00093bb0 r a
000c6a80 r a
00093bb0 r a

No, they are internal to libm only.

Alex

On 10/25/17, 4:15 PM, "Greg Clayton"  wrote:

Not hard. Just find a test that has a shared library and copy it. Modify 
the shared library to create a symbol named "a". Then the main executable, just 
run the same lambda expression and it will fail on all platforms. The current 
fix in the review is just for internal symbols in other shared libraries, so 
don't make "a" public if you want it to pass. Did you say that "a" in libmath 
was public?

Greg

> On Oct 25, 2017, at 4:10 PM, Davide Italiano via Phabricator 
 wrote:
> 
> davide added a comment.
> 
> Thanks, I'll try this patch tomorrow.
> I know this may be a little off, but how hard is to write a test for this 
so that it doesn't regress?
> 
> 
> 
https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D39307&d=DwIFAg&c=5VD0RTtNlTh3ycd41b3MUw&r=6r-mVtAxjRKWgeciEWgXiA&m=h9hoe4kEfRfn96OufBXdCIS_3py_y-MLJPBCpogA1To&s=ZxOsS7LJ5gkx_eYT2WwcoQs2g7pbaXOuzV1pTgBV_Mw&e=
> 
> 
> 



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


[Lldb-commits] [lldb] r351263 - [debugserver][CMake] Remove commented out line

2019-01-15 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Jan 15 14:27:59 2019
New Revision: 351263

URL: http://llvm.org/viewvc/llvm-project?rev=351263&view=rev
Log:
[debugserver][CMake] Remove commented out line

This has been commented out since rL300111
(commit d742d081f3a1e7412cc609765139ba32d597ac15). Looks like it was
committed as a commented out line, so I'm removing it.

Modified:
lldb/trunk/tools/debugserver/source/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=351263&r1=351262&r2=351263&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Tue Jan 15 14:27:59 2019
@@ -5,7 +5,6 @@ include_directories(${LLDB_SOURCE_DIR}/s
 include_directories(MacOSX/DarwinLog)
 
 include_directories(MacOSX)
-#include_directories(${CMAKE_CURRENT_BINARY_DIR}/MacOSX)
 
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ 
-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/../resources/lldb-debugserver-Info.plist")
 


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


[Lldb-commits] [lldb] r351276 - [lldb-mi] Remove use of dialog box

2019-01-15 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Jan 15 16:09:50 2019
New Revision: 351276

URL: http://llvm.org/viewvc/llvm-project?rev=351276&view=rev
Log:
[lldb-mi] Remove use of dialog box

Summary:
This really is only implemented on Windows, and it requires us to pull
in User32. This was only useful when debugging on lldb-mi on Windows, and there
doesn't seem to be a good reason why using a dialog box is better than what
exists for other platforms.

Reviewers: zturner, jingham, compnerd

Subscribers: ki.stfu

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

Modified:
lldb/trunk/tools/lldb-mi/MIDriverMain.cpp
lldb/trunk/tools/lldb-mi/MIUtilDebug.cpp
lldb/trunk/tools/lldb-mi/MIUtilDebug.h

Modified: lldb/trunk/tools/lldb-mi/MIDriverMain.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIDriverMain.cpp?rev=351276&r1=351275&r2=351276&view=diff
==
--- lldb/trunk/tools/lldb-mi/MIDriverMain.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIDriverMain.cpp Tue Jan 15 16:09:50 2019
@@ -165,11 +165,7 @@ bool DriverSystemShutdown(const bool vbA
 //--
 int main(int argc, char const *argv[]) {
 #if MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG
-#ifdef _WIN32
-  CMIUtilDebug::ShowDlgWaitForDbgAttach();
-#else
   CMIUtilDebug::WaitForDbgAttachInfinteLoop();
-#endif //  _WIN32
 #endif // MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG
 
   llvm::StringRef ToolName = argv[0];

Modified: lldb/trunk/tools/lldb-mi/MIUtilDebug.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilDebug.cpp?rev=351276&r1=351275&r2=351276&view=diff
==
--- lldb/trunk/tools/lldb-mi/MIUtilDebug.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilDebug.cpp Tue Jan 15 16:09:50 2019
@@ -39,25 +39,6 @@ CMIUtilDebug::~CMIUtilDebug() {}
 
 //++
 
//
-// Details: Show a dialog to the process/application halts. It gives the
-// opportunity to
-//  attach a debugger.
-// Type:Static method.
-// Args:None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilDebug::ShowDlgWaitForDbgAttach() {
-  const CMIUtilString strCaption(CMIDriver::Instance().GetAppNameShort());
-#ifdef _WIN32
-  ::MessageBoxA(NULL, "Attach your debugger now", strCaption.c_str(), MB_OK);
-#else
-// ToDo: Implement other platform version of an Ok to continue dialog box
-#endif // _WIN32
-}
-
-//++
-//
 // Details: Temporarily stall the process/application to give the programmer 
the
 //  opportunity to attach a debugger. How to use: Put a break in the
 //  programmer

Modified: lldb/trunk/tools/lldb-mi/MIUtilDebug.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilDebug.h?rev=351276&r1=351275&r2=351276&view=diff
==
--- lldb/trunk/tools/lldb-mi/MIUtilDebug.h (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilDebug.h Tue Jan 15 16:09:50 2019
@@ -24,7 +24,6 @@ class CMICmnLog;
 class CMIUtilDebug {
   // Statics:
 public:
-  static void ShowDlgWaitForDbgAttach();
   static void WaitForDbgAttachInfinteLoop();
 
   // Methods:


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


[Lldb-commits] [lldb] r351496 - [CMake] Prevent lldbDebugserverCommon from building if you disable debugserver builds

2019-01-17 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jan 17 15:14:04 2019
New Revision: 351496

URL: http://llvm.org/viewvc/llvm-project?rev=351496&view=rev
Log:
[CMake] Prevent lldbDebugserverCommon from building if you disable debugserver 
builds

Summary:
The flags `LLDB_USE_SYSTEM_DEBUGSERVER` and `LLDB_NO_DEBUGSERVER` were
introduced to the debugserver build. If one of these two flags are set, then we
do not build and sign debugserver. However I noticed that we were still building
the lldbDebugserverCommon and lldbDebugserverCommon_NonUI libraries regardless
of whether or not these flags were set. I don't believe we should be building
these libraries unless we are building and signing debugserver.

Reviewers: sgraenitz, davide, JDevlieghere, beanz, vsk, aprantl, labath

Subscribers: mgorny, jfb, lldb-commits

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

Modified:
lldb/trunk/tools/debugserver/source/CMakeLists.txt
lldb/trunk/unittests/CMakeLists.txt

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=351496&r1=351495&r2=351496&view=diff
==
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Thu Jan 17 15:14:04 2019
@@ -30,69 +30,6 @@ check_library_exists(compression compres
 
 add_subdirectory(MacOSX)
 
-set(generated_mach_interfaces
-  ${CMAKE_CURRENT_BINARY_DIR}/mach_exc.h
-  ${CMAKE_CURRENT_BINARY_DIR}/mach_excServer.c
-  ${CMAKE_CURRENT_BINARY_DIR}/mach_excUser.c
-  )
-add_custom_command(OUTPUT ${generated_mach_interfaces}
-  COMMAND mig ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
-  )
-
-set(DEBUGSERVER_VERS_GENERATED_FILE 
${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
-set_source_files_properties(${DEBUGSERVER_VERS_GENERATED_FILE} PROPERTIES 
GENERATED 1)
-
-add_custom_command(OUTPUT ${DEBUGSERVER_VERS_GENERATED_FILE}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-  ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj debugserver
-  > ${DEBUGSERVER_VERS_GENERATED_FILE}
-  DEPENDS ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-  ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj
-  )
-
-set(lldbDebugserverCommonSources
-  DNBArch.cpp
-  DNBBreakpoint.cpp
-  DNB.cpp
-  DNBDataRef.cpp
-  DNBError.cpp
-  DNBLog.cpp
-  DNBRegisterInfo.cpp
-  DNBThreadResumeActions.cpp
-  JSON.cpp
-  StdStringExtractor.cpp
-  # JSON reader depends on the following LLDB-common files
-  ${LLDB_SOURCE_DIR}/source/Host/common/StringConvert.cpp
-  ${LLDB_SOURCE_DIR}/source/Host/common/SocketAddress.cpp
-  # end JSON reader dependencies
-  libdebugserver.cpp
-  PseudoTerminal.cpp
-  PThreadEvent.cpp
-  PThreadMutex.cpp
-  RNBContext.cpp
-  RNBRemote.cpp
-  RNBServices.cpp
-  RNBSocket.cpp
-  SysSignal.cpp
-  TTYState.cpp
-
-  MacOSX/CFBundle.cpp
-  MacOSX/CFString.cpp
-  MacOSX/Genealogy.cpp
-  MacOSX/MachException.cpp
-  MacOSX/MachProcess.mm
-  MacOSX/MachTask.mm
-  MacOSX/MachThread.cpp
-  MacOSX/MachThreadList.cpp
-  MacOSX/MachVMMemory.cpp
-  MacOSX/MachVMRegion.cpp
-  MacOSX/OsLogger.cpp
-  ${generated_mach_interfaces}
-  ${DEBUGSERVER_VERS_GENERATED_FILE})
-
-add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
-
 # LLDB-specific identity, currently used for code signing debugserver.
 set(LLDB_CODESIGN_IDENTITY "" CACHE STRING
 "Override code sign identity for debugserver and for use in tests; falls 
back to LLVM_CODESIGNING_IDENTITY if set or lldb_codesign otherwise (Darwin 
only)")
@@ -241,6 +178,69 @@ if(LLDB_USE_ENTITLEMENTS)
 endif()
 
 if(build_and_sign_debugserver)
+  set(generated_mach_interfaces
+${CMAKE_CURRENT_BINARY_DIR}/mach_exc.h
+${CMAKE_CURRENT_BINARY_DIR}/mach_excServer.c
+${CMAKE_CURRENT_BINARY_DIR}/mach_excUser.c
+)
+  add_custom_command(OUTPUT ${generated_mach_interfaces}
+COMMAND mig ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
+DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
+)
+
+  set(DEBUGSERVER_VERS_GENERATED_FILE 
${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
+  set_source_files_properties(${DEBUGSERVER_VERS_GENERATED_FILE} PROPERTIES 
GENERATED 1)
+
+  add_custom_command(OUTPUT ${DEBUGSERVER_VERS_GENERATED_FILE}
+COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj debugserver
+> ${DEBUGSERVER_VERS_GENERATED_FILE}
+DEPENDS ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
+${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj
+)
+
+  set(lldbDebugserverCommonSources
+DNBArch.cpp
+DNBBreakpoint.cpp
+DNB.cpp
+DNBDataRef.cpp
+DNBError.cpp
+DNBLog.cpp
+DNBRegisterInfo.cpp
+DNBThreadResumeActions.cpp
+JSON.cpp
+StdStringExtractor.cpp
+# JSON reader depends on the fol

[Lldb-commits] [lldb] r351498 - [CMake] Only test debugserver if platform can use debugserver

2019-01-17 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jan 17 16:05:25 2019
New Revision: 351498

URL: http://llvm.org/viewvc/llvm-project?rev=351498&view=rev
Log:
[CMake] Only test debugserver if platform can use debugserver

In commit svn r351496 I changed this condition from
`if(LLDB_CAN_USE_DEBUGSERVER)` to `if(NOT SKIP_TEST_DEBUGSERVER)`.
This causes debugserver tests to run on windows, which shouldn't happen.
SKIP_TEST_DEBUGSERVER is set either by the user (it shouldn't be set on
windows builds) or in the debugserver CMake logic (which doesn't get
included when building on windows). Therefore, I changed the condition
to be `if(LLDB_CAN_USE_DEBUGSERVER AND NOT SKIP_TEST_DEBUGSERVER)`.

Modified:
lldb/trunk/unittests/CMakeLists.txt

Modified: lldb/trunk/unittests/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/CMakeLists.txt?rev=351498&r1=351497&r2=351498&view=diff
==
--- lldb/trunk/unittests/CMakeLists.txt (original)
+++ lldb/trunk/unittests/CMakeLists.txt Thu Jan 17 16:05:25 2019
@@ -78,6 +78,6 @@ add_subdirectory(tools)
 add_subdirectory(UnwindAssembly)
 add_subdirectory(Utility)
 
-if(NOT SKIP_TEST_DEBUGSERVER)
+if(LLDB_CAN_USE_DEBUGSERVER AND NOT SKIP_TEST_DEBUGSERVER)
   add_subdirectory(debugserver)
 endif()


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


[Lldb-commits] [lldb] r351863 - [CMake] Replace use of llvm-config with LLVM and Clang CMake packages

2019-01-22 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Jan 22 11:26:42 2019
New Revision: 351863

URL: http://llvm.org/viewvc/llvm-project?rev=351863&view=rev
Log:
[CMake] Replace use of llvm-config with LLVM and Clang CMake packages

Summary:
I did this for two reasons:
- Using the CMake packages simplifies building LLDB Standalone. This is for two
  reasons: 1) We were doing a decent amount of work that is already done in the
  LLVMConfig.cmake that we want to import, 2) We had to do some manual work to 
call
  llvm-config, parse its output, and populate variables that the build system
  uses.
- As far as I understand, using llvm-config makes it difficult if not impossible
  to cross-compile LLDB standalone.

Reviewers: sgraenitz, labath, zturner, JDevlieghere, davide, aprantl, 
stella.stamenova

Subscribers: mgorny, lldb-commits

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

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=351863&r1=351862&r2=351863&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Tue Jan 22 11:26:42 2019
@@ -5,73 +5,26 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
 
   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 
'install' target." OFF)
 
-  # Rely on llvm-config.
-  set(CONFIG_OUTPUT)
-  find_program(LLVM_CONFIG "llvm-config")
-  if(LLVM_CONFIG)
-message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
-set(CONFIG_COMMAND ${LLVM_CONFIG}
-  "--assertion-mode"
-  "--bindir"
-  "--libdir"
-  "--includedir"
-  "--prefix"
-  "--src-root"
-  "--cmakedir")
-execute_process(
-  COMMAND ${CONFIG_COMMAND}
-  RESULT_VARIABLE HAD_ERROR
-  OUTPUT_VARIABLE CONFIG_OUTPUT
-)
-if(NOT HAD_ERROR)
-  string(REGEX REPLACE
-"[ \t]*[\r\n]+[ \t]*" ";"
-CONFIG_OUTPUT ${CONFIG_OUTPUT})
-
-else()
-  string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
-  message(STATUS "${CONFIG_COMMAND_STR}")
-  message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
-endif()
-  else()
-message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
-  endif()
+  set(LLDB_PATH_TO_LLVM_BUILD "" CACHE PATH "Path to LLVM build tree")
+  set(LLDB_PATH_TO_CLANG_BUILD "" CACHE PATH "Path to Clang build tree")
 
-  list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
-  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
-  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
-  list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
-  list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
-  list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
-  list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH)
-
-  if(NOT MSVC_IDE)
-set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
-  CACHE BOOL "Enable assertions")
-# Assertions should follow llvm-config's.
-mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
-  endif()
+  file(TO_CMAKE_PATH LLDB_PATH_TO_LLVM_BUILD "${LLDB_PATH_TO_LLVM_BUILD}")
+  file(TO_CMAKE_PATH LLDB_PATH_TO_CLANG_BUILD "${LLDB_PATH_TO_CLANG_BUILD}")
 
-  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
-  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
-  set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
-  set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to 
LLVM build tree CMake files")
-  set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
-  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-  set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to 
llvm-lit")
+  find_package(LLVM REQUIRED CONFIG
+HINTS "${LLDB_PATH_TO_LLVM_BUILD}" NO_CMAKE_FIND_ROOT_PATH)
+  find_package(Clang REQUIRED CONFIG
+HINTS "${LLDB_PATH_TO_CLANG_BUILD}" NO_CMAKE_FIND_ROOT_PATH)
+
+  # We set LLVM_MAIN_INCLUDE_DIR so that it gets included in TableGen flags.
+  set(LLVM_MAIN_INCLUDE_DIR "${LLVM_BUILD_MAIN_INCLUDE_DIR}" CACHE PATH "Path 
to LLVM's source include dir")
+  # We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when 
building SVNVersion.inc
+  set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake 
modules")
 
+  set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to 
llvm-lit")
   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
 NO_DEFAULT_PATH)
 
-  set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
-  if(EXISTS ${LLVMCONFIG_FILE})
-file(TO_CMAKE_PATH "${LLVM_CMAKE_PATH}" LLVM_CMAKE_PATH)
-list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-include(${LLVMCONFIG_FILE})
-  else()
-message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
-  endif()
-
   # They are used as destination of target generators.
   set(LLVM_RUNTIME_

[Lldb-commits] [lldb] r352078 - [CMake] Remove duplicated cache variable. NFC.

2019-01-24 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Jan 24 10:52:19 2019
New Revision: 352078

URL: http://llvm.org/viewvc/llvm-project?rev=352078&view=rev
Log:
[CMake] Remove duplicated cache variable. NFC.

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=352078&r1=352077&r2=352078&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Thu Jan 24 10:52:19 2019
@@ -16,8 +16,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   find_package(Clang REQUIRED CONFIG
 HINTS "${LLDB_PATH_TO_CLANG_BUILD}" NO_CMAKE_FIND_ROOT_PATH)
 
-  # We set LLVM_MAIN_INCLUDE_DIR so that it gets included in TableGen flags.
-  set(LLVM_MAIN_INCLUDE_DIR "${LLVM_BUILD_MAIN_INCLUDE_DIR}" CACHE PATH "Path 
to LLVM's source include dir")
   # We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when 
building SVNVersion.inc
   set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake 
modules")
 


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


[Lldb-commits] [lldb] r352235 - [CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

2019-01-25 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Jan 25 11:38:21 2019
New Revision: 352235

URL: http://llvm.org/viewvc/llvm-project?rev=352235&view=rev
Log:
[CMake] Use llvm-tblgen from NATIVE LLVM build when cross-compiling

Summary:
When cross-compiling LLDB, we want to use llvm-tblgen built for the
host, not the target.

Reviewers: compnerd, sgraenitz

Subscribers: mgorny, lldb-commits

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

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=352235&r1=352234&r2=352235&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Fri Jan 25 11:38:21 2019
@@ -25,8 +25,31 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR} CACHE PATH "Path to LLVM build 
tree")
   set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to 
llvm-lit")
 
-  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
-NO_DEFAULT_PATH)
+  if(CMAKE_CROSSCOMPILING)
+set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")
+if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+  message(FATAL_ERROR
+"Attempting to cross-compile LLDB standalone but no native LLVM build
+found. Please cross-compile LLVM as well.")
+endif()
+
+if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+  set(HOST_EXECUTABLE_SUFFIX ".exe")
+endif()
+
+if (NOT CMAKE_CONFIGURATION_TYPES)
+  set(LLVM_TABLEGEN_EXE
+"${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+else()
+  # NOTE: LLVM NATIVE build is always built Release, as is specified in
+  # CrossCompile.cmake
+  set(LLVM_TABLEGEN_EXE
+
"${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+endif()
+  else()
+find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
+  NO_DEFAULT_PATH)
+  endif()
 
   # They are used as destination of target generators.
   set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)


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


[Lldb-commits] [lldb] r354526 - Merge target triple into module triple when constructing module from memory

2019-02-20 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Wed Feb 20 15:12:56 2019
New Revision: 354526

URL: http://llvm.org/viewvc/llvm-project?rev=354526&view=rev
Log:
Merge target triple into module triple when constructing module from memory

Summary:
While debugging an android process remotely from a windows machine, I
noticed that the modules constructed from an object file in memory only had
information about the architecture. Without knowledge of the OS or environment,
expression evaluation sometimes leads to incorrectly generated code or a
debugger crash. While we cannot know for certain what triple a module
constructed from an in-memory object file will have, we can use the
triple from the target to try and fill in the missing details.

Reviewers: clayborg, zturner, JDevlieghere, compnerd, aprantl, labath

Subscribers: jdoerfert, lldb-commits

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

Modified:
lldb/trunk/source/Core/Module.cpp

Modified: lldb/trunk/source/Core/Module.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=354526&r1=354525&r2=354526&view=diff
==
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Wed Feb 20 15:12:56 2019
@@ -309,6 +309,10 @@ ObjectFile *Module::GetMemoryObjectFile(
   // file's architecture since it might differ in vendor/os if some
   // parts were unknown.
   m_arch = m_objfile_sp->GetArchitecture();
+
+  // Augment the arch with the target's information in case
+  // we are unable to extract the os/environment from memory.
+  m_arch.MergeFrom(process_sp->GetTarget().GetArchitecture());
 } else {
   error.SetErrorString("unable to find suitable object file plug-in");
 }


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


[Lldb-commits] [lldb] r354933 - [Utility] Remove Triple{Environment, OS, Vendor}IsUnspecifiedUnknown from ArchSpec

2019-02-26 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Feb 26 15:50:19 2019
New Revision: 354933

URL: http://llvm.org/viewvc/llvm-project?rev=354933&view=rev
Log:
[Utility] Remove Triple{Environment,OS,Vendor}IsUnspecifiedUnknown from ArchSpec

Summary:
These functions should always return the opposite of the
`Triple{Environment,OS,Vendor}WasSpecified` functions. Unspecified unknown is
the same as unspecified, which is why one set of functions should give us what
we want. It's possible to have specified unknown, which is why we can't just
rely on checking the enum values of vendor/os/environment. We must also ensure
that the names of these are empty and not "unknown".

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

Modified:
lldb/trunk/include/lldb/Utility/ArchSpec.h
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/trunk/source/Utility/ArchSpec.cpp
lldb/trunk/unittests/Utility/ArchSpecTest.cpp

Modified: lldb/trunk/include/lldb/Utility/ArchSpec.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ArchSpec.h?rev=354933&r1=354932&r2=354933&view=diff
==
--- lldb/trunk/include/lldb/Utility/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/ArchSpec.h Tue Feb 26 15:50:19 2019
@@ -376,20 +376,10 @@ public:
 return !m_triple.getVendorName().empty();
   }
 
-  bool TripleVendorIsUnspecifiedUnknown() const {
-return m_triple.getVendor() == llvm::Triple::UnknownVendor &&
-   m_triple.getVendorName().empty();
-  }
-
   bool TripleOSWasSpecified() const { return !m_triple.getOSName().empty(); }
 
   bool TripleEnvironmentWasSpecified() const {
-return !m_triple.getEnvironmentName().empty();
-  }
-
-  bool TripleOSIsUnspecifiedUnknown() const {
-return m_triple.getOS() == llvm::Triple::UnknownOS &&
-   m_triple.getOSName().empty();
+return m_triple.hasEnvironment();
   }
 
   //--

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=354933&r1=354932&r2=354933&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Feb 26 
15:50:19 2019
@@ -3309,7 +3309,7 @@ ArchSpec ObjectFileELF::GetArchitecture(
   }
 
   if (CalculateType() == eTypeCoreFile &&
-  m_arch_spec.TripleOSIsUnspecifiedUnknown()) {
+  !m_arch_spec.TripleOSWasSpecified()) {
 // Core files don't have section headers yet they have PT_NOTE program
 // headers that might shed more light on the architecture
 for (const elf::ELFProgramHeader &H : ProgramHeaders()) {

Modified: lldb/trunk/source/Utility/ArchSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=354933&r1=354932&r2=354933&view=diff
==
--- lldb/trunk/source/Utility/ArchSpec.cpp (original)
+++ lldb/trunk/source/Utility/ArchSpec.cpp Tue Feb 26 15:50:19 2019
@@ -889,10 +889,9 @@ bool ArchSpec::ContainsOnlyArch(const ll
 }
 
 void ArchSpec::MergeFrom(const ArchSpec &other) {
-  if (TripleVendorIsUnspecifiedUnknown() &&
-  !other.TripleVendorIsUnspecifiedUnknown())
+  if (!TripleVendorWasSpecified() && other.TripleVendorWasSpecified())
 GetTriple().setVendor(other.GetTriple().getVendor());
-  if (TripleOSIsUnspecifiedUnknown() && !other.TripleOSIsUnspecifiedUnknown())
+  if (!TripleOSWasSpecified() && other.TripleVendorWasSpecified())
 GetTriple().setOS(other.GetTriple().getOS());
   if (GetTriple().getArch() == llvm::Triple::UnknownArch) {
 GetTriple().setArch(other.GetTriple().getArch());
@@ -903,8 +902,8 @@ void ArchSpec::MergeFrom(const ArchSpec
 if (other.GetCore() != eCore_uknownMach64)
   UpdateCore();
   }
-  if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment &&
-  !TripleVendorWasSpecified()) {
+  if (!TripleEnvironmentWasSpecified() &&
+  other.TripleEnvironmentWasSpecified() && !TripleVendorWasSpecified()) {
 if (other.TripleVendorWasSpecified())
   GetTriple().setEnvironment(other.GetTriple().getEnvironment());
   }

Modified: lldb/trunk/unittests/Utility/ArchSpecTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ArchSpecTest.cpp?rev=354933&r1=354932&r2=354933&view=diff
==
--- lldb/trunk/unittests/Utility/ArchSpecTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ArchSpecTest.cpp Tue Feb 26 15:50:19 2019
@@ -232,3 +232,76 @@ TEST(ArchSpecTest, OperatorBool) {
   EXPECT_FALSE(ArchSpec());
   EXPECT_TRUE(ArchSpec("x86_64-pc-linux"));
 }
+
+TEST(ArchSpecTest, TripleComponentsWereSpecified) {
+  {

[Lldb-commits] [lldb] r354938 - [Utility] Fix ArchSpec.MergeFrom to correctly merge environments

2019-02-26 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Feb 26 16:47:39 2019
New Revision: 354938

URL: http://llvm.org/viewvc/llvm-project?rev=354938&view=rev
Log:
[Utility] Fix ArchSpec.MergeFrom to correctly merge environments

Summary:
This behavior was originally added in rL252264 (git commit 76a7f365da)
in order to be extra careful with handling platforms like watchos and tvos.
However, as far as triples go, those two (and others) are treated as OSes and
not environments, so that should not really apply here.

Additionally, this behavior is incorrect and can lead to incorrect ArchSpecs.
Because android is specified as an environment and not an OS, not propogating
the environment can lead to modules and targets being misidentified.

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

Modified:
lldb/trunk/source/Utility/ArchSpec.cpp
lldb/trunk/unittests/Utility/ArchSpecTest.cpp

Modified: lldb/trunk/source/Utility/ArchSpec.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?rev=354938&r1=354937&r2=354938&view=diff
==
--- lldb/trunk/source/Utility/ArchSpec.cpp (original)
+++ lldb/trunk/source/Utility/ArchSpec.cpp Tue Feb 26 16:47:39 2019
@@ -903,9 +903,8 @@ void ArchSpec::MergeFrom(const ArchSpec
   UpdateCore();
   }
   if (!TripleEnvironmentWasSpecified() &&
-  other.TripleEnvironmentWasSpecified() && !TripleVendorWasSpecified()) {
-if (other.TripleVendorWasSpecified())
-  GetTriple().setEnvironment(other.GetTriple().getEnvironment());
+  other.TripleEnvironmentWasSpecified()) {
+GetTriple().setEnvironment(other.GetTriple().getEnvironment());
   }
   // If this and other are both arm ArchSpecs and this ArchSpec is a generic
   // "some kind of arm" spec but the other ArchSpec is a specific arm core,

Modified: lldb/trunk/unittests/Utility/ArchSpecTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ArchSpecTest.cpp?rev=354938&r1=354937&r2=354938&view=diff
==
--- lldb/trunk/unittests/Utility/ArchSpecTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ArchSpecTest.cpp Tue Feb 26 16:47:39 2019
@@ -134,22 +134,46 @@ TEST(ArchSpecTest, TestSetTriple) {
 }
 
 TEST(ArchSpecTest, MergeFrom) {
-  ArchSpec A;
-  ArchSpec B("x86_64-pc-linux");
+  {
+ArchSpec A;
+ArchSpec B("x86_64-pc-linux");
 
-  EXPECT_FALSE(A.IsValid());
-  ASSERT_TRUE(B.IsValid());
-  EXPECT_EQ(llvm::Triple::ArchType::x86_64, B.GetTriple().getArch());
-  EXPECT_EQ(llvm::Triple::VendorType::PC, B.GetTriple().getVendor());
-  EXPECT_EQ(llvm::Triple::OSType::Linux, B.GetTriple().getOS());
-  EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, B.GetCore());
-
-  A.MergeFrom(B);
-  ASSERT_TRUE(A.IsValid());
-  EXPECT_EQ(llvm::Triple::ArchType::x86_64, A.GetTriple().getArch());
-  EXPECT_EQ(llvm::Triple::VendorType::PC, A.GetTriple().getVendor());
-  EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
-  EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, A.GetCore());
+EXPECT_FALSE(A.IsValid());
+ASSERT_TRUE(B.IsValid());
+EXPECT_EQ(llvm::Triple::ArchType::x86_64, B.GetTriple().getArch());
+EXPECT_EQ(llvm::Triple::VendorType::PC, B.GetTriple().getVendor());
+EXPECT_EQ(llvm::Triple::OSType::Linux, B.GetTriple().getOS());
+EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, B.GetCore());
+
+A.MergeFrom(B);
+ASSERT_TRUE(A.IsValid());
+EXPECT_EQ(llvm::Triple::ArchType::x86_64, A.GetTriple().getArch());
+EXPECT_EQ(llvm::Triple::VendorType::PC, A.GetTriple().getVendor());
+EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
+EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, A.GetCore());
+  }
+  {
+ArchSpec A("aarch64");
+ArchSpec B("aarch64--linux-android");
+
+EXPECT_TRUE(A.IsValid());
+EXPECT_TRUE(B.IsValid());
+
+EXPECT_EQ(llvm::Triple::ArchType::aarch64, B.GetTriple().getArch());
+EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+  B.GetTriple().getVendor());
+EXPECT_EQ(llvm::Triple::OSType::Linux, B.GetTriple().getOS());
+EXPECT_EQ(llvm::Triple::EnvironmentType::Android,
+  B.GetTriple().getEnvironment());
+
+A.MergeFrom(B);
+EXPECT_EQ(llvm::Triple::ArchType::aarch64, A.GetTriple().getArch());
+EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+  A.GetTriple().getVendor());
+EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
+EXPECT_EQ(llvm::Triple::EnvironmentType::Android,
+  A.GetTriple().getEnvironment());
+  }
 }
 
 TEST(ArchSpecTest, MergeFromMachOUnknown) {


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


[Lldb-commits] [lldb] r355149 - [CMake] Make liblldb depend on clang-headers

2019-02-28 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Feb 28 14:24:18 2019
New Revision: 355149

URL: http://llvm.org/viewvc/llvm-project?rev=355149&view=rev
Log:
[CMake] Make liblldb depend on clang-headers

Summary:
The clang headers are useful when dealing with clang modules. There is also a
way to get to the clang headers from the SB API so it would be nice if they were
also available when we just build lldb.

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

Modified:
lldb/trunk/source/API/CMakeLists.txt

Modified: lldb/trunk/source/API/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/CMakeLists.txt?rev=355149&r1=355148&r2=355149&view=diff
==
--- lldb/trunk/source/API/CMakeLists.txt (original)
+++ lldb/trunk/source/API/CMakeLists.txt Thu Feb 28 14:24:18 2019
@@ -151,6 +151,10 @@ else()
   )
 endif()
 
+if (NOT LLDB_BUILT_STANDALONE)
+  add_dependencies(liblldb clang-headers)
+endif()
+
 if(LLDB_BUILD_FRAMEWORK)
   include(LLDBFramework)
 endif()


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


[Lldb-commits] [lldb] r355341 - [build.py] Allow clang-cl to build files starting with '/U'

2019-03-04 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Mar  4 13:36:49 2019
New Revision: 355341

URL: http://llvm.org/viewvc/llvm-project?rev=355341&view=rev
Log:
[build.py] Allow clang-cl to build files starting with '/U'

Summary:
clang-cl tries to match cl's interface, and treats /U as "Removes a
predefined macro" as cl does. When you feed clang-cl a file that begins with
'/U' (e.g. /Users/xiaobai/foo.c), clang-cl will emit a warning and in some cases
an error, like so:

clang-9: warning: '/Users/xiaobai/foo.c' treated as the '/U' option 
[-Wslash-u-filename]
clang-9: note: Use '--' to treat subsequent arguments as filenames
clang-9: error: no input files

If you're using clang-cl, make sure '--' is passed before the source file.

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

Modified:
lldb/trunk/lit/helper/build.py

Modified: lldb/trunk/lit/helper/build.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/helper/build.py?rev=355341&r1=355340&r2=355341&view=diff
==
--- lldb/trunk/lit/helper/build.py (original)
+++ lldb/trunk/lit/helper/build.py Mon Mar  4 13:36:49 2019
@@ -568,6 +568,8 @@ class MsvcBuilder(Builder):
 args.append('/c')
 
 args.append('/Fo' + obj)
+if self.toolchain_type == 'clang-cl':
+args.append('--')
 args.append(source)
 
 return ('compiling', [source], obj,


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


[Lldb-commits] [lldb] r355375 - [Expression] Remove unused parameter from Evaluate

2019-03-04 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Mar  4 19:33:34 2019
New Revision: 355375

URL: http://llvm.org/viewvc/llvm-project?rev=355375&view=rev
Log:
[Expression] Remove unused parameter from Evaluate

Modified:
lldb/trunk/include/lldb/Expression/UserExpression.h
lldb/trunk/source/Expression/REPL.cpp
lldb/trunk/source/Expression/UserExpression.cpp
lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/include/lldb/Expression/UserExpression.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/UserExpression.h?rev=355375&r1=355374&r2=355375&view=diff
==
--- lldb/trunk/include/lldb/Expression/UserExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/UserExpression.h Mon Mar  4 19:33:34 2019
@@ -261,10 +261,6 @@ public:
   /// Filled in with an error in case the expression evaluation
   /// fails to parse, run, or evaluated.
   ///
-  /// @param[in] line_offset
-  /// The offset of the first line of the expression from the "beginning" 
of
-  /// a virtual source file used for error reporting and debug info.
-  ///
   /// @param[out] fixed_expression
   /// If non-nullptr, the fixed expression is copied into the provided
   /// string.
@@ -290,7 +286,7 @@ public:
   Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options,
llvm::StringRef expr_cstr, llvm::StringRef expr_prefix,
lldb::ValueObjectSP &result_valobj_sp, Status &error,
-   uint32_t line_offset = 0, std::string *fixed_expression = nullptr,
+   std::string *fixed_expression = nullptr,
lldb::ModuleSP *jit_module_sp_ptr = nullptr,
ValueObject *ctx_obj = nullptr);
 

Modified: lldb/trunk/source/Expression/REPL.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=355375&r1=355374&r2=355375&view=diff
==
--- lldb/trunk/source/Expression/REPL.cpp (original)
+++ lldb/trunk/source/Expression/REPL.cpp Mon Mar  4 19:33:34 2019
@@ -307,7 +307,6 @@ void REPL::IOHandlerInputComplete(IOHand
   lldb::ExpressionResults execution_results =
   UserExpression::Evaluate(exe_ctx, expr_options, code.c_str(),
expr_prefix, result_valobj_sp, error,
-   0,   // Line offset
nullptr, // Fixed Expression
&jit_module_sp);
 

Modified: lldb/trunk/source/Expression/UserExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=355375&r1=355374&r2=355375&view=diff
==
--- lldb/trunk/source/Expression/UserExpression.cpp (original)
+++ lldb/trunk/source/Expression/UserExpression.cpp Mon Mar  4 19:33:34 2019
@@ -139,7 +139,7 @@ lldb::addr_t UserExpression::GetObjectPo
 lldb::ExpressionResults UserExpression::Evaluate(
 ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options,
 llvm::StringRef expr, llvm::StringRef prefix,
-lldb::ValueObjectSP &result_valobj_sp, Status &error, uint32_t line_offset,
+lldb::ValueObjectSP &result_valobj_sp, Status &error,
 std::string *fixed_expression, lldb::ModuleSP *jit_module_sp_ptr,
 ValueObject *ctx_obj) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |

Modified: lldb/trunk/source/Target/Target.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=355375&r1=355374&r2=355375&view=diff
==
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Mar  4 19:33:34 2019
@@ -2401,12 +2401,11 @@ ExpressionResults Target::EvaluateExpres
   } else {
 llvm::StringRef prefix = GetExpressionPrefixContents();
 Status error;
-execution_results = UserExpression::Evaluate(exe_ctx, options, expr, 
prefix,
- result_valobj_sp, error,
- 0, // Line Number
- fixed_expression,
- nullptr, // Module
- ctx_obj);
+execution_results =
+UserExpression::Evaluate(exe_ctx, options, expr, prefix,
+ result_valobj_sp, error, fixed_expression,
+ nullptr, // Module
+ ctx_obj);
   }
 
   m_suppress_stop_hooks = old_suppress_value;


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


[Lldb-commits] [lldb] r355463 - [ExpressionParser] Test GetClangResourceDir

2019-03-05 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Mar  5 16:45:16 2019
New Revision: 355463

URL: http://llvm.org/viewvc/llvm-project?rev=355463&view=rev
Log:
[ExpressionParser] Test GetClangResourceDir

Summary:
I'm doing this because I plan on implementing `ComputeClangResourceDirectory`
on windows so that `GetClangResourceDir` will work.  Additionally, I made
test_paths make sure that the directory member of the returned FileSpec is not
none. This will fail on windows since `ComputeClangResourceDirectory` isn't
implemented yet.

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

Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.h
lldb/trunk/unittests/Expression/ClangParserTest.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py?rev=355463&r1=355462&r2=355463&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py 
Tue Mar  5 16:45:16 2019
@@ -32,6 +32,15 @@ class TestPaths(TestBase):
 # No directory path types should have the filename set
 self.assertTrue(f.GetFilename() is None)
 
+# TODO: Merge into test_path when GetClangResourceDir is implemented on
+# windows
+@expectedFailureAll(oslist=["windows"])
+@no_debug_info_test
+def test_clang_dir_path(self):
+  '''Test to make sure clang dir is set correctly'''
+  clang_dir = lldb.SBHostOS.GetLLDBPath(lldb.ePathTypeClangDir)
+  self.assertFalse(clang_dir.GetDirectory() is None)
+
 @no_debug_info_test
 def test_directory_doesnt_end_with_slash(self):
 current_directory_spec = lldb.SBFileSpec(os.path.curdir)

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=355463&r1=355462&r2=355463&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Tue Mar  5 
16:45:16 2019
@@ -29,17 +29,8 @@
 using namespace lldb_private;
 
 #if defined(_WIN32)
-static bool ComputeClangDirectory(FileSpec &file_spec) { return false; }
+static bool ComputeClangResourceDirectory(FileSpec &file_spec) { return false; 
}
 #else
-static bool DefaultComputeClangDirectory(FileSpec &file_spec) {
-  return HostInfoPosix::ComputePathRelativeToLibrary(
-  file_spec, (llvm::Twine("/lib") + CLANG_LIBDIR_SUFFIX + "/clang/" +
-  CLANG_VERSION_STRING)
- .str());
-}
-
-#if defined(__APPLE__)
-
 static bool VerifyClangPath(const llvm::Twine &clang_path) {
   if (FileSystem::Instance().IsDirectory(clang_path))
 return true;
@@ -51,9 +42,38 @@ static bool VerifyClangPath(const llvm::
   return false;
 }
 
-bool lldb_private::ComputeClangDirectory(FileSpec &lldb_shlib_spec,
+///
+/// This will compute the clang resource directory assuming that clang was
+/// installed with the same prefix as lldb.
+///
+static bool DefaultComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
  FileSpec &file_spec, bool verify) {
   std::string raw_path = lldb_shlib_spec.GetPath();
+  llvm::StringRef parent_dir = llvm::sys::path::parent_path(raw_path);
+
+  llvm::SmallString<256> clang_dir(parent_dir);
+  llvm::SmallString<32> relative_path;
+  llvm::sys::path::append(relative_path,
+  llvm::Twine("lib") + CLANG_LIBDIR_SUFFIX, "clang",
+  CLANG_VERSION_STRING);
+
+  llvm::sys::path::append(clang_dir, relative_path);
+  if (!verify || VerifyClangPath(clang_dir)) {
+file_spec.GetDirectory().SetString(clang_dir);
+FileSystem::Instance().Resolve(file_spec);
+return true;
+  }
+
+  return HostInfoPosix::ComputePathRelativeToLibrary(file_spec, relative_path);
+}
+
+bool lldb_private::ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
+ FileSpec &file_spec, bool verify) {
+#if !defined(__APPLE__)
+  return DefaultComputeClangResourceDirectory(lldb_shlib_spec, file_spec,
+  verify);
+#else
+  std::string raw_path = lldb_shlib_spec.GetPath();
 
   auto rev_it = llvm::sys::path::rbegin(raw_path);
   auto r_end = llvm::sys::path::rend(raw_path);
@@ -65,8 +85,10 @@ bool lldb_private::ComputeClangDirectory
 ++rev_it;
   }
 
+  // Posix-style of LLDB detected.
   if (rev_it == r_end)
-return DefaultComputeC

[Lldb-commits] [lldb] r355471 - [ExpressionParser] Fix ComputeClangResourceDirectory for windows

2019-03-05 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Mar  5 17:57:04 2019
New Revision: 355471

URL: http://llvm.org/viewvc/llvm-project?rev=355471&view=rev
Log:
[ExpressionParser] Fix ComputeClangResourceDirectory for windows

The function signature of ComputeClangResourceDirectory for windows
wasn't updated when the others changed, causing the windows build to
fail. This should fix that.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=355471&r1=355470&r2=355471&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Tue Mar  5 
17:57:04 2019
@@ -29,7 +29,10 @@
 using namespace lldb_private;
 
 #if defined(_WIN32)
-static bool ComputeClangResourceDirectory(FileSpec &file_spec) { return false; 
}
+static bool ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
+  FileSpec &file_spec, bool verify) {
+  return false;
+}
 #else
 static bool VerifyClangPath(const llvm::Twine &clang_path) {
   if (FileSystem::Instance().IsDirectory(clang_path))


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


[Lldb-commits] [lldb] r355575 - Repair the build when LLDB_DISABLE_PYTHON is set

2019-03-06 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Wed Mar  6 17:02:55 2019
New Revision: 355575

URL: http://llvm.org/viewvc/llvm-project?rev=355575&view=rev
Log:
Repair the build when LLDB_DISABLE_PYTHON is set

Summary:
If LLDB_DISABLE_PYTHON is set, some functions are unavailable but
SBReproducer assumes they are. Let's conditionally register those functions
since they are conditionally declared.

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

Modified:
lldb/trunk/source/API/SBReproducer.cpp

Modified: lldb/trunk/source/API/SBReproducer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBReproducer.cpp?rev=355575&r1=355574&r2=355575&view=diff
==
--- lldb/trunk/source/API/SBReproducer.cpp (original)
+++ lldb/trunk/source/API/SBReproducer.cpp Wed Mar  6 17:02:55 2019
@@ -818,12 +818,14 @@ SBRegistry::SBRegistry() {
  ());
 LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBDebugger, GetFormatForType,
  (lldb::SBTypeNameSpecifier));
+#ifndef LLDB_DISABLE_PYTHON
 LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBDebugger, GetSummaryForType,
  (lldb::SBTypeNameSpecifier));
-LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType,
- (lldb::SBTypeNameSpecifier));
 LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBDebugger, 
GetSyntheticForType,
  (lldb::SBTypeNameSpecifier));
+#endif
+LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBDebugger, GetFilterForType,
+ (lldb::SBTypeNameSpecifier));
 LLDB_REGISTER_METHOD(bool, SBDebugger, EnableLog,
  (const char *, const char **));
   }
@@ -2436,47 +2438,49 @@ SBRegistry::SBRegistry() {
 LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFormats, ());
 LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSummaries, ());
 LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumFilters, ());
+#ifndef LLDB_DISABLE_PYTHON
 LLDB_REGISTER_METHOD(uint32_t, SBTypeCategory, GetNumSynthetics, ());
 LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForFilterAtIndex, (uint32_t));
-LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForFormatAtIndex, (uint32_t));
-LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
- GetTypeNameSpecifierForSummaryAtIndex, (uint32_t));
-LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
  GetTypeNameSpecifierForSyntheticAtIndex, (uint32_t));
-LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType,
- (lldb::SBTypeNameSpecifier));
-LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
- (lldb::SBTypeNameSpecifier));
 LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, 
GetSummaryForType,
  (lldb::SBTypeNameSpecifier));
 LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
  GetSyntheticForType, (lldb::SBTypeNameSpecifier));
 LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterAtIndex,
  (uint32_t));
-LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex,
- (uint32_t));
 LLDB_REGISTER_METHOD(lldb::SBTypeSummary, SBTypeCategory, 
GetSummaryAtIndex,
  (uint32_t));
 LLDB_REGISTER_METHOD(lldb::SBTypeSynthetic, SBTypeCategory,
  GetSyntheticAtIndex, (uint32_t));
+LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSummary,
+ (lldb::SBTypeNameSpecifier, lldb::SBTypeSummary));
+LLDB_REGISTER_METHOD(bool, SBTypeCategory, AddTypeSynthetic,
+ (lldb::SBTypeNameSpecifier, lldb::SBTypeSynthetic));
+LLDB_REGISTER_METHOD(bool, SBTypeCategory, DeleteTypeSynthetic,
+ (lldb::SBTypeNameSpecifier));
+#endif
+LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+ GetTypeNameSpecifierForFilterAtIndex, (uint32_t));
+LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+ GetTypeNameSpecifierForFormatAtIndex, (uint32_t));
+LLDB_REGISTER_METHOD(lldb::SBTypeNameSpecifier, SBTypeCategory,
+ GetTypeNameSpecifierForSummaryAtIndex, (uint32_t));
+LLDB_REGISTER_METHOD(lldb::SBTypeFilter, SBTypeCategory, GetFilterForType,
+ (lldb::SBTypeNameSpecifier));
+LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatForType,
+ (lldb::SBTypeNameSpecifier));
+LLDB_REGISTER_METHOD(lldb::SBTypeFormat, SBTypeCategory, GetFormatAtIndex,
+ (u

[Lldb-commits] [lldb] r355631 - [ExpressionParser] Implement ComputeClangResourceDir for Windows

2019-03-07 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Mar  7 12:09:15 2019
New Revision: 355631

URL: http://llvm.org/viewvc/llvm-project?rev=355631&view=rev
Log:
[ExpressionParser] Implement ComputeClangResourceDir for Windows

Summary: This function is useful for expression evaluation, especially when 
doing swift debugging on windows.

Reviewers: aprantl, labath

Reviewed By: labath

Subscribers: teemperor, jdoerfert, lldb-commits

Tags: #lldb

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

Modified:
lldb/trunk/include/lldb/Host/HostInfoBase.h
lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h
lldb/trunk/source/Host/common/HostInfoBase.cpp
lldb/trunk/source/Host/posix/HostInfoPosix.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.h
lldb/trunk/unittests/Expression/ClangParserTest.cpp

Modified: lldb/trunk/include/lldb/Host/HostInfoBase.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/HostInfoBase.h?rev=355631&r1=355630&r2=355631&view=diff
==
--- lldb/trunk/include/lldb/Host/HostInfoBase.h (original)
+++ lldb/trunk/include/lldb/Host/HostInfoBase.h Thu Mar  7 12:09:15 2019
@@ -99,6 +99,9 @@ public:
   //---
   static ArchSpec GetAugmentedArchSpec(llvm::StringRef triple);
 
+  static bool ComputePathRelativeToLibrary(FileSpec &file_spec,
+   llvm::StringRef dir);
+
 protected:
   static bool ComputeSharedLibraryDirectory(FileSpec &file_spec);
   static bool ComputeSupportExeDirectory(FileSpec &file_spec);

Modified: lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h?rev=355631&r1=355630&r2=355631&view=diff
==
--- lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h (original)
+++ lldb/trunk/include/lldb/Host/posix/HostInfoPosix.h Thu Mar  7 12:09:15 2019
@@ -32,9 +32,6 @@ public:
 
   static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
 
-  static bool ComputePathRelativeToLibrary(FileSpec &file_spec,
-   llvm::StringRef dir);
-
   static UserIDResolver &GetUserIDResolver();
 
 protected:

Modified: lldb/trunk/source/Host/common/HostInfoBase.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostInfoBase.cpp?rev=355631&r1=355630&r2=355631&view=diff
==
--- lldb/trunk/source/Host/common/HostInfoBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostInfoBase.cpp Thu Mar  7 12:09:15 2019
@@ -214,6 +214,38 @@ ArchSpec HostInfoBase::GetAugmentedArchS
   return ArchSpec(normalized_triple);
 }
 
+bool HostInfoBase::ComputePathRelativeToLibrary(FileSpec &file_spec,
+llvm::StringRef dir) {
+  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+
+  FileSpec lldb_file_spec = GetShlibDir();
+  if (!lldb_file_spec)
+return false;
+
+  std::string raw_path = lldb_file_spec.GetPath();
+  if (log)
+log->Printf("HostInfo::%s() attempting to "
+"derive the path %s relative to liblldb install path: %s",
+__FUNCTION__, dir.data(), raw_path.c_str());
+
+  // Drop bin (windows) or lib
+  llvm::StringRef parent_path = llvm::sys::path::parent_path(raw_path);
+  if (parent_path.empty()) {
+if (log)
+  log->Printf("HostInfo::%s() failed to find liblldb within the shared "
+  "lib path",
+  __FUNCTION__);
+return false;
+  }
+
+  raw_path = (parent_path + dir).str();
+  if (log)
+log->Printf("HostInfo::%s() derived the path as: %s", __FUNCTION__,
+raw_path.c_str());
+  file_spec.GetDirectory().SetString(raw_path);
+  return (bool)file_spec.GetDirectory();
+}
+
 bool HostInfoBase::ComputeSharedLibraryDirectory(FileSpec &file_spec) {
   // To get paths related to LLDB we get the path to the executable that
   // contains this function. On MacOSX this will be "LLDB.framework/.../LLDB".

Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=355631&r1=355630&r2=355631&view=diff
==
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Thu Mar  7 12:09:15 2019
@@ -120,43 +120,6 @@ uint32_t HostInfoPosix::GetEffectiveGrou
 
 FileSpec HostInfoPosix::GetDefaultShell() { return FileSpec("/bin/sh"); }
 
-bool HostInfoPosix::ComputePathRelativeToLibrary(FileSpec &file_spec,
- llvm::St

[Lldb-commits] [lldb] r355648 - Fix TestPaths.py on windows

2019-03-07 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Thu Mar  7 14:37:23 2019
New Revision: 355648

URL: http://llvm.org/viewvc/llvm-project?rev=355648&view=rev
Log:
Fix TestPaths.py on windows

I committed an implementation of GetClangResourceDir on windows but
forgot to update this test. I merged the tests like I intended to, but I
realized that the test was actually failing. After looking into it, it
appears that FileSystem::Resolve was taking the path and setting
the FileSpec's Directory to "/path/to/lldb/lib/clang/" and the File to
"9.0.0" which isn't what we want. So I removed the resolve line from
DefaultComputeClangResourceDir.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py?rev=355648&r1=355647&r2=355648&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py 
Thu Mar  7 14:37:23 2019
@@ -25,22 +25,14 @@ class TestPaths(TestBase):
   lldb.ePathTypePythonDir,
   lldb.ePathTypeLLDBSystemPlugins,
   lldb.ePathTypeLLDBUserPlugins,
-  lldb.ePathTypeLLDBTempSystemDir]
+  lldb.ePathTypeLLDBTempSystemDir,
+  lldb.ePathTypeClangDir]
 
 for path_type in dir_path_types:
 f = lldb.SBHostOS.GetLLDBPath(path_type)
 # No directory path types should have the filename set
 self.assertTrue(f.GetFilename() is None)
 
-# TODO: Merge into test_path when GetClangResourceDir is implemented on
-# windows
-@expectedFailureAll(oslist=["windows"])
-@no_debug_info_test
-def test_clang_dir_path(self):
-  '''Test to make sure clang dir is set correctly'''
-  clang_dir = lldb.SBHostOS.GetLLDBPath(lldb.ePathTypeClangDir)
-  self.assertFalse(clang_dir.GetDirectory() is None)
-
 @no_debug_info_test
 def test_directory_doesnt_end_with_slash(self):
 current_directory_spec = lldb.SBFileSpec(os.path.curdir)

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=355648&r1=355647&r2=355648&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Thu Mar  7 
14:37:23 2019
@@ -54,7 +54,6 @@ static bool DefaultComputeClangResourceD
   llvm::sys::path::append(clang_dir, relative_path);
   if (!verify || VerifyClangPath(clang_dir)) {
 file_spec.GetDirectory().SetString(clang_dir);
-FileSystem::Instance().Resolve(file_spec);
 return true;
   }
 


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


[Lldb-commits] [lldb] r355875 - Rewrite comment to be clearer

2019-03-11 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Mar 11 15:49:36 2019
New Revision: 355875

URL: http://llvm.org/viewvc/llvm-project?rev=355875&view=rev
Log:
Rewrite comment to be clearer

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=355875&r1=355874&r2=355875&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Mon Mar 11 
15:49:36 2019
@@ -78,7 +78,7 @@ bool lldb_private::ComputeClangResourceD
 ++rev_it;
   }
 
-  // Posix-style of LLDB detected.
+  // We found a non-framework build of LLDB
   if (rev_it == r_end)
 return DefaultComputeClangResourceDirectory(lldb_shlib_spec, file_spec,
 verify);


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


[Lldb-commits] [lldb] r356079 - [ExpressionParser] Restore removed intance of FileSystem::Resolve while resolving clang resource dir

2019-03-13 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Wed Mar 13 11:51:22 2019
New Revision: 356079

URL: http://llvm.org/viewvc/llvm-project?rev=356079&view=rev
Log:
[ExpressionParser] Restore removed intance of FileSystem::Resolve while 
resolving clang resource dir

I committed a change that removed this line, but I meant to restore it
befor committing.

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=356079&r1=356078&r2=356079&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Wed Mar 13 
11:51:22 2019
@@ -54,6 +54,7 @@ static bool DefaultComputeClangResourceD
   llvm::sys::path::append(clang_dir, relative_path);
   if (!verify || VerifyClangPath(clang_dir)) {
 file_spec.GetDirectory().SetString(clang_dir);
+FileSystem::Instance().Resolve(file_spec);
 return true;
   }
 


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


[Lldb-commits] [lldb] r356412 - [CMake] Set LLVM_DEFAULT_EXTERNAL_LIT in standalone build correctly on windows

2019-03-18 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Mon Mar 18 14:32:31 2019
New Revision: 356412

URL: http://llvm.org/viewvc/llvm-project?rev=356412&view=rev
Log:
[CMake] Set LLVM_DEFAULT_EXTERNAL_LIT in standalone build correctly on windows

LLVM installed llvm-lit with a .py suffix on windows. Let's match that
behavior here.

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=356412&r1=356411&r2=356412&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Mon Mar 18 14:32:31 2019
@@ -23,7 +23,12 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to 
llvm/include")
   set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
-  set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH 
"Path to llvm-lit")
+
+  set(lit_file_name "llvm-lit")
+  if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
+set(lit_file_name "${lit_file_name}.py")
+  endif()
+  set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_TOOLS_BINARY_DIR}/${lit_file_name}" 
CACHE PATH "Path to llvm-lit")
 
   if(CMAKE_CROSSCOMPILING)
 set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")


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


[Lldb-commits] [lldb] r357030 - [ExpressionParser] Add swift-lldb case for finding clang resource dir

2019-03-26 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Mar 26 14:00:42 2019
New Revision: 357030

URL: http://llvm.org/viewvc/llvm-project?rev=357030&view=rev
Log:
[ExpressionParser] Add swift-lldb case for finding clang resource dir

Summary:
I'm adding this to reduce the difference between swift-lldb and
llvm.org's lldb.

Reviewers: aprantl, davide, compnerd, JDevlieghere, jingham

Subscribers: lldb-commits

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

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
lldb/trunk/unittests/Expression/ClangParserTest.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp?rev=357030&r1=357029&r2=357030&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Tue Mar 26 
14:00:42 2019
@@ -16,6 +16,7 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Threading.h"
 
+#include "lldb/Host/Config.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/FileSpec.h"
@@ -40,25 +41,43 @@ static bool VerifyClangPath(const llvm::
 /// This will compute the clang resource directory assuming that clang was
 /// installed with the same prefix as lldb.
 ///
+/// If verify is true, the first candidate resource directory will be returned.
+/// This mode is only used for testing.
+///
 static bool DefaultComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,
- FileSpec &file_spec, bool verify) {
+ FileSpec &file_spec,
+ bool verify) {
+  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
   std::string raw_path = lldb_shlib_spec.GetPath();
   llvm::StringRef parent_dir = llvm::sys::path::parent_path(raw_path);
 
-  llvm::SmallString<256> clang_dir(parent_dir);
-  llvm::SmallString<32> relative_path;
-  llvm::sys::path::append(relative_path,
-  llvm::Twine("lib") + CLANG_LIBDIR_SUFFIX, "clang",
-  CLANG_VERSION_STRING);
-
-  llvm::sys::path::append(clang_dir, relative_path);
-  if (!verify || VerifyClangPath(clang_dir)) {
-file_spec.GetDirectory().SetString(clang_dir);
-FileSystem::Instance().Resolve(file_spec);
-return true;
+  static const llvm::StringRef kResourceDirSuffixes[] = {
+  // LLVM.org's build of LLDB uses the clang resource directory placed
+  // in $install_dir/lib{,64}/clang/$clang_version.
+  "lib" CLANG_LIBDIR_SUFFIX "/clang/" CLANG_VERSION_STRING,
+  // swift-lldb uses the clang resource directory copied from swift, which
+  // by default is placed in $install_dir/lib{,64}/lldb/clang. LLDB places
+  // it there, so we use LLDB_LIBDIR_SUFFIX.
+  "lib" LLDB_LIBDIR_SUFFIX "/lldb/clang",
+  };
+
+  for (const auto &Suffix : kResourceDirSuffixes) {
+llvm::SmallString<256> clang_dir(parent_dir);
+llvm::SmallString<32> relative_path(Suffix);
+llvm::sys::path::native(relative_path);
+llvm::sys::path::append(clang_dir, relative_path);
+if (!verify || VerifyClangPath(clang_dir)) {
+  if (log)
+log->Printf("DefaultComputeClangResourceDir: Setting ClangResourceDir "
+"to \"%s\", verify = %s",
+clang_dir.str().str().c_str(), verify ? "true" : "false");
+  file_spec.GetDirectory().SetString(clang_dir);
+  FileSystem::Instance().Resolve(file_spec);
+  return true;
+}
   }
 
-  return HostInfo::ComputePathRelativeToLibrary(file_spec, relative_path);
+  return false;
 }
 
 bool lldb_private::ComputeClangResourceDirectory(FileSpec &lldb_shlib_spec,

Modified: lldb/trunk/unittests/Expression/ClangParserTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Expression/ClangParserTest.cpp?rev=357030&r1=357029&r2=357030&view=diff
==
--- lldb/trunk/unittests/Expression/ClangParserTest.cpp (original)
+++ lldb/trunk/unittests/Expression/ClangParserTest.cpp Tue Mar 26 14:00:42 2019
@@ -50,9 +50,8 @@ TEST_F(ClangHostTest, ComputeClangResour
   EXPECT_EQ(ComputeClangResourceDir(path_to_liblldb), path_to_clang_dir);
 
   // The path doesn't really exist, so setting verify to true should make
-  // ComputeClangResourceDir to not give you path_to_clang_dir.
-  EXPECT_NE(ComputeClangResourceDir(path_to_liblldb, true),
-ComputeClangResourceDir(path_to_liblldb));
+  // ComputeClangResourceDir not give you path_to_clang_dir.
+  EXPECT_NE(ComputeClangResourceDir(path_to_liblldb, true), path_to_clang_dir);
 }
 
 #if defined(__APPLE__)


___
lldb-commits mailing list
lldb-commi

[Lldb-commits] [lldb] r357817 - [CMake] Don't explicitly use LLVM_LIBRARY_DIR in standalone builds

2019-04-05 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Fri Apr  5 14:01:50 2019
New Revision: 357817

URL: http://llvm.org/viewvc/llvm-project?rev=357817&view=rev
Log:
[CMake] Don't explicitly use LLVM_LIBRARY_DIR in standalone builds

Summary:
This line is unnecessary because add_llvm_executable will handle
linking the correct LLVM libraries for you. LLDB standalone builds are totally
fine without this.

In the best case, having this line here is harmless. In the worst case it can
cause link issues.

If you build lldb-server for android using the standalone build, this line
will cause LLVM_LIBRARY_DIR to be the first place you look for libraries.
This is an issue because if you built libc++, it will try to link against
that one instead of the one from the android NDK.  Meanwhile, the LLVM libraries
you're linking against were linked against the libc++ from the NDK.

Ideally, we would take advantage of the AFTER option for link_directories(), but
that was not available in LLDB's minimum supported version of CMake (CMake 
3.4.3).

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

Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake

Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=357817&r1=357816&r2=357817&view=diff
==
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Fri Apr  5 14:01:50 2019
@@ -21,7 +21,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
 
   set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM 
source tree")
   set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to 
llvm/include")
-  set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
   set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
 
   set(lit_file_name "llvm-lit")
@@ -95,8 +94,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
 "${LLVM_INCLUDE_DIRS}"
 "${CLANG_INCLUDE_DIRS}")
 
-  link_directories("${LLVM_LIBRARY_DIR}")
-
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY 
${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})


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


[Lldb-commits] [lldb] r358530 - [Process] Fix linux arm64 single step compilation failure

2019-04-16 Thread Alex Langford via lldb-commits
Author: xiaobai
Date: Tue Apr 16 14:21:28 2019
New Revision: 358530

URL: http://llvm.org/viewvc/llvm-project?rev=358530&view=rev
Log:
[Process] Fix linux arm64 single step compilation failure

This was updated in r356703 to use llvm::sys::RetryAfterSignal, which
comes from llvm/Support/Errno.h. The header wasn't added, so it fails if
you compile for arm64/aarch64.

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

Modified: lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp?rev=358530&r1=358529&r2=358530&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/SingleStepCheck.cpp Tue Apr 16 
14:21:28 2019
@@ -16,6 +16,7 @@
 #include "NativeProcessLinux.h"
 
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/Errno.h"
 
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "lldb/Host/linux/Ptrace.h"


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


[Lldb-commits] [lldb] [lldb] Parse and display register field enums (PR #95768)

2024-06-28 Thread Alex Langford via lldb-commits


@@ -4179,21 +4179,124 @@ struct GdbServerTargetInfo {
   RegisterSetMap reg_set_map;
 };
 
-static std::vector ParseFlagsFields(XMLNode flags_node,
-  unsigned size) {
+static FieldEnum::Enumerators ParseEnumEvalues(const XMLNode &enum_node) {
+  Log *log(GetLog(GDBRLog::Process));
+  // We will use the last instance of each value. Also we preserve the order
+  // of declaration in the XML, as it may not be numerical.
+  std::map enumerators;

bulbazord wrote:

That's fair, was mostly asking to get an idea of what one can expect the data 
to look like. std::map is a fine choice here :)

https://github.com/llvm/llvm-project/pull/95768
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [llvm] [lldb][FreeBSD][AArch64] Enable register field detection (PR #85058)

2024-06-28 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

Can't say I know a ton about FreeBSD but this looks fine to me. I left one 
suggestion but I would recommend getting a sign-off from one of the FreeBSD 
folks.

https://github.com/llvm/llvm-project/pull/85058
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [llvm] [lldb][FreeBSD][AArch64] Enable register field detection (PR #85058)

2024-06-28 Thread Alex Langford via lldb-commits

https://github.com/bulbazord edited 
https://github.com/llvm/llvm-project/pull/85058
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [llvm] [lldb][FreeBSD][AArch64] Enable register field detection (PR #85058)

2024-06-28 Thread Alex Langford via lldb-commits


@@ -18,9 +18,9 @@ namespace lldb_private {
 struct RegisterInfo;
 
 /// This class manages the storage and detection of register field information
-/// for Arm64 Linux registers. The same register may have different fields on
-/// different CPUs. This class abstracts out the field detection process so we
-/// can use it on live processes and core files.
+/// for Arm64 Linux and FreeBSD registers. The same register may have different

bulbazord wrote:

Suggestion: Remove the mention of Linux and FreeBSD. If this class is used for 
more platforms without updating this comment, the comment will be wrong.

https://github.com/llvm/llvm-project/pull/85058
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits

https://github.com/bulbazord edited 
https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -0,0 +1,70 @@
+from abc import abstractmethod

bulbazord wrote:

This is an entire scripting interface. Maybe a separate PR would be more 
appropriate? Seems like you're doing multiple things here.

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -25,10 +25,17 @@ if (LLDB_ENABLE_PYTHON AND SPHINX_FOUND)
 # Pretend that the SWIG generated API is a Python package.
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lldb)
 get_target_property(lldb_bindings_dir swig_wrapper_python BINARY_DIR)
+

bulbazord wrote:

nit: stray space?

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits

https://github.com/bulbazord commented:

I know you've been thinking about and working on this for a while, so glad to 
see it come together like this! 😃 

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -0,0 +1,36 @@
+Python Extensions
+=
+
+LLDB provides many scriptable extensions to augment the debugger capabilities
+and give the ability to the user to tailor their experience to their own needs.
+
+This page describes some of these scripting extension:

bulbazord wrote:

`extension` -> `extensions`

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -0,0 +1,36 @@
+Python Extensions
+=
+
+LLDB provides many scriptable extensions to augment the debugger capabilities
+and give the ability to the user to tailor their experience to their own needs.

bulbazord wrote:

Suggestion: `LLDB provides scriptable extensions to augment the debugger's 
capabilities. This gives users the ability to tailor their debugging experience 
to their own needs.`

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -10,9 +10,6 @@ class ScriptedPlatform(metaclass=ABCMeta):
 
 Most of the base class methods are `@abstractmethod` that need to be
 overwritten by the inheriting class.
-
-DISCLAIMER: THIS INTERFACE IS STILL UNDER DEVELOPMENT AND NOT STABLE.
-THE METHODS EXPOSED MIGHT CHANGE IN THE FUTURE.

bulbazord wrote:

Why remove the disclaimer? Is this no longer true?

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -0,0 +1,36 @@
+Python Extensions
+=
+
+LLDB provides many scriptable extensions to augment the debugger capabilities
+and give the ability to the user to tailor their experience to their own needs.
+
+This page describes some of these scripting extension:
+
+Operating System Thread Plugins
+---
+

bulbazord wrote:

A short blurb explaining what each of these are for would be useful. It may not 
be obvious what "Operating System Thread Plugins" are for, as an example.

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Alias `script` command to `scripting run` (PR #97263)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -518,6 +518,15 @@ void CommandInterpreter::Initialize() {
 AddAlias("re", cmd_obj_sp);
   }
 
+  cmd_obj_sp = GetCommandSPExact("scripting execute");
+  if (cmd_obj_sp) {
+AddAlias("sc", cmd_obj_sp);
+AddAlias("scr", cmd_obj_sp);
+AddAlias("scri", cmd_obj_sp);
+AddAlias("scrip", cmd_obj_sp);
+AddAlias("script", cmd_obj_sp);

bulbazord wrote:

Might be a good idea to write a comment explaining the constraint here? If I 
came across this code snippet I'd definitely want to know why we do this.

https://github.com/llvm/llvm-project/pull/97263
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw 
{
   CommandOptions m_options;
 };
 
+#pragma mark CommandObjectScriptingTemplateList
+
+#define LLDB_OPTIONS_scripting_template_list
+#include "CommandOptions.inc"
+
+class CommandObjectScriptingTemplateList : public CommandObjectParsed {
+public:
+  CommandObjectScriptingTemplateList(CommandInterpreter &interpreter)
+  : CommandObjectParsed(
+interpreter, "scripting template list",
+"List all the available scripting affordances templates. ",
+"scripting template list [--language  --]") {}
+
+  ~CommandObjectScriptingTemplateList() override = default;
+
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+CommandOptions() = default;
+~CommandOptions() override = default;
+Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+  ExecutionContext *execution_context) override {
+  Status error;
+  const int short_option = m_getopt_table[option_idx].val;
+
+  switch (short_option) {
+  case 'l':
+language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
+option_arg, GetDefinitions()[option_idx].enum_values,
+eScriptLanguageNone, error);
+if (!error.Success())
+  error.SetErrorStringWithFormat("unrecognized value for language 
'%s'",
+ option_arg.str().c_str());
+break;
+  default:
+llvm_unreachable("Unimplemented option");
+  }
+
+  return error;
+}
+
+void OptionParsingStarting(ExecutionContext *execution_context) override {
+  language = lldb::eScriptLanguageNone;
+}
+
+llvm::ArrayRef GetDefinitions() override {
+  return llvm::ArrayRef(g_scripting_template_list_options);
+}
+
+lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
+  };
+
+protected:
+  void DoExecute(Args &command, CommandReturnObject &result) override {
+lldb::ScriptLanguage language =
+(m_options.language == lldb::eScriptLanguageNone)
+? m_interpreter.GetDebugger().GetScriptLanguage()
+: m_options.language;
+
+if (language == lldb::eScriptLanguageNone) {
+  result.AppendError(
+  "the script-lang setting is set to none - scripting not available");
+  return;
+}
+
+ScriptInterpreter *script_interpreter =
+GetDebugger().GetScriptInterpreter(true, language);
+
+if (script_interpreter == nullptr) {
+  result.AppendError("no script interpreter");
+  return;
+}
+
+Stream &s = result.GetOutputStream();
+s.Printf("Available scripted affordances:\n");

bulbazord wrote:

Suggestion: `Available scripting templates`. My reason is that the command is 
`scripting template list` so I would expect it to tell me what the available 
scripting templates are.

Additionally, it might be useful to specify the language. So something like 
`Available scripting templates (Python)` or something like that. This would let 
you drop the `print_field("Language", "Python")` below.

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw 
{
   CommandOptions m_options;
 };
 
+#pragma mark CommandObjectScriptingTemplateList
+
+#define LLDB_OPTIONS_scripting_template_list
+#include "CommandOptions.inc"
+
+class CommandObjectScriptingTemplateList : public CommandObjectParsed {
+public:
+  CommandObjectScriptingTemplateList(CommandInterpreter &interpreter)
+  : CommandObjectParsed(
+interpreter, "scripting template list",
+"List all the available scripting affordances templates. ",
+"scripting template list [--language  --]") {}
+
+  ~CommandObjectScriptingTemplateList() override = default;
+
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+CommandOptions() = default;
+~CommandOptions() override = default;
+Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+  ExecutionContext *execution_context) override {
+  Status error;
+  const int short_option = m_getopt_table[option_idx].val;
+
+  switch (short_option) {
+  case 'l':
+language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
+option_arg, GetDefinitions()[option_idx].enum_values,
+eScriptLanguageNone, error);
+if (!error.Success())
+  error.SetErrorStringWithFormat("unrecognized value for language 
'%s'",
+ option_arg.str().c_str());
+break;
+  default:
+llvm_unreachable("Unimplemented option");
+  }
+
+  return error;
+}
+
+void OptionParsingStarting(ExecutionContext *execution_context) override {
+  language = lldb::eScriptLanguageNone;
+}
+
+llvm::ArrayRef GetDefinitions() override {
+  return llvm::ArrayRef(g_scripting_template_list_options);
+}
+
+lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
+  };
+
+protected:
+  void DoExecute(Args &command, CommandReturnObject &result) override {
+lldb::ScriptLanguage language =
+(m_options.language == lldb::eScriptLanguageNone)
+? m_interpreter.GetDebugger().GetScriptLanguage()
+: m_options.language;
+
+if (language == lldb::eScriptLanguageNone) {
+  result.AppendError(
+  "the script-lang setting is set to none - scripting not available");
+  return;
+}
+
+ScriptInterpreter *script_interpreter =
+GetDebugger().GetScriptInterpreter(true, language);
+
+if (script_interpreter == nullptr) {
+  result.AppendError("no script interpreter");
+  return;
+}
+
+Stream &s = result.GetOutputStream();
+s.Printf("Available scripted affordances:\n");
+
+auto print_field = [&s](llvm::StringRef key, llvm::StringRef value,
+bool check_validy = false) {
+  if (!check_validy || !value.empty()) {
+s.IndentMore();
+s.Indent();
+s << key << ": " << value << '\n';
+s.IndentLess();
+  }
+};
+auto print_usages = [&s](llvm::StringRef usage_kind,
+ std::vector &usages) {
+  s.IndentMore();
+  s.Indent();
+  s << usage_kind << " Usages:";
+  if (usages.empty())
+s << " No usages.\n";
+  else if (usages.size() == 1)
+s << " " << usages.front() << '\n';
+  else {
+s << '\n';
+for (llvm::StringRef usage : usages) {
+  s.IndentMore();
+  s.Indent();
+  s << usage << '\n';
+  s.IndentLess();
+}
+  }
+  s.IndentLess();
+};
+
+size_t i = 0;
+for (llvm::StringRef plugin_name =
+ PluginManager::GetScriptedInterfaceNameAtIndex(i);
+ !plugin_name.empty();) {

bulbazord wrote:

Increment `i` here instead of below? It would be more resilient to making 
mistakes when modifying this loop for any reason.

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -127,6 +130,171 @@ class CommandObjectScriptingRun : public CommandObjectRaw 
{
   CommandOptions m_options;
 };
 
+#pragma mark CommandObjectScriptingTemplateList
+
+#define LLDB_OPTIONS_scripting_template_list
+#include "CommandOptions.inc"
+
+class CommandObjectScriptingTemplateList : public CommandObjectParsed {
+public:
+  CommandObjectScriptingTemplateList(CommandInterpreter &interpreter)
+  : CommandObjectParsed(
+interpreter, "scripting template list",
+"List all the available scripting affordances templates. ",
+"scripting template list [--language  --]") {}
+
+  ~CommandObjectScriptingTemplateList() override = default;
+
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+CommandOptions() = default;
+~CommandOptions() override = default;
+Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+  ExecutionContext *execution_context) override {
+  Status error;
+  const int short_option = m_getopt_table[option_idx].val;
+
+  switch (short_option) {
+  case 'l':
+language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
+option_arg, GetDefinitions()[option_idx].enum_values,
+eScriptLanguageNone, error);
+if (!error.Success())
+  error.SetErrorStringWithFormat("unrecognized value for language 
'%s'",
+ option_arg.str().c_str());
+break;
+  default:
+llvm_unreachable("Unimplemented option");
+  }
+
+  return error;
+}
+
+void OptionParsingStarting(ExecutionContext *execution_context) override {
+  language = lldb::eScriptLanguageNone;
+}
+
+llvm::ArrayRef GetDefinitions() override {
+  return llvm::ArrayRef(g_scripting_template_list_options);
+}
+
+lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
+  };
+
+protected:
+  void DoExecute(Args &command, CommandReturnObject &result) override {
+lldb::ScriptLanguage language =
+(m_options.language == lldb::eScriptLanguageNone)
+? m_interpreter.GetDebugger().GetScriptLanguage()
+: m_options.language;
+
+if (language == lldb::eScriptLanguageNone) {
+  result.AppendError(
+  "the script-lang setting is set to none - scripting not available");
+  return;
+}
+
+ScriptInterpreter *script_interpreter =
+GetDebugger().GetScriptInterpreter(true, language);
+
+if (script_interpreter == nullptr) {
+  result.AppendError("no script interpreter");
+  return;
+}
+
+Stream &s = result.GetOutputStream();
+s.Printf("Available scripted affordances:\n");
+
+auto print_field = [&s](llvm::StringRef key, llvm::StringRef value,
+bool check_validy = false) {

bulbazord wrote:

typo: `validy` -> `validity`?


Also, what's the use case for the check? I don't see you use it.

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -29,6 +29,9 @@ add_subdirectory(UnwindAssembly)
 
 set(LLDB_STRIPPED_PLUGINS)
 get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
+get_property(LLDB_EXTRA_PLUGINS GLOBAL PROPERTY LLDB_EXTRA_SCRIPT_PLUGINS)
+list(APPEND LLDB_ALL_PLUGINS ${LLDB_EXTRA_PLUGINS})

bulbazord wrote:

I don't think there's a benefit to splitting the plugins into two different 
global properties. Is there a reason why we should treat these script plugins 
differently? 

Also I see you doing that for the python plugins below, how about the Lua ones?

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Fix flake in TestZerothFrame.py (PR #96685)

2024-07-02 Thread Alex Langford via lldb-commits

bulbazord wrote:

Yes, looks good to me. Thanks for taking the time! :)

https://github.com/llvm/llvm-project/pull/96685
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

2024-07-02 Thread Alex Langford via lldb-commits


@@ -0,0 +1,36 @@
+Python Extensions
+=
+
+LLDB provides many scriptable extensions to augment the debugger capabilities
+and give the ability to the user to tailor their experience to their own needs.
+
+This page describes some of these scripting extension:
+
+Operating System Thread Plugins
+---
+

bulbazord wrote:

Ah, this looks great! Thanks for showing me what it will look like :)

https://github.com/llvm/llvm-project/pull/97262
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][AArch64] Add register field enum information (PR #96887)

2024-07-02 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

LGTM, seems like the natural progression of this work. :)

https://github.com/llvm/llvm-project/pull/96887
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add scripted thread plan python base class to lldb & website (PR #97481)

2024-07-02 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.


https://github.com/llvm/llvm-project/pull/97481
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [lldb] [llvm] [llvm][TargetParser] Return optional from getHostCPUFeatures (PR #97824)

2024-07-05 Thread Alex Langford via lldb-commits

https://github.com/bulbazord commented:

>From an API standpoint, there doesn't actually seem to be a huge difference 
>between an empty StringMap and an optional with an empty string map in it 
>right? Why not return a map every time?

https://github.com/llvm/llvm-project/pull/97824
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-05 Thread Alex Langford via lldb-commits


@@ -29,6 +29,9 @@ add_subdirectory(UnwindAssembly)
 
 set(LLDB_STRIPPED_PLUGINS)
 get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
+get_property(LLDB_EXTRA_PLUGINS GLOBAL PROPERTY LLDB_EXTRA_SCRIPT_PLUGINS)
+list(APPEND LLDB_ALL_PLUGINS ${LLDB_EXTRA_PLUGINS})

bulbazord wrote:

I see why this doesn't work now. LLDB plugins are added to the `LLDB_PLUGINS` 
global property via the PLUGIN argument to `add_lldb_library`. You aren't 
adding the PLUGIN argument to the `add_lldb_library` invocation in 
`lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt`. This 
is how the build system knows the list of plugins.

But even if you were to remove this and add that `PLUGIN` argument, this still 
wouldn't work. I don't think we've explicitly documented this behavior, but 
LLDB expects each library to be one plugin, not three as you've done here. When 
LLDB creates a plugin, it's going to generate a `Plugins.def` file that LLDB 
uses to initialize and teardown all plugins. It has a list of entries that look 
like this:
`LLDB_PLUGIN(lldbPluginFooBar)`. There are some exceptions for the script 
interpreter plugins (not sure why, didn't check). It also expects the 
`LLDB_PLUGIN_DEFINE` argument to match the library name exactly (without the 
initial `lldbPlugin`, specifically).

The way I see it, you have three options:
1. Restructure the build so that there are 3 libraries, each one of them a 
plugin.
2. Change LLDB's CMake machinery to accept libraries that define multiple 
plugin interfaces. You'll need to modify `add_lldb_library` so that you can 
pass it a list of plugin interface names instead of assuming the plugin names 
matches the library's name.
3. Keep the workaround and document why it exists.

I would suggest (1) or (2). I think (3) is just kicking the can down the road. 
This is a solution that explicitly works around LLDB's existing plugin system, 
is difficult to discover without knowing its there, and could make future 
refactors more difficult.

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Commands] Add `scripting template list` command with auto discovery (PR #97273)

2024-07-05 Thread Alex Langford via lldb-commits


@@ -19,6 +19,12 @@ if (LLDB_ENABLE_LIBEDIT)
   list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
 endif()
 
+set_property(GLOBAL PROPERTY LLDB_EXTRA_SCRIPT_PLUGINS
+  lldbPluginOperatingSystemPythonInterface
+  lldbPluginScriptedProcessPythonInterface
+  lldbPluginScriptedThreadPlanPythonInterface

bulbazord wrote:

No, you're just adding some elements to the list `LLDB_EXTRA_SCRIPT_PLUGINS`. 
Right below this is `add_lldb_library` which creates one library. It will 
contain the 3 cpp files that implement these plugin interfaces.

https://github.com/llvm/llvm-project/pull/97273
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-08 Thread Alex Langford via lldb-commits


@@ -58,10 +58,17 @@ DAP::DAP()
 
 DAP::~DAP() = default;
 
+/// Return string with first character capitalized.
+static std::string capitalize(llvm::StringRef str) {
+  if (str.empty())
+return "";
+  return ((llvm::Twine)llvm::toUpper(str[0]) + str.drop_front()).str();
+}
+
 void DAP::PopulateExceptionBreakpoints() {
   llvm::call_once(init_exception_breakpoints_flag, [this]() {
 exception_breakpoints = std::vector {};
-
+

bulbazord wrote:

Unrelated whitespace change

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-08 Thread Alex Langford via lldb-commits


@@ -26,3 +26,43 @@ SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType 
language) {
 
   return Language::GetNameForLanguageType(language);
 }
+
+bool SBLanguageRuntime::LanguageIsCPlusPlus(lldb::LanguageType language) {
+  return Language::LanguageIsCPlusPlus(language);
+}
+
+bool SBLanguageRuntime::LanguageIsObjC(lldb::LanguageType language) {
+  return Language::LanguageIsObjC(language);
+}
+
+bool SBLanguageRuntime::LanguageIsCFamily(lldb::LanguageType language) {
+  return Language::LanguageIsCFamily(language);
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnThrow(
+lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return lang_plugin->SupportsExceptionBreakpointsOnThrow();
+  return false;
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnCatch(
+lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return lang_plugin->SupportsExceptionBreakpointsOnCatch();
+  return false;
+}
+
+const char *
+SBLanguageRuntime::GetThrowKeywordForLanguage(lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return lang_plugin->GetThrowKeyword().data();

bulbazord wrote:

You should wrap these in `ConstString`. It is not safe in general for LLDB to 
pass out `const char *` values that are derived from `llvm::StringRef`. I know 
that `GetThrowKeyword` and `GetCatchKeyword` are passing out static c-strings 
wrapped in a `llvm::StringRef`, but those are virtual and plugins may not do 
the same.

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-08 Thread Alex Langford via lldb-commits


@@ -80,6 +87,46 @@ void DAP::PopulateExceptionBreakpoints() {
   exception_breakpoints->emplace_back("swift_throw", "Swift Throw",
   lldb::eLanguageTypeSwift);
 }
+// Besides handling the hardcoded list of languages from above, we try to
+// find any other languages that support exception breakpoints using the
+// SB API.
+for (int raw_lang = lldb::eLanguageTypeUnknown;
+ raw_lang < lldb::eNumLanguageTypes; ++raw_lang) {
+  lldb::LanguageType lang = static_cast(raw_lang);
+
+  // We first discard any languages already handled above.
+  if (lldb::SBLanguageRuntime::LanguageIsCFamily(lang) ||
+  lang == lldb::eLanguageTypeSwift)
+continue;
+
+  if (!lldb::SBDebugger::SupportsLanguage(lang))
+continue;
+
+  const char *name = lldb::SBLanguageRuntime::GetNameForLanguageType(lang);
+  if (!name)
+continue;
+  std::string raw_lang_name = name;
+  std::string capitalized_lang_name = capitalize(name);
+  const char *raw_throw_keyword =
+  lldb::SBLanguageRuntime::GetThrowKeywordForLanguage(lang);
+  const char *raw_catch_keyword =
+  lldb::SBLanguageRuntime::GetCatchKeywordForLanguage(lang);
+  std::string throw_keyword =
+  raw_throw_keyword ? raw_throw_keyword : "throw";
+  std::string catch_keyword =
+  raw_catch_keyword ? raw_catch_keyword : "catch";
+
+  if (lldb::SBLanguageRuntime::SupportsExceptionBreakpointsOnThrow(lang)) {
+exception_breakpoints->emplace_back(
+raw_lang_name + "_" + throw_keyword,
+capitalized_lang_name + " " + capitalize(throw_keyword), lang);
+  }

bulbazord wrote:

nit: [single-statement if 
](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements)

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-08 Thread Alex Langford via lldb-commits


@@ -80,6 +87,46 @@ void DAP::PopulateExceptionBreakpoints() {
   exception_breakpoints->emplace_back("swift_throw", "Swift Throw",
   lldb::eLanguageTypeSwift);
 }
+// Besides handling the hardcoded list of languages from above, we try to
+// find any other languages that support exception breakpoints using the
+// SB API.
+for (int raw_lang = lldb::eLanguageTypeUnknown;
+ raw_lang < lldb::eNumLanguageTypes; ++raw_lang) {
+  lldb::LanguageType lang = static_cast(raw_lang);
+
+  // We first discard any languages already handled above.
+  if (lldb::SBLanguageRuntime::LanguageIsCFamily(lang) ||
+  lang == lldb::eLanguageTypeSwift)
+continue;
+
+  if (!lldb::SBDebugger::SupportsLanguage(lang))
+continue;
+
+  const char *name = lldb::SBLanguageRuntime::GetNameForLanguageType(lang);
+  if (!name)
+continue;
+  std::string raw_lang_name = name;
+  std::string capitalized_lang_name = capitalize(name);
+  const char *raw_throw_keyword =
+  lldb::SBLanguageRuntime::GetThrowKeywordForLanguage(lang);
+  const char *raw_catch_keyword =
+  lldb::SBLanguageRuntime::GetCatchKeywordForLanguage(lang);
+  std::string throw_keyword =
+  raw_throw_keyword ? raw_throw_keyword : "throw";
+  std::string catch_keyword =
+  raw_catch_keyword ? raw_catch_keyword : "catch";
+
+  if (lldb::SBLanguageRuntime::SupportsExceptionBreakpointsOnThrow(lang)) {
+exception_breakpoints->emplace_back(
+raw_lang_name + "_" + throw_keyword,
+capitalized_lang_name + " " + capitalize(throw_keyword), lang);
+  }
+  if (lldb::SBLanguageRuntime::SupportsExceptionBreakpointsOnCatch(lang)) {
+exception_breakpoints->emplace_back(
+raw_lang_name + "_" + catch_keyword,
+capitalized_lang_name + " " + capitalize(catch_keyword), lang);
+  }

bulbazord wrote:

same as above

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix string truncation method when substring is the prefix of string (NFC) (PR #94785)

2024-07-08 Thread Alex Langford via lldb-commits


@@ -287,7 +287,7 @@ Status PlatformAndroid::DownloadModuleSlice(const FileSpec 
&src_file_spec,
   static constexpr llvm::StringLiteral k_zip_separator("!/");
   size_t pos = source_file.find(k_zip_separator);
   if (pos != std::string::npos)
-source_file = source_file.substr(0, pos);
+source_file = source_file.resize(0, pos);

bulbazord wrote:

This still isn't resolved, you're still doing `source_file = 
source_file.resize(pos)`. It doesn't return a value.

https://github.com/llvm/llvm-project/pull/94785
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix string truncation method when substring is the prefix of string (NFC) (PR #94785)

2024-07-08 Thread Alex Langford via lldb-commits

https://github.com/bulbazord edited 
https://github.com/llvm/llvm-project/pull/94785
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Correct invalid format style (PR #98089)

2024-07-08 Thread Alex Langford via lldb-commits

https://github.com/bulbazord created 
https://github.com/llvm/llvm-project/pull/98089

Fixes https://github.com/llvm/llvm-project/issues/97511

>From 31b3d4db2389dd4bd72b54618ba12c86f51fe02f Mon Sep 17 00:00:00 2001
From: Alex Langford 
Date: Mon, 8 Jul 2024 13:24:49 -0700
Subject: [PATCH] [lldb] Correct invalid format style

---
 lldb/source/Target/StackFrameList.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lldb/source/Target/StackFrameList.cpp 
b/lldb/source/Target/StackFrameList.cpp
index 314b5e39c71699..0cf9ce1bf043f5 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -966,9 +966,9 @@ size_t StackFrameList::GetStatus(Stream &strm, uint32_t 
first_frame,
 // Check for interruption here.  If we're fetching arguments, this loop
 // can go slowly:
 Debugger &dbg = m_thread.GetProcess()->GetTarget().GetDebugger();
-if (INTERRUPT_REQUESTED(dbg, 
-  "Interrupted dumping stack for thread {0:hex} with {1} shown.",
-  m_thread.GetID(), num_frames_displayed))
+if (INTERRUPT_REQUESTED(
+dbg, "Interrupted dumping stack for thread {0:x} with {1} shown.",
+m_thread.GetID(), num_frames_displayed))
   break;
 
 

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


[Lldb-commits] [lldb] [lldb] Correct invalid format style (PR #98089)

2024-07-08 Thread Alex Langford via lldb-commits

bulbazord wrote:

This is the exact same PR as https://github.com/apple/llvm-project/pull/8952 
(on apple's LLVM fork). It should have gone here first.

https://github.com/llvm/llvm-project/pull/98089
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-09 Thread Alex Langford via lldb-commits

https://github.com/bulbazord edited 
https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-09 Thread Alex Langford via lldb-commits

https://github.com/bulbazord commented:

Seems okay to me, but I'm not exactly an expert when it comes to lldb-dap. 
You'll probably want to get sign-off from at least another person.

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-09 Thread Alex Langford via lldb-commits


@@ -18,6 +18,32 @@ class SBLanguageRuntime {
   static lldb::LanguageType GetLanguageTypeFromString(const char *string);
 
   static const char *GetNameForLanguageType(lldb::LanguageType language);
+
+  /// Returns whether the given language is any version of  C++.

bulbazord wrote:

nit: extra space between `of` and `C++` at the end.

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-09 Thread Alex Langford via lldb-commits


@@ -26,3 +26,43 @@ SBLanguageRuntime::GetNameForLanguageType(lldb::LanguageType 
language) {
 
   return Language::GetNameForLanguageType(language);
 }
+
+bool SBLanguageRuntime::LanguageIsCPlusPlus(lldb::LanguageType language) {
+  return Language::LanguageIsCPlusPlus(language);
+}
+
+bool SBLanguageRuntime::LanguageIsObjC(lldb::LanguageType language) {
+  return Language::LanguageIsObjC(language);
+}
+
+bool SBLanguageRuntime::LanguageIsCFamily(lldb::LanguageType language) {
+  return Language::LanguageIsCFamily(language);
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnThrow(
+lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return lang_plugin->SupportsExceptionBreakpointsOnThrow();
+  return false;
+}
+
+bool SBLanguageRuntime::SupportsExceptionBreakpointsOnCatch(
+lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return lang_plugin->SupportsExceptionBreakpointsOnCatch();
+  return false;
+}
+
+const char *
+SBLanguageRuntime::GetThrowKeywordForLanguage(lldb::LanguageType language) {
+  if (Language *lang_plugin = Language::FindPlugin(language))
+return ConstString(lang_plugin->GetThrowKeyword().data()).AsCString();

bulbazord wrote:

Shouldn't need to do `.data()` at the end there. `ConstString::ConstString` can 
accept `llvm::StringRef` as an argument, and even better it doesn't have to 
re-calculate the length of the string when you do so.

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb-dap] Support throw and catch exception breakpoints for dynamica… (PR #97871)

2024-07-09 Thread Alex Langford via lldb-commits


@@ -80,6 +87,45 @@ void DAP::PopulateExceptionBreakpoints() {
   exception_breakpoints->emplace_back("swift_throw", "Swift Throw",
   lldb::eLanguageTypeSwift);
 }
+// Besides handling the hardcoded list of languages from above, we try to
+// find any other languages that support exception breakpoints using the
+// SB API.
+for (int raw_lang = lldb::eLanguageTypeUnknown;
+ raw_lang < lldb::eNumLanguageTypes; ++raw_lang) {
+  lldb::LanguageType lang = static_cast(raw_lang);
+
+  // We first discard any languages already handled above.
+  if (lldb::SBLanguageRuntime::LanguageIsCFamily(lang) ||
+  lang == lldb::eLanguageTypeSwift)
+continue;
+
+  if (!lldb::SBDebugger::SupportsLanguage(lang))
+continue;
+
+  const char *name = lldb::SBLanguageRuntime::GetNameForLanguageType(lang);
+  if (!name)
+continue;
+  std::string raw_lang_name = name;
+  std::string capitalized_lang_name = capitalize(name);
+  const char *raw_throw_keyword =
+  lldb::SBLanguageRuntime::GetThrowKeywordForLanguage(lang);
+  const char *raw_catch_keyword =
+  lldb::SBLanguageRuntime::GetCatchKeywordForLanguage(lang);
+  std::string throw_keyword =
+  raw_throw_keyword ? raw_throw_keyword : "throw";
+  std::string catch_keyword =
+  raw_catch_keyword ? raw_catch_keyword : "catch";

bulbazord wrote:

Suggestion: Instead of always calculating the keywords, why not calculate them 
conditionally below?

https://github.com/llvm/llvm-project/pull/97871
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-09 Thread Alex Langford via lldb-commits


@@ -47,13 +47,12 @@ namespace sys {
   /// The particular format of the names are target dependent, and suitable for
   /// passing as -mattr to the target which matches the host.
   ///
-  /// \param Features - A string mapping feature names to either
-  /// true (if enabled) or false (if disabled). This routine makes no 
guarantees
-  /// about exactly which features may appear in this map, except that they are
-  /// all valid LLVM feature names.
-  ///
-  /// \return - True on success.
-  bool getHostCPUFeatures(StringMap &Features);
+  /// \return - A string map mapping feature names to either true (if enabled)
+  /// or false (if disabled). This routine makes no guarantees about exactly
+  /// which features may appear in this map, except that they are all valid 
LLVM
+  /// feature names. The map can be empty, for example if feature detection
+  /// fails.
+  StringMap getHostCPUFeatures();

bulbazord wrote:

While we're here, maybe the return type should be marked `const`? This is a 
map, and `operator[]` is notoriously easy to mess up with maps. This might save 
somebody a big headache down the line.

https://github.com/llvm/llvm-project/pull/97824
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Fix string truncation method when substring is the prefix of string (NFC) (PR #94785)

2024-07-09 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.


https://github.com/llvm/llvm-project/pull/94785
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Small cleanup of ProcessEventData::ShouldStop (PR #98154)

2024-07-09 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

Makes sense to me

https://github.com/llvm/llvm-project/pull/98154
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-10 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

LGTM, thanks!

https://github.com/llvm/llvm-project/pull/97824
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add support for displaying `__float128` variables (PR #98369)

2024-07-10 Thread Alex Langford via lldb-commits


@@ -195,10 +199,10 @@ enum Format {
  ///< character arrays that can contain non printable
  ///< characters
   eFormatAddressInfo,///< Describe what an address points to (func + offset
-  ///< with file/line, symbol + offset, data, etc)
-  eFormatHexFloat,///< ISO C99 hex float string
-  eFormatInstruction, ///< Disassemble an opcode
-  eFormatVoid,///< Do not print this
+ ///< with file/line, symbol + offset, data, etc)
+  eFormatHexFloat,   ///< ISO C99 hex float string
+  eFormatInstruction,///< Disassemble an opcode
+  eFormatVoid,   ///< Do not print this

bulbazord wrote:

Can you remove the formatting changes to this part?

https://github.com/llvm/llvm-project/pull/98369
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb][test] Fix ComputeClangResourceDirectory test when CLANG_RESOURCE_DIR is set (PR #98464)

2024-07-11 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/98464
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Private process events were being delivered to the secondary listener (PR #98571)

2024-07-12 Thread Alex Langford via lldb-commits


@@ -443,11 +474,17 @@ def test_shadow_listener(self):
 # Put in a counter to make sure we don't spin forever if there is some
 # error in the logic.
 counter = 0
+run_wo_stop = False

bulbazord wrote:

Doesn't look like this is used? Maybe a holdover from a previous implementation?

https://github.com/llvm/llvm-project/pull/98571
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Symbol] Hoist SymbolLocation from AssertFrameRecognizer to reuse it (PR #98975)

2024-07-15 Thread Alex Langford via lldb-commits

https://github.com/bulbazord approved this pull request.


https://github.com/llvm/llvm-project/pull/98975
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

2024-07-19 Thread Alex Langford via lldb-commits

https://github.com/bulbazord commented:

Looks fine to me, but you probably want @jasonmolenda to sign off to be sure.

https://github.com/llvm/llvm-project/pull/99673
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


  1   2   3   4   5   6   7   8   9   10   >