[Lldb-commits] [PATCH] D26478: Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Pavel Labath via lldb-commits
labath added a comment.

Woohoo.


https://reviews.llvm.org/D26478



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


[Lldb-commits] [PATCH] D26300: ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files

2016-11-10 Thread Dimitar Vlahovski via lldb-commits
dvlahovski added a comment.

I will generate the core files with the `make-core.sh` script  and update the 
revision today or tomorrow.




Comment at: 
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py:107
 
+@skipIf(oslist=['windows'])
+@skipIf(triple='^mips')

labath wrote:
> emaste wrote:
> > Curious, why are these skipped only on windows?
> My guess would be that we fail to select the correct platform instance when 
> opening the core there, so we end up trying to debug a linux core file with 
> PlatformWindows, or something like that. I'll need to look into that at some 
> point.
To be honest, I copied this from the other ELF core tests without investigating 
why they skip windows.


https://reviews.llvm.org/D26300



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


[Lldb-commits] [PATCH] D26300: ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files

2016-11-10 Thread Dimitar Vlahovski via lldb-commits
dvlahovski updated this revision to Diff 77477.
dvlahovski added a comment.

Generated the core files with make-core.sh


https://reviews.llvm.org/D26300

Files:
  
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py
  
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/fpr_sse.cpp
  
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/fpr_sse_i386.core
  
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/fpr_sse_x86_64.core
  source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_i386.h
  source/Plugins/Process/Utility/RegisterContextLinux_x86_64.cpp
  source/Plugins/Process/Utility/RegisterContextLinux_x86_64.h
  source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
  source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
  source/Plugins/Process/Utility/RegisterInfoInterface.h
  source/Plugins/Process/elf-core/ProcessElfCore.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
  source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h

Index: source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
===
--- source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
+++ source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h
@@ -24,8 +24,6 @@
   const lldb_private::DataExtractor &gpregset,
   const lldb_private::DataExtractor &fpregset);
 
-  ~RegisterContextCorePOSIX_x86_64() override;
-
   bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
 lldb_private::RegisterValue &value) override;
 
@@ -48,7 +46,8 @@
   bool WriteFPR() override;
 
 private:
-  uint8_t *m_gpregset;
+  std::shared_ptr m_gpregset;
+  std::shared_ptr m_fpregset;
 };
 
 #endif // liblldb_RegisterContextCorePOSIX_x86_64_h_
Index: source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
===
--- source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
+++ source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.cpp
@@ -21,18 +21,27 @@
   size_t size, len;
 
   size = GetGPRSize();
-  m_gpregset = new uint8_t[size];
-  len = gpregset.ExtractBytes(0, size, lldb::eByteOrderLittle, m_gpregset);
-  assert(len == size);
-}
+  m_gpregset.reset(new uint8_t[size], std::default_delete());
+  len =
+  gpregset.ExtractBytes(0, size, lldb::eByteOrderLittle, m_gpregset.get());
+  if (len != size)
+m_gpregset.reset();
 
-RegisterContextCorePOSIX_x86_64::~RegisterContextCorePOSIX_x86_64() {
-  delete[] m_gpregset;
+  size = sizeof(FXSAVE);
+  m_fpregset.reset(new uint8_t[size], std::default_delete());
+  len =
+  fpregset.ExtractBytes(0, size, lldb::eByteOrderLittle, m_fpregset.get());
+  if (len != size)
+m_fpregset.reset();
 }
 
-bool RegisterContextCorePOSIX_x86_64::ReadGPR() { return m_gpregset != NULL; }
+bool RegisterContextCorePOSIX_x86_64::ReadGPR() {
+  return m_gpregset != nullptr;
+}
 
-bool RegisterContextCorePOSIX_x86_64::ReadFPR() { return false; }
+bool RegisterContextCorePOSIX_x86_64::ReadFPR() {
+  return m_fpregset != nullptr;
+}
 
 bool RegisterContextCorePOSIX_x86_64::WriteGPR() {
   assert(0);
@@ -46,15 +55,27 @@
 
 bool RegisterContextCorePOSIX_x86_64::ReadRegister(const RegisterInfo *reg_info,
RegisterValue &value) {
-  switch (reg_info->byte_size) {
-  case 4:
-value = *(uint32_t *)(m_gpregset + reg_info->byte_offset);
-return true;
-  case 8:
-value = *(uint64_t *)(m_gpregset + reg_info->byte_offset);
-return true;
+  std::shared_ptr src;
+  size_t offset;
+  const size_t fxsave_offset = reg_info->byte_offset - GetFXSAVEOffset();
+  // make the offset relative to the beginning of the FXSAVE structure
+  // because this is the data that we have (not the entire UserArea)
+
+  if (m_gpregset && reg_info->byte_offset < GetGPRSize()) {
+src = m_gpregset;
+offset = reg_info->byte_offset;
+  } else if (m_fpregset && fxsave_offset < sizeof(FXSAVE)) {
+src = m_fpregset;
+offset = fxsave_offset;
+  } else {
+return false;
   }
-  return false;
+
+  Error error;
+  value.SetFromMemoryData(reg_info, src.get() + offset, reg_info->byte_size,
+  lldb::eByteOrderLittle, error);
+
+  return error.Success();
 }
 
 bool RegisterContextCorePOSIX_x86_64::ReadAllRegisterValues(
Index: source/Plugins/Process/elf-core/ProcessElfCore.cpp
===
--- source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -400,7 +400,8 @@
   NT_TASKSTRUCT,
   NT_PLATFORM,
   NT_AUXV,
-  NT_FILE = 0x46494c45
+  NT_FILE = 0x46494c45,
+  NT_PRXFPREG = 0x46e62b7f,
 };
 
 namespace FREEBSD {
@@ -552,7 +553,11 @@
 thread_data->gpregs

[Lldb-commits] [PATCH] D26505: Remove a hack from the Android toolchain file

2016-11-10 Thread Pavel Labath via lldb-commits
labath created this revision.
labath added reviewers: tberghammer, beanz.
labath added a subscriber: lldb-commits.
Herald added subscribers: mgorny, srhines, danalbert.

The fix is to make sure llvm does not pull in dlopen() in configurations where 
it
is not available.


https://reviews.llvm.org/D26505

Files:
  cmake/platforms/Android.cmake


Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -172,27 +172,3 @@
  set( HAVE_UNWIND_BACKTRACE 0 CACHE INTERNAL "Hack to disable the finding of 
unwind.h on Android arm" )
 endif()
 # END EVIL HACK 
-
-# BEGIN EVIL HACK ##
-# lldb-server links against libdl even though it's not being used and
-# libdl.a is currently missing from the toolchain (b.android.com/178517).
-# Therefore, in order to statically link lldb-server, we need a temporary
-# workaround. This creates a dummy libdl.a stub until the actual
-# libdl.a can be implemented in the toolchain.
-if( LLVM_BUILD_STATIC )
- set( libdl "${CMAKE_BINARY_DIR}/libdl_stub" )
- file( MAKE_DIRECTORY ${libdl} )
- file( WRITE "${libdl}/libdl.c" "
-#include 
-void *   dlopen  (const char *filename, int flag)   { return 0; }
-const char * dlerror (void) { return 0; }
-void *   dlsym   (void *handle, const char *symbol) { return 0; }
-int  dlclose (void *handle) { return 0; }
-int  dladdr  (const void *addr, Dl_info *info)  { return 0; }")
- set( flags "${CMAKE_C_FLAGS}" )
- separate_arguments( flags )
- execute_process( COMMAND ${CMAKE_C_COMPILER} ${flags} -c ${libdl}/libdl.c -o 
${libdl}/libdl.o )
- execute_process( COMMAND ${CMAKE_AR} rcs ${libdl}/libdl.a ${libdl}/libdl.o )
- set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${libdl}" )
-endif()
-# END EVIL HACK ##


Index: cmake/platforms/Android.cmake
===
--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -172,27 +172,3 @@
  set( HAVE_UNWIND_BACKTRACE 0 CACHE INTERNAL "Hack to disable the finding of unwind.h on Android arm" )
 endif()
 # END EVIL HACK 
-
-# BEGIN EVIL HACK ##
-# lldb-server links against libdl even though it's not being used and
-# libdl.a is currently missing from the toolchain (b.android.com/178517).
-# Therefore, in order to statically link lldb-server, we need a temporary
-# workaround. This creates a dummy libdl.a stub until the actual
-# libdl.a can be implemented in the toolchain.
-if( LLVM_BUILD_STATIC )
- set( libdl "${CMAKE_BINARY_DIR}/libdl_stub" )
- file( MAKE_DIRECTORY ${libdl} )
- file( WRITE "${libdl}/libdl.c" "
-#include 
-void *   dlopen  (const char *filename, int flag)   { return 0; }
-const char * dlerror (void) { return 0; }
-void *   dlsym   (void *handle, const char *symbol) { return 0; }
-int  dlclose (void *handle) { return 0; }
-int  dladdr  (const void *addr, Dl_info *info)  { return 0; }")
- set( flags "${CMAKE_C_FLAGS}" )
- separate_arguments( flags )
- execute_process( COMMAND ${CMAKE_C_COMPILER} ${flags} -c ${libdl}/libdl.c -o ${libdl}/libdl.o )
- execute_process( COMMAND ${CMAKE_AR} rcs ${libdl}/libdl.a ${libdl}/libdl.o )
- set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${libdl}" )
-endif()
-# END EVIL HACK ##
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D26300: ELF core: Adding parsing of the floating-point and SSE registers on x86 32/64 bit elf core files

2016-11-10 Thread Pavel Labath via lldb-commits
labath added a comment.

Looks great. Ed, do you want to give this a try run?




Comment at: 
packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py:113
+self.assertTrue(target, VALID_TARGET)
+process = target.LoadCore("fpr_sse_x86_64.core")
+

Please add "linux" to the core file names. We'll probably have freebsd versions 
of these as well..



Comment at: source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h:49
 private:
-  uint8_t *m_gpregset;
+  std::shared_ptr m_gpregset;
+  std::shared_ptr m_fpregset;

Could you use a unique_ptr instead? The data doesn't seem to be shared with 
anyone...


https://reviews.llvm.org/D26300



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


[Lldb-commits] [PATCH] D26510: Xcode build: specify NDEBUG for all binaries built using the BuildAndIntegration configuration

2016-11-10 Thread Todd Fiala via lldb-commits
tfiala created this revision.
tfiala added a reviewer: clayborg.
tfiala added a subscriber: lldb-commits.

BuildAndIntegration is the configuration used to build Apple-built LLDB.  This 
configuration currently requires NDEBUG to be specified.  This change adds a 
new Xcode variable, LLDB_NDEBUG_CFLAGS, which specifies "-DNDEBUG" when using 
the BuildAndIntegration configuration, and specifies nothing for all other 
configurations.  All binaries have been modified to include 
$(LLDB_NDEBUG_CFLAGS) in the full set of other cflags and other cxxflags.


https://reviews.llvm.org/D26510

Files:
  project.pbxproj


Index: project.pbxproj
===
--- project.pbxproj
+++ project.pbxproj
@@ -7957,6 +7957,7 @@
"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
LLDB_ENABLE_COVERAGE = 0;
LLDB_FRAMEWORK_INSTALL_DIR = 
/Applications/Xcode.app/Contents/SharedFrameworks;
+   LLDB_NDEBUG_CFLAGS = "";
LLDB_TOOLS_INSTALL_DIR = /usr/bin;
LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1";
LLDB_ZLIB_LDFLAGS = "-lz";
@@ -7973,6 +7974,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_COVERAGE_CFLAGS)",
"-Wimplicit-fallthrough",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(LLDB_COMPRESSION_LDFLAGS)",
@@ -8050,6 +8052,7 @@
"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
LLDB_ENABLE_COVERAGE = 0;
LLDB_FRAMEWORK_INSTALL_DIR = 
/Applications/Xcode.app/Contents/SharedFrameworks;
+   LLDB_NDEBUG_CFLAGS = "";
LLDB_TOOLS_INSTALL_DIR = /usr/bin;
LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1";
LLDB_ZLIB_LDFLAGS = "-lz";
@@ -8066,6 +8069,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_COVERAGE_CFLAGS)",
"-Wimplicit-fallthrough",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(LLDB_COMPRESSION_LDFLAGS)",
@@ -8375,6 +8379,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_GTESTS_CFLAGS)",
"-DGTEST_HAS_RTTI=0",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(inherited)",
@@ -8417,6 +8422,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_GTESTS_CFLAGS)",
"-DGTEST_HAS_RTTI=0",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(inherited)",
@@ -8459,6 +8465,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_GTESTS_CFLAGS)",
"-DGTEST_HAS_RTTI=0",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(inherited)",
@@ -8501,6 +8508,7 @@
"$(LLDB_COMPRESSION_CFLAGS)",
"$(LLDB_GTESTS_CFLAGS)",
"-DGTEST_HAS_RTTI=0",
+   "$(LLDB_NDEBUG_CFLAGS)",
);
OTHER_LDFLAGS = (
"$(inherited)",
@@ -8963,6 +8971,7 @@
LLDB_ENABLE_COVERAGE = 0;
LLDB_FRAMEWORK_INSTALL_DIR = 
/Applications/Xcode.app/Contents/SharedFrameworks;
"LLDB_FRAMEWORK_INSTALL_DIR[sdk=iphoneos*]" = 
/System/Library/PrivateFrameworks;
+   LLDB_NDEBUG_CFLAGS = "-DNDEBUG";
LLDB_TOOLS_INSTALL_DIR = 
/Applications/Xcode.app/Contents/Developer/usr/bin;
"LLDB_TOOLS_INSTALL_DIR[sdk=iphoneos*]" = 
/usr/local/bin;
LLDB_ZLIB_CFLAGS =

[Lldb-commits] [lldb] r286476 - Un-XFail test on Windows. Has been in "unexpected success" mode for a while.

2016-11-10 Thread Adrian McCarthy via lldb-commits
Author: amccarth
Date: Thu Nov 10 11:21:22 2016
New Revision: 286476

URL: http://llvm.org/viewvc/llvm-project?rev=286476&view=rev
Log:
Un-XFail test on Windows.  Has been in "unexpected success" mode for a while.

Modified:
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=286476&r1=286475&r2=286476&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py 
Thu Nov 10 11:21:22 2016
@@ -21,8 +21,6 @@ class EnumTypesTestCase(TestBase):
 # Find the line number to break inside main().
 self.line = line_number('main.c', '// Set break point at this line.')
 
-# derefing the null pointer "works" on Windows
-@expectedFailureAll(oslist=['windows'])
 def test(self):
 """Test 'image lookup -t days' and check for correct display and enum 
value printing."""
 self.build()


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


[Lldb-commits] [PATCH] D26510: Xcode build: specify NDEBUG for all binaries built using the BuildAndIntegration configuration

2016-11-10 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Adding Jim, as I just want one of him or Greg to review.


https://reviews.llvm.org/D26510



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


[Lldb-commits] [PATCH] D26478: Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286479: Unify Darwin and Non-Darwin printing of version 
output (authored by cbieneman).

Changed prior to commit:
  https://reviews.llvm.org/D26478?vs=77403&id=77505#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26478

Files:
  lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
  lldb/trunk/lldb.xcodeproj/project.pbxproj
  lldb/trunk/source/CMakeLists.txt
  lldb/trunk/source/lldb.cpp

Index: lldb/trunk/source/lldb.cpp
===
--- lldb/trunk/source/lldb.cpp
+++ lldb/trunk/source/lldb.cpp
@@ -12,16 +12,16 @@
 using namespace lldb;
 using namespace lldb_private;
 
-#if defined(__APPLE__)
-extern "C" const unsigned char liblldb_coreVersionString[];
-#else
-
 #include "clang/Basic/Version.h"
 
 #ifdef HAVE_SVN_VERSION_INC
 #  include "SVNVersion.inc"
 #endif
 
+#ifdef HAVE_APPLE_VERSION_INC
+#  include "AppleVersion.inc"
+#endif
+
 static const char *GetLLDBRevision() {
 #ifdef LLDB_REVISION
   return LLDB_REVISION;
@@ -38,33 +38,8 @@
 #endif
 }
 
-#endif
 
 const char *lldb_private::GetVersion() {
-#if defined(__APPLE__)
-  static char g_version_string[32];
-  if (g_version_string[0] == '\0') {
-const char *version_string =
-::strstr((const char *)liblldb_coreVersionString, "PROJECT:");
-
-if (version_string)
-  version_string += sizeof("PROJECT:") - 1;
-else
-  version_string = "unknown";
-
-const char *newline_loc = strchr(version_string, '\n');
-
-size_t version_len = sizeof(g_version_string) - 1;
-
-if (newline_loc &&
-(newline_loc - version_string < static_cast(version_len)))
-  version_len = newline_loc - version_string;
-
-::snprintf(g_version_string, version_len + 1, "%s", version_string);
-  }
-
-  return g_version_string;
-#else
   // On platforms other than Darwin, report a version number in the same style
   // as the clang tool.
   static std::string g_version_str;
@@ -81,21 +56,24 @@
 if (lldb_rev) {
   g_version_str += " revision ";
   g_version_str += lldb_rev;
+  g_version_str += ")";
 }
+#ifdef LLDB_VERSION_STRING
+g_version_str += " (";
+g_version_str += LLDB_VERSION_STRING;
+g_version_str += ")";
+#endif
 std::string clang_rev(clang::getClangRevision());
 if (clang_rev.length() > 0) {
-  g_version_str += " clang revision ";
+  g_version_str += "\n  clang revision ";
   g_version_str += clang_rev;
 }
 std::string llvm_rev(clang::getLLVMRevision());
 if (llvm_rev.length() > 0) {
-  g_version_str += " llvm revision ";
+  g_version_str += "\n  llvm revision ";
   g_version_str += llvm_rev;
 }
-
-if (lldb_repo)
-  g_version_str += ")";
+  
   }
   return g_version_str.c_str();
-#endif
 }
Index: lldb/trunk/source/CMakeLists.txt
===
--- lldb/trunk/source/CMakeLists.txt
+++ lldb/trunk/source/CMakeLists.txt
@@ -25,21 +25,6 @@
 lldb.cpp
   )
 
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  set(LLDB_VERS_GENERATED_FILE ${LLDB_BINARY_DIR}/source/LLDB_vers.c)
-  add_custom_command(OUTPUT ${LLDB_VERS_GENERATED_FILE}
-COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj liblldb_core
-> ${LLDB_VERS_GENERATED_FILE}
-DEPENDS ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj)
-  set_source_files_properties(${LLDB_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
-  # Add this to lldbBase since lldb.cpp uses the symbol defined here.
-  list(APPEND lldbBase_SOURCES ${LLDB_VERS_GENERATED_FILE})
-  add_custom_target(lldbGeneratedVersion
-DEPENDS ${LLDB_VERS_GENERATED_FILE})
-endif()
-
 foreach(file
 "${LLDB_SOURCE_DIR}/.git/logs/HEAD" # Git
 "${LLDB_SOURCE_DIR}/.svn/wc.db" # SVN 1.7
@@ -75,14 +60,37 @@
   list(APPEND lldbBase_SOURCES ${version_inc})
 endif()
 
+if(APPLE)
+  set(apple_version_inc "${CMAKE_CURRENT_BINARY_DIR}/AppleVersion.inc")
+  set(apple_version_script "${LLDB_SOURCE_DIR}/cmake/modules/EmbedAppleVersion.cmake")
+  set(info_plist ${LLDB_SOURCE_DIR}/resources/LLDB-Info.plist)
+
+  # Create custom target to generate the VC revision include.
+  add_custom_command(OUTPUT "${apple_version_inc}"
+DEPENDS "${apple_version_script}" "${info_plist}"
+COMMAND
+${CMAKE_COMMAND} "-DLLDB_INFO_PLIST=${info_plist}"
+ "-DHEADER_FILE=${apple_version_inc}"
+ -P "${apple_version_script}")
+
+  # Mark the generated header as being generated.
+  set_source_files_properties("${apple_version_inc}"
+PROPERTIES GENERATED TRUE
+   HEADER_FILE_ONLY TRUE)
+
+  # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
+  set_source_files_properties(lldb.cpp
+PROPERTIES COMPILE_DEFINITIONS "HAVE_APPLE_VERSION_INC")
+  list

[Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Nov 10 11:33:19 2016
New Revision: 286479

URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev
Log:
Unify Darwin and Non-Darwin printing of version output

Summary:
This change unifies and simplifies the code paths between the Darwin and 
non-Darwin code to print the LLDB version information.

It also introduces a new variable in CMake LLDB_VERSION_STRING which can be 
used to specify custom version information. On Darwin this value is implicitly 
set based on the resource/LLDB-Info.plist file.

With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version output 
is:

> ./bin/lldb -version
lldb version 4.0.0 (lldb-360.99.0)
  clang revision 286264
  llvm revision 286265

This behavior is unified across all target platforms.

Reviewers: lldb-commits

Subscribers: mgorny, tfiala

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

Added:
lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/CMakeLists.txt
lldb/trunk/source/lldb.cpp

Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286479&view=auto
==
--- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
+++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19 2016
@@ -0,0 +1,11 @@
+execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" 
${LLDB_INFO_PLIST}
+OUTPUT_VARIABLE BundleVersion
+OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+file(APPEND "${HEADER_FILE}.tmp"
+"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
+
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
+
+file(REMOVE "${HEADER_FILE}.tmp")

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
@@ -8775,6 +8775,20 @@

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
);
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+   GCC_PREPROCESSOR_DEFINITIONS = (
+   __STDC_CONSTANT_MACROS,
+   __STDC_LIMIT_MACROS,
+   LLDB_CONFIGURATION_DEBUG,
+   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   );
+   
"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
+   __STDC_CONSTANT_MACROS,
+   __STDC_LIMIT_MACROS,
+   LLDB_CONFIGURATION_DEBUG,
+   LLDB_DISABLE_PYTHON,
+   NO_XPC_SERVICES,
+   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   );
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
"LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]" = 
"-DHAVE_LIBCOMPRESSION=1";
@@ -8820,6 +8834,20 @@

"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
);
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+   GCC_PREPROCESSOR_DEFINITIONS = (
+   __STDC_CONSTANT_MACROS,
+   __STDC_LIMIT_MACROS,
+   LLDB_CONFIGURATION_RELEASE,
+   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   );
+   
"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
+   __STDC_CONSTANT_MACROS,
+   __STDC_LIMIT_MACROS,
+   LLDB_CONFIGURATION_RELEASE,
+   LLDB_DISABLE_PYTHON,
+   NO_XPC_SERVICES,
+   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   );
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
   

[Lldb-commits] [PATCH] D26513: [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Chris Bieneman via lldb-commits
beanz created this revision.
beanz added a reviewer: lldb-commits.
beanz added subscribers: tfiala, kubabrecka.

This patch reworks all the @skip... lines for sanitizer libraries to be based 
on whether or not the compiler actually works, rather than whether or not the 
compiler-rt sources are present in some magically derived directory.


https://reviews.llvm.org/D26513

Files:
  packages/Python/lldbsuite/test/decorators.py
  packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
  packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
  packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
  
packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
  
packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
  
packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
  
packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
  
packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py

Index: packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
===
--- packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
+++ packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt

[Lldb-commits] [PATCH] D26513: [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Todd Fiala via lldb-commits
tfiala added a comment.

Looks fine to me pending that one question on the TSAN check (i.e. if the 
existing TSAN check is as good as your new ASAN check, LGTM).




Comment at: 
packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py:23
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):

Seems fine as long as @skipUnlessThreadSanitizer is doing the right type of 
check like you added for @skipUnlessAddressSanitizer.


https://reviews.llvm.org/D26513



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


[Lldb-commits] [PATCH] D26510: Xcode build: specify NDEBUG for all binaries built using the BuildAndIntegration configuration

2016-11-10 Thread Greg Clayton via lldb-commits
clayborg added a comment.

If we do this the asserts we have will no longer fire. We tend not to use 
asserts too much, but it would be a good idea to take a look at any asserts in 
our code to make sure we won't die horribly in other ways that will cause us 
not to know what crashed us.


https://reviews.llvm.org/D26510



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


[Lldb-commits] [PATCH] D26513: [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Chris Bieneman via lldb-commits
beanz added inline comments.



Comment at: 
packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py:23
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):

tfiala wrote:
> Seems fine as long as @skipUnlessThreadSanitizer is doing the right type of 
> check like you added for @skipUnlessAddressSanitizer.
The implementation of `skipUnlessAddressSanitizer` is basically 
copy-paste-simplify-modify of `skipUnlessThreadSanitizer`. They should both 
have good coverage.


https://reviews.llvm.org/D26513



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


[Lldb-commits] [PATCH] D26513: [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL286490: [Test-Suite] Fix all the sanitizer tests to be based 
on compiler capabilities (authored by cbieneman).

Changed prior to commit:
  https://reviews.llvm.org/D26513?vs=77506&id=77518#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26513

Files:
  lldb/trunk/packages/Python/lldbsuite/test/decorators.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py

Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
@@ -20,7 +20,6 @@
 bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
 @skipUnlessThreadSanitizer
 def test(self):
 self.build()
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionali

[Lldb-commits] [lldb] r286490 - [Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

2016-11-10 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Nov 10 13:16:17 2016
New Revision: 286490

URL: http://llvm.org/viewvc/llvm-project?rev=286490&view=rev
Log:
[Test-Suite] Fix all the sanitizer tests to be based on compiler capabilities

Summary: This patch reworks all the @skip... lines for sanitizer libraries to 
be based on whether or not the compiler actually works, rather than whether or 
not the compiler-rt sources are present in some magically derived directory.

Reviewers: lldb-commits

Subscribers: kubabrecka, tfiala

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

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

lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py

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

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py

lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=286490&r1=286489&r2=286490&view=diff
==
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Thu Nov 10 13:16:17 
2016
@@ -656,31 +656,6 @@ def skipIfTargetAndroid(api_levels=None,
 archs))
 
 
-def skipUnlessCompilerRt(func):
-"""Decorate the item to skip tests if testing remotely."""
-def is_compiler_rt_missing():
-compilerRtPath = os.path.join(
-os.environ["LLDB_SRC"],
-"..",
-"..",
-"..",
-"llvm",
-"projects",
-"compiler-rt")
-if not os.path.exists(compilerRtPath):
-compilerRtPath = os.path.join(
-os.environ["LLDB_SRC"],
-"..",
-"..",
-"..",
-"llvm",
-"runtimes",
-"compiler-rt")
-return "compiler-rt not found" if not os.path.exists(
-compilerRtPath) else None
-return skipTestIfFn(is_compiler_rt_missing)(func)
-
-
 def skipUnlessThreadSanitizer(func):
 """Decorate the item to skip test unless Clang -fsanitize=thread is 
supported."""
 
@@ -701,3 +676,19 @@ def skipUnlessThreadSanitizer(func):
 return "Compiler cannot compile with -fsanitize=thread"
 return None
 return skipTestIfFn(is_compiler_clang_with_thread_sanitizer)(func)
+
+def skipUnlessAddressSanitizer(func):
+"""Decorate the item to skip test unless Clang -fsanitize=thread is 
supported."""
+
+def is_compiler_with_address_sanitizer(self):
+compiler_path = self.getCompiler()
+compiler = os.path.basename(compiler_path)
+f = tempfile.NamedTemporaryFile()
+cmd = "echo 'int main() {}' | %s -x c -o %s -" % (compiler_path, 
f.name)
+if os.popen(cmd).close() is not None:
+return None  # The compiler cannot compile at all, let's *not* 
skip the test
+cmd = "echo 'int main() {}' | %s -fsanitize=address -x c -o %s -" % 
(compiler_path, f.name)
+if os.popen(cmd).close() is not None:
+return "Compiler cannot compile with -fsanitize=address"
+return None
+return skipTestIfFn(is_compiler_with_address_sanitizer)(func)

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py?rev=286490&r1=286489&r2=286490&view=diff
==
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
 (original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
 Thu Nov 10 13:16:17 2016
@@ -23,7 +23,7 @@ class AsanTestCase(TestBase):
 bugnumber="non-core functionality, need to reenable and fix later (DES 
2014.11.07)")
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
-@skipUnlessCompilerRt
+@skipUnlessAddressSanitizer
 def test(self):
 self.build()
 self.asan_tests()

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/p

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Tim Hammerquist via lldb-commits
Looks like the quotes around the lldb version string aren't properly
preserved in the xcodeproj file as they are in CMake.

Can any of the LLDB devs more comfortable with plumbing the depths of Xcode
project configuration provide some guidance here?

http://lab.llvm.org:8080/green/job/lldb_build_test/21828/

/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
error: unexpected namespace name 'lldb': expected expression
g_version_str += LLDB_VERSION_STRING;
 ^
In file included from :356:
:4:29: note: expanded from here
#define LLDB_VERSION_STRING lldb-360.99.0
^
/Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
error: invalid suffix '.0' on floating constant
In file included from :356:
:4:40: note: expanded from here
#define LLDB_VERSION_STRING lldb-360.99.0
   ^
2 errors generated.


On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> Author: cbieneman
> Date: Thu Nov 10 11:33:19 2016
> New Revision: 286479
>
> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev
> Log:
> Unify Darwin and Non-Darwin printing of version output
>
> Summary:
> This change unifies and simplifies the code paths between the Darwin and
> non-Darwin code to print the LLDB version information.
>
> It also introduces a new variable in CMake LLDB_VERSION_STRING which can
> be used to specify custom version information. On Darwin this value is
> implicitly set based on the resource/LLDB-Info.plist file.
>
> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version
> output is:
>
> > ./bin/lldb -version
> lldb version 4.0.0 (lldb-360.99.0)
>   clang revision 286264
>   llvm revision 286265
>
> This behavior is unified across all target platforms.
>
> Reviewers: lldb-commits
>
> Subscribers: mgorny, tfiala
>
> Differential Revision: https://reviews.llvm.org/D26478
>
> Added:
> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
> lldb/trunk/source/CMakeLists.txt
> lldb/trunk/source/lldb.cpp
>
> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/
> modules/EmbedAppleVersion.cmake?rev=286479&view=auto
> 
> ==
> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19
> 2016
> @@ -0,0 +1,11 @@
> +execute_process(COMMAND /usr/libexec/PlistBuddy -c
> "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
> +OUTPUT_VARIABLE BundleVersion
> +OUTPUT_STRIP_TRAILING_WHITESPACE)
> +
> +file(APPEND "${HEADER_FILE}.tmp"
> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
> +
> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
> +
> +file(REMOVE "${HEADER_FILE}.tmp")
>
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.
> xcodeproj/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
> 
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
> @@ -8775,6 +8775,20 @@
> "\"$(SYSTEM_LIBRARY_DIR)/
> PrivateFrameworks\"",
> );
> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
> +   GCC_PREPROCESSOR_DEFINITIONS = (
> +   __STDC_CONSTANT_MACROS,
> +   __STDC_LIMIT_MACROS,
> +   LLDB_CONFIGURATION_DEBUG,
> +   "LLDB_VERSION_STRING=\"lldb-${
> CURRENT_PROJECT_VERSION}\"",
> +   );
> +   
> "GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]"
> = (
> +   __STDC_CONSTANT_MACROS,
> +   __STDC_LIMIT_MACROS,
> +   LLDB_CONFIGURATION_DEBUG,
> +   LLDB_DISABLE_PYTHON,
> +   NO_XPC_SERVICES,
> +   "LLDB_VERSION_STRING=\"lldb-${
> CURRENT_PROJECT_VERSION}\"",
> +   );
> HEADER_SEARCH_PATHS = /usr/include/libxml2;
> LLDB_COMPRESSION_CFLAGS = "";
> "LLDB_COMPRESSION_CFLAGS[sdk=macosx10.11]"
> = "-DHAVE_LIBCOMPRESSION=1";
> @@ -8820,6 +8834,20 @@
> "\"$(SYSTEM_LIBRARY_DIR)/
> PrivateFra

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Todd Fiala via lldb-commits
I'm at a point where I can look at it.

On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist  wrote:

> Looks like the quotes around the lldb version string aren't properly
> preserved in the xcodeproj file as they are in CMake.
>
> Can any of the LLDB devs more comfortable with plumbing the depths of
> Xcode project configuration provide some guidance here?
>
> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/
>
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
> error: unexpected namespace name 'lldb': expected expression
> g_version_str += LLDB_VERSION_STRING;
>  ^
> In file included from :356:
> :4:29: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
> ^
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
> error: invalid suffix '.0' on floating constant
> In file included from :356:
> :4:40: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
>^
> 2 errors generated.
>
>
> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits <
> lldb-commits@lists.llvm.org> wrote:
>
>> Author: cbieneman
>> Date: Thu Nov 10 11:33:19 2016
>> New Revision: 286479
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev
>> Log:
>> Unify Darwin and Non-Darwin printing of version output
>>
>> Summary:
>> This change unifies and simplifies the code paths between the Darwin and
>> non-Darwin code to print the LLDB version information.
>>
>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can
>> be used to specify custom version information. On Darwin this value is
>> implicitly set based on the resource/LLDB-Info.plist file.
>>
>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version
>> output is:
>>
>> > ./bin/lldb -version
>> lldb version 4.0.0 (lldb-360.99.0)
>>   clang revision 286264
>>   llvm revision 286265
>>
>> This behavior is unified across all target platforms.
>>
>> Reviewers: lldb-commits
>>
>> Subscribers: mgorny, tfiala
>>
>> Differential Revision: https://reviews.llvm.org/D26478
>>
>> Added:
>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> lldb/trunk/source/CMakeLists.txt
>> lldb/trunk/source/lldb.cpp
>>
>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules
>> /EmbedAppleVersion.cmake?rev=286479&view=auto
>> 
>> ==
>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19
>> 2016
>> @@ -0,0 +1,11 @@
>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c
>> "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
>> +OUTPUT_VARIABLE BundleVersion
>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>> +
>> +file(APPEND "${HEADER_FILE}.tmp"
>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>> +
>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>> +
>> +file(REMOVE "${HEADER_FILE}.tmp")
>>
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodepro
>> j/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
>> 
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>> @@ -8775,6 +8775,20 @@
>> "\"$(SYSTEM_LIBRARY_DIR)/Priva
>> teFrameworks\"",
>> );
>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   LLDB_CONFIGURATION_DEBUG,
>> +   "LLDB_VERSION_STRING=\"lldb-$
>> {CURRENT_PROJECT_VERSION}\"",
>> +   );
>> +   "GCC_PREPROCESSOR_
>> DEFINITIONS[sdk=iphoneos*][arch=*]" = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   LLDB_CONFIGURATION_DEBUG,
>> +   LLDB_DISABLE_PYTHON,
>> +   NO_XPC_SERVICES,
>> +   "LLDB_VERSION_STRING=\"lldb-$
>> {CURRENT_PROJECT_VERSION}\"",
>> +   );
>> HEADER_SEARCH_PATHS =
>> /usr/include/libxml2;
>> L

[Lldb-commits] [lldb] r286504 - Fixing the Xcode build that I broke in r286479

2016-11-10 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Nov 10 15:30:16 2016
New Revision: 286504

URL: http://llvm.org/viewvc/llvm-project?rev=286504&view=rev
Log:
Fixing the Xcode build that I broke in r286479

Since Xcode can't seem to handle quotes in preprocessor definitions, I've 
changed the build to assume that the define is unquoted. This should fix the 
failing Darwin bots.

Modified:
lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/CMakeLists.txt
lldb/trunk/source/lldb.cpp

Modified: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286504&r1=286503&r2=286504&view=diff
==
--- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (original)
+++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 15:30:16 2016
@@ -3,7 +3,7 @@ execute_process(COMMAND /usr/libexec/Pli
 OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 file(APPEND "${HEADER_FILE}.tmp"
-"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
+"#define LLDB_VERSION_STRING lldb-${BundleVersion}\n")
 
 execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
   "${HEADER_FILE}.tmp" "${HEADER_FILE}")

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286504&r1=286503&r2=286504&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 15:30:16 2016
@@ -8779,7 +8779,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_DEBUG,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8787,7 +8787,7 @@
LLDB_CONFIGURATION_DEBUG,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
@@ -8838,7 +8838,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_RELEASE,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8846,7 +8846,7 @@
LLDB_CONFIGURATION_RELEASE,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
@@ -8897,7 +8897,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,

LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8905,7 +8905,7 @@

LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
"LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
+   

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Chris Bieneman via lldb-commits
I just pushed r286504, which expects the string to not be quoted. This should 
solve the bot failures.

-Chris

> On Nov 10, 2016, at 1:30 PM, Todd Fiala  wrote:
> 
> I'm at a point where I can look at it.
> 
> On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist  > wrote:
> Looks like the quotes around the lldb version string aren't properly 
> preserved in the xcodeproj file as they are in CMake.
> 
> Can any of the LLDB devs more comfortable with plumbing the depths of Xcode 
> project configuration provide some guidance here?
> 
> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/ 
> 
> 
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
> error: unexpected namespace name 'lldb': expected expression
> g_version_str += LLDB_VERSION_STRING;
>  ^
> In file included from :356:
> :4:29: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
> ^
> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
> error: invalid suffix '.0' on floating constant
> In file included from :356:
> :4:40: note: expanded from here
> #define LLDB_VERSION_STRING lldb-360.99.0
>^
> 2 errors generated.
> 
> 
> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits 
> mailto:lldb-commits@lists.llvm.org>> wrote:
> Author: cbieneman
> Date: Thu Nov 10 11:33:19 2016
> New Revision: 286479
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev 
> 
> Log:
> Unify Darwin and Non-Darwin printing of version output
> 
> Summary:
> This change unifies and simplifies the code paths between the Darwin and 
> non-Darwin code to print the LLDB version information.
> 
> It also introduces a new variable in CMake LLDB_VERSION_STRING which can be 
> used to specify custom version information. On Darwin this value is 
> implicitly set based on the resource/LLDB-Info.plist file.
> 
> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version 
> output is:
> 
> > ./bin/lldb -version
> lldb version 4.0.0 (lldb-360.99.0)
>   clang revision 286264
>   llvm revision 286265
> 
> This behavior is unified across all target platforms.
> 
> Reviewers: lldb-commits
> 
> Subscribers: mgorny, tfiala
> 
> Differential Revision: https://reviews.llvm.org/D26478 
> 
> 
> Added:
> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
> Modified:
> lldb/trunk/lldb.xcodeproj/project.pbxproj
> lldb/trunk/source/CMakeLists.txt
> lldb/trunk/source/lldb.cpp
> 
> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286479&view=auto
>  
> 
> ==
> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19 2016
> @@ -0,0 +1,11 @@
> +execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" 
> ${LLDB_INFO_PLIST}
> +OUTPUT_VARIABLE BundleVersion
> +OUTPUT_STRIP_TRAILING_WHITESPACE)
> +
> +file(APPEND "${HEADER_FILE}.tmp"
> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
> +
> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
> +
> +file(REMOVE "${HEADER_FILE}.tmp")
> 
> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
> URL: 
> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
>  
> 
> ==
> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
> @@ -8775,6 +8775,20 @@
> 
> "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
> );
> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
> +   GCC_PREPROCESSOR_DEFINITIONS = (
> +   __STDC_CONSTANT_MACROS,
> +   __STDC_LIMIT_MACROS,
> +   LLDB_CONFIGURATION_DEBUG,
> +   
> "LLDB_VERSION_STRING=\"lldb-${CURRENT_PROJECT_VERSION}\"",
> +   );
> +   
> "GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
> +   __ST

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Tim Hammerquist via lldb-commits
Failing differently here. Progress!

2016-11-10 13:47:14.203 xcodebuild[65554:42448173] Error
Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1"
UserInfo={NSDebugDescription=Unexpected character / at line 1,
kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain
Code=3840 "Expected terminating ')' for array at line 8782"
UserInfo={NSDebugDescription=Expected terminating ')' for array at line
8782}} xcodebuild: error: Unable to read project 'lldb.xcodeproj'. Reason:
Project /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/lldb.xcodeproj
cannot be opened because the project file cannot be parsed.


On Thu, Nov 10, 2016 at 1:40 PM, Chris Bieneman  wrote:

> I just pushed r286504, which expects the string to not be quoted. This
> should solve the bot failures.
>
> -Chris
>
> On Nov 10, 2016, at 1:30 PM, Todd Fiala  wrote:
>
> I'm at a point where I can look at it.
>
> On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist 
> wrote:
>
>> Looks like the quotes around the lldb version string aren't properly
>> preserved in the xcodeproj file as they are in CMake.
>>
>> Can any of the LLDB devs more comfortable with plumbing the depths of
>> Xcode project configuration provide some guidance here?
>>
>> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/
>>
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
>> error: unexpected namespace name 'lldb': expected expression
>> g_version_str += LLDB_VERSION_STRING;
>>  ^
>> In file included from :356:
>> :4:29: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>> ^
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
>> error: invalid suffix '.0' on floating constant
>> In file included from :356:
>> :4:40: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>>^
>> 2 errors generated.
>>
>>
>> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits <
>> lldb-commits@lists.llvm.org> wrote:
>>
>>> Author: cbieneman
>>> Date: Thu Nov 10 11:33:19 2016
>>> New Revision: 286479
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev
>>> Log:
>>> Unify Darwin and Non-Darwin printing of version output
>>>
>>> Summary:
>>> This change unifies and simplifies the code paths between the Darwin and
>>> non-Darwin code to print the LLDB version information.
>>>
>>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can
>>> be used to specify custom version information. On Darwin this value is
>>> implicitly set based on the resource/LLDB-Info.plist file.
>>>
>>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version
>>> output is:
>>>
>>> > ./bin/lldb -version
>>> lldb version 4.0.0 (lldb-360.99.0)
>>>   clang revision 286264
>>>   llvm revision 286265
>>>
>>> This behavior is unified across all target platforms.
>>>
>>> Reviewers: lldb-commits
>>>
>>> Subscribers: mgorny, tfiala
>>>
>>> Differential Revision: https://reviews.llvm.org/D26478
>>>
>>> Added:
>>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>>> Modified:
>>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>>> lldb/trunk/source/CMakeLists.txt
>>> lldb/trunk/source/lldb.cpp
>>>
>>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules
>>> /EmbedAppleVersion.cmake?rev=286479&view=auto
>>> 
>>> ==
>>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10
>>> 11:33:19 2016
>>> @@ -0,0 +1,11 @@
>>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c
>>> "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
>>> +OUTPUT_VARIABLE BundleVersion
>>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>>> +
>>> +file(APPEND "${HEADER_FILE}.tmp"
>>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>>> +
>>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>>> +
>>> +file(REMOVE "${HEADER_FILE}.tmp")
>>>
>>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodepro
>>> j/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
>>> 
>>> ==
>>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>>> @@ -8775,6 +8775,20 @@
>>> "\"$(SYSTEM_LIBRARY_DIR)/Priva
>>> teFrameworks\"",
>>> );
>>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>>> +   __STDC_

[Lldb-commits] [lldb] r286505 - One more try to fix the Xcode project

2016-11-10 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Nov 10 15:43:24 2016
New Revision: 286505

URL: http://llvm.org/viewvc/llvm-project?rev=286505&view=rev
Log:
One more try to fix the Xcode project

This time I made sure it actually opened.

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=286505&r1=286504&r2=286505&view=diff
==
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 15:43:24 2016
@@ -8779,7 +8779,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_DEBUG,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8787,7 +8787,7 @@
LLDB_CONFIGURATION_DEBUG,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
@@ -8838,7 +8838,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_RELEASE,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8846,7 +8846,7 @@
LLDB_CONFIGURATION_RELEASE,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
@@ -8897,7 +8897,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,

LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -8905,7 +8905,7 @@

LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);
HEADER_SEARCH_PATHS = /usr/include/libxml2;
LLDB_COMPRESSION_CFLAGS = "";
@@ -9910,7 +9910,7 @@
__STDC_CONSTANT_MACROS,
__STDC_LIMIT_MACROS,
LLDB_CONFIGURATION_DEBUG,
-   
LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION},
+   
"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
);

"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
__STDC_CONSTANT_MACROS,
@@ -9918,7 +9918,7 @@
LLDB_CONFIGURATION_DEBUG,
LLDB_DISABLE_PYTHON,
NO_XPC_SERVICES,
-   

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Todd Fiala via lldb-commits
Okay cool, thanks Chris!

-Todd

> On Nov 10, 2016, at 1:40 PM, Chris Bieneman  wrote:
> 
> I just pushed r286504, which expects the string to not be quoted. This should 
> solve the bot failures.
> 
> -Chris
> 
>> On Nov 10, 2016, at 1:30 PM, Todd Fiala > > wrote:
>> 
>> I'm at a point where I can look at it.
>> 
>> On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist > > wrote:
>> Looks like the quotes around the lldb version string aren't properly 
>> preserved in the xcodeproj file as they are in CMake.
>> 
>> Can any of the LLDB devs more comfortable with plumbing the depths of Xcode 
>> project configuration provide some guidance here?
>> 
>> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/ 
>> 
>> 
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
>> error: unexpected namespace name 'lldb': expected expression
>> g_version_str += LLDB_VERSION_STRING;
>>  ^
>> In file included from :356:
>> :4:29: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>> ^
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22: 
>> error: invalid suffix '.0' on floating constant
>> In file included from :356:
>> :4:40: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>>^
>> 2 errors generated.
>> 
>> 
>> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits 
>> mailto:lldb-commits@lists.llvm.org>> wrote:
>> Author: cbieneman
>> Date: Thu Nov 10 11:33:19 2016
>> New Revision: 286479
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev 
>> 
>> Log:
>> Unify Darwin and Non-Darwin printing of version output
>> 
>> Summary:
>> This change unifies and simplifies the code paths between the Darwin and 
>> non-Darwin code to print the LLDB version information.
>> 
>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can be 
>> used to specify custom version information. On Darwin this value is 
>> implicitly set based on the resource/LLDB-Info.plist file.
>> 
>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version 
>> output is:
>> 
>> > ./bin/lldb -version
>> lldb version 4.0.0 (lldb-360.99.0)
>>   clang revision 286264
>>   llvm revision 286265
>> 
>> This behavior is unified across all target platforms.
>> 
>> Reviewers: lldb-commits
>> 
>> Subscribers: mgorny, tfiala
>> 
>> Differential Revision: https://reviews.llvm.org/D26478 
>> 
>> 
>> Added:
>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> Modified:
>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>> lldb/trunk/source/CMakeLists.txt
>> lldb/trunk/source/lldb.cpp
>> 
>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/EmbedAppleVersion.cmake?rev=286479&view=auto
>>  
>> 
>> ==
>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10 11:33:19 2016
>> @@ -0,0 +1,11 @@
>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c "Print:CFBundleVersion" 
>> ${LLDB_INFO_PLIST}
>> +OUTPUT_VARIABLE BundleVersion
>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>> +
>> +file(APPEND "${HEADER_FILE}.tmp"
>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>> +
>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>> +
>> +file(REMOVE "${HEADER_FILE}.tmp")
>> 
>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>> URL: 
>> http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
>>  
>> 
>> ==
>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>> @@ -8775,6 +8775,20 @@
>> 
>> "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
>> );
>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>> +   __STDC_CONSTANT_MACROS,
>> +   __STDC_LIMIT_MACROS,
>> +   LLDB_CONFIGURATION_DEBUG,
>> +

Re: [Lldb-commits] [lldb] r286479 - Unify Darwin and Non-Darwin printing of version output

2016-11-10 Thread Tim Hammerquist via lldb-commits
Thanks, Chris!

On Thu, Nov 10, 2016 at 2:22 PM, Todd Fiala  wrote:

> Okay cool, thanks Chris!
>
> -Todd
>
> On Nov 10, 2016, at 1:40 PM, Chris Bieneman  wrote:
>
> I just pushed r286504, which expects the string to not be quoted. This
> should solve the bot failures.
>
> -Chris
>
> On Nov 10, 2016, at 1:30 PM, Todd Fiala  wrote:
>
> I'm at a point where I can look at it.
>
> On Thu, Nov 10, 2016 at 12:17 PM, Tim Hammerquist 
> wrote:
>
>> Looks like the quotes around the lldb version string aren't properly
>> preserved in the xcodeproj file as they are in CMake.
>>
>> Can any of the LLDB devs more comfortable with plumbing the depths of
>> Xcode project configuration provide some guidance here?
>>
>> http://lab.llvm.org:8080/green/job/lldb_build_test/21828/
>>
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
>> error: unexpected namespace name 'lldb': expected expression
>> g_version_str += LLDB_VERSION_STRING;
>>  ^
>> In file included from :356:
>> :4:29: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>> ^
>> /Users/buildslave/jenkins/sharedspace/lldb@2/lldb/source/lldb.cpp:63:22:
>> error: invalid suffix '.0' on floating constant
>> In file included from :356:
>> :4:40: note: expanded from here
>> #define LLDB_VERSION_STRING lldb-360.99.0
>>^
>> 2 errors generated.
>>
>>
>> On Thu, Nov 10, 2016 at 9:33 AM, Chris Bieneman via lldb-commits <
>> lldb-commits@lists.llvm.org> wrote:
>>
>>> Author: cbieneman
>>> Date: Thu Nov 10 11:33:19 2016
>>> New Revision: 286479
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=286479&view=rev
>>> Log:
>>> Unify Darwin and Non-Darwin printing of version output
>>>
>>> Summary:
>>> This change unifies and simplifies the code paths between the Darwin and
>>> non-Darwin code to print the LLDB version information.
>>>
>>> It also introduces a new variable in CMake LLDB_VERSION_STRING which can
>>> be used to specify custom version information. On Darwin this value is
>>> implicitly set based on the resource/LLDB-Info.plist file.
>>>
>>> With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version
>>> output is:
>>>
>>> > ./bin/lldb -version
>>> lldb version 4.0.0 (lldb-360.99.0)
>>>   clang revision 286264
>>>   llvm revision 286265
>>>
>>> This behavior is unified across all target platforms.
>>>
>>> Reviewers: lldb-commits
>>>
>>> Subscribers: mgorny, tfiala
>>>
>>> Differential Revision: https://reviews.llvm.org/D26478
>>>
>>> Added:
>>> lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>>> Modified:
>>> lldb/trunk/lldb.xcodeproj/project.pbxproj
>>> lldb/trunk/source/CMakeLists.txt
>>> lldb/trunk/source/lldb.cpp
>>>
>>> Added: lldb/trunk/cmake/modules/EmbedAppleVersion.cmake
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules
>>> /EmbedAppleVersion.cmake?rev=286479&view=auto
>>> 
>>> ==
>>> --- lldb/trunk/cmake/modules/EmbedAppleVersion.cmake (added)
>>> +++ lldb/trunk/cmake/modules/EmbedAppleVersion.cmake Thu Nov 10
>>> 11:33:19 2016
>>> @@ -0,0 +1,11 @@
>>> +execute_process(COMMAND /usr/libexec/PlistBuddy -c
>>> "Print:CFBundleVersion" ${LLDB_INFO_PLIST}
>>> +OUTPUT_VARIABLE BundleVersion
>>> +OUTPUT_STRIP_TRAILING_WHITESPACE)
>>> +
>>> +file(APPEND "${HEADER_FILE}.tmp"
>>> +"#define LLDB_VERSION_STRING \"lldb-${BundleVersion}\"\n")
>>> +
>>> +execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>>> +  "${HEADER_FILE}.tmp" "${HEADER_FILE}")
>>> +
>>> +file(REMOVE "${HEADER_FILE}.tmp")
>>>
>>> Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodepro
>>> j/project.pbxproj?rev=286479&r1=286478&r2=286479&view=diff
>>> 
>>> ==
>>> --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
>>> +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Nov 10 11:33:19 2016
>>> @@ -8775,6 +8775,20 @@
>>> "\"$(SYSTEM_LIBRARY_DIR)/Priva
>>> teFrameworks\"",
>>> );
>>> GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
>>> +   GCC_PREPROCESSOR_DEFINITIONS = (
>>> +   __STDC_CONSTANT_MACROS,
>>> +   __STDC_LIMIT_MACROS,
>>> +   LLDB_CONFIGURATION_DEBUG,
>>> +   "LLDB_VERSION_STRING=\"lldb-$
>>> {CURRENT_PROJECT_VERSION}\"",
>>> +   );
>>> +   
>>> "GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]"
>>> = (
>>> +   __STDC_CONSTANT_MACROS,
>>> +   __STDC_LIMIT_MACR

[Lldb-commits] [lldb] r286528 - [CMake] Fixing CMake to append source properties instead of overwrite them.

2016-11-10 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Nov 10 17:56:32 2016
New Revision: 286528

URL: http://llvm.org/viewvc/llvm-project?rev=286528&view=rev
Log:
[CMake] Fixing CMake to append source properties instead of overwrite them.

This is a small fix to the version output.

Modified:
lldb/trunk/source/CMakeLists.txt

Modified: lldb/trunk/source/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/CMakeLists.txt?rev=286528&r1=286527&r2=286528&view=diff
==
--- lldb/trunk/source/CMakeLists.txt (original)
+++ lldb/trunk/source/CMakeLists.txt Thu Nov 10 17:56:32 2016
@@ -55,8 +55,8 @@ if(DEFINED lldb_vc)
HEADER_FILE_ONLY TRUE)
 
   # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
-  set_source_files_properties(lldb.cpp
-PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY 
+   COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
   list(APPEND lldbBase_SOURCES ${version_inc})
 endif()
 
@@ -79,12 +79,12 @@ if(APPLE)
HEADER_FILE_ONLY TRUE)
 
   # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
-  set_source_files_properties(lldb.cpp
-PROPERTIES COMPILE_DEFINITIONS "HAVE_APPLE_VERSION_INC")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY 
+   COMPILE_DEFINITIONS "HAVE_APPLE_VERSION_INC")
   list(APPEND lldbBase_SOURCES ${apple_version_inc})
 elseif(LLDB_VERSION_STRING)
-  set_source_files_properties(lldb.cpp
-PROPERTIES COMPILE_DEFINITIONS 
"LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
+  set_property(SOURCE lldb.cpp APPEND PROPERTY
+   COMPILE_DEFINITIONS 
"LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
 endif()
 
 add_lldb_library(lldbBase


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


[Lldb-commits] [lldb] r286561 - Make the Error class constructor protected

2016-11-10 Thread Mehdi Amini via lldb-commits
Author: mehdi_amini
Date: Thu Nov 10 22:28:40 2016
New Revision: 286561

URL: http://llvm.org/viewvc/llvm-project?rev=286561&view=rev
Log:
Make the Error class constructor protected

This is forcing to use Error::success(), which is in a wide majority
of cases a lot more readable.

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

Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Core/ModuleList.cpp
lldb/trunk/source/Host/common/NativeBreakpoint.cpp
lldb/trunk/source/Host/common/NativeBreakpointList.cpp
lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
lldb/trunk/source/Host/common/NativeWatchpointList.cpp
lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
lldb/trunk/source/Host/posix/FileSystem.cpp
lldb/trunk/source/Host/posix/MainLoopPosix.cpp
lldb/trunk/source/Host/posix/PipePosix.cpp
lldb/trunk/source/Host/windows/LockFileWindows.cpp
lldb/trunk/source/Host/windows/PipeWindows.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionValueString.cpp

lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp

lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp

lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp

lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp

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

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Utility/ModuleCache.cpp
lldb/trunk/tools/lldb-server/lldb-platform.cpp
lldb/trunk/unittests/Utility/ModuleCacheTest.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=286561&r1=286560&r2=286561&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Nov 10 22:28:40 2016
@@ -1082,7 +1082,9 @@ public:
   /// @return
   /// Returns an error object.
   //--
-  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) { return Error(); }
+  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) {
+return Error::success();
+  }
 
   //--
   /// Called before attaching to a process.
@@ -1095,7 +1097,7 @@ public:
   //--
   virtual Error WillAttachToProcessWithName(const char *process_name,
 bool wait_for_launch) {
-return Error();
+return Error::success();
   }
 
   //--
@@ -1204,7 +1206,7 @@ public:
   /// @return
   /// R

[Lldb-commits] [lldb] r286562 - Prevent at compile time converting from Error::success() to Expected

2016-11-10 Thread Mehdi Amini via lldb-commits
Author: mehdi_amini
Date: Thu Nov 10 22:29:25 2016
New Revision: 286562

URL: http://llvm.org/viewvc/llvm-project?rev=286562&view=rev
Log:
Prevent at compile time converting from Error::success() to Expected

This would trigger an assertion at runtime otherwise.

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

Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Core/ModuleList.cpp
lldb/trunk/source/Host/common/NativeBreakpoint.cpp
lldb/trunk/source/Host/common/NativeBreakpointList.cpp
lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
lldb/trunk/source/Host/common/NativeWatchpointList.cpp
lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
lldb/trunk/source/Host/posix/FileSystem.cpp
lldb/trunk/source/Host/posix/MainLoopPosix.cpp
lldb/trunk/source/Host/posix/PipePosix.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionValueString.cpp

lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp

lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp

lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp

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

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
lldb/trunk/source/Target/Platform.cpp
lldb/trunk/source/Target/Process.cpp
lldb/trunk/source/Target/Thread.cpp
lldb/trunk/source/Utility/ModuleCache.cpp
lldb/trunk/tools/lldb-server/lldb-platform.cpp
lldb/trunk/unittests/Utility/ModuleCacheTest.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=286562&r1=286561&r2=286562&view=diff
==
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Nov 10 22:29:25 2016
@@ -1082,9 +1082,7 @@ public:
   /// @return
   /// Returns an error object.
   //--
-  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) {
-return Error::success();
-  }
+  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) { return Error(); }
 
   //--
   /// Called before attaching to a process.
@@ -1097,7 +1095,7 @@ public:
   //--
   virtual Error WillAttachToProcessWithName(const char *process_name,
 bool wait_for_launch) {
-return Error::success();
+return Error();
   }
 
   //--
@@ -1206,7 +1204,7 @@ public:
   /// @return
   /// Returns an error object.
   //--
-  virtual Error WillLaunch(Module *module) { return Error::success(); }
+  virtual Error WillLaunch(Module *module) { return Error(); }
 
   //--
   /// Launch a new process.
@@ -1252,7 +1250,7 @@ public:
   /// @return
   /// Returns an error object.
   //--
-  virtual Error WillResume() { return Error::success(); }
+  virtual Error WillResume() { return Error(); }
 
   //--
   /// Resumes all of a process's threads as configured using the
@@ -1296,7 +1294,7 @@ public:
   /// @return
   /// Returns an error object.
   //--

[Lldb-commits] [PATCH] D26528: Fix uninitialized members.

2016-11-10 Thread Sam McCall via lldb-commits
sammccall created this revision.
sammccall added a subscriber: lldb-commits.

Fix uninitialized members.


https://reviews.llvm.org/D26528

Files:
  source/Host/common/FileSpec.cpp
  source/Target/Process.cpp


Index: source/Target/Process.cpp
===
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -4581,7 +4581,7 @@
   : IOHandler(process->GetTarget().GetDebugger(),
   IOHandler::Type::ProcessIO),
 m_process(process), m_read_file(), m_write_file(write_fd, false),
-m_pipe() {
+m_pipe(), m_is_running(false) {
 m_pipe.CreateNew(false);
 m_read_file.SetDescriptor(GetInputFD(), false);
   }
Index: source/Host/common/FileSpec.cpp
===
--- source/Host/common/FileSpec.cpp
+++ source/Host/common/FileSpec.cpp
@@ -278,8 +278,8 @@
 }
 
 FileSpec::FileSpec()
-: m_directory(), m_filename(), m_syntax(FileSystem::GetNativePathSyntax()) 
{
-}
+: m_directory(), m_filename(), m_is_resolved(false),
+  m_syntax(FileSystem::GetNativePathSyntax()) {}
 
 //--
 // Default constructor that can take an optional full path to a


Index: source/Target/Process.cpp
===
--- source/Target/Process.cpp
+++ source/Target/Process.cpp
@@ -4581,7 +4581,7 @@
   : IOHandler(process->GetTarget().GetDebugger(),
   IOHandler::Type::ProcessIO),
 m_process(process), m_read_file(), m_write_file(write_fd, false),
-m_pipe() {
+m_pipe(), m_is_running(false) {
 m_pipe.CreateNew(false);
 m_read_file.SetDescriptor(GetInputFD(), false);
   }
Index: source/Host/common/FileSpec.cpp
===
--- source/Host/common/FileSpec.cpp
+++ source/Host/common/FileSpec.cpp
@@ -278,8 +278,8 @@
 }
 
 FileSpec::FileSpec()
-: m_directory(), m_filename(), m_syntax(FileSystem::GetNativePathSyntax()) {
-}
+: m_directory(), m_filename(), m_is_resolved(false),
+  m_syntax(FileSystem::GetNativePathSyntax()) {}
 
 //--
 // Default constructor that can take an optional full path to a
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D26528: Fix uninitialized members.

2016-11-10 Thread Zachary Turner via lldb-commits
Maybe just inline the initializations so we don't have to repeat code
across multiple constructors?  i.e.

bool m_is_resolved = false;

in the header file.

On Thu, Nov 10, 2016 at 8:54 PM Sam McCall via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

> sammccall created this revision.
> sammccall added a subscriber: lldb-commits.
>
> Fix uninitialized members.
>
>
> https://reviews.llvm.org/D26528
>
> Files:
>   source/Host/common/FileSpec.cpp
>   source/Target/Process.cpp
>
>
> Index: source/Target/Process.cpp
> ===
> --- source/Target/Process.cpp
> +++ source/Target/Process.cpp
> @@ -4581,7 +4581,7 @@
>: IOHandler(process->GetTarget().GetDebugger(),
>IOHandler::Type::ProcessIO),
>  m_process(process), m_read_file(), m_write_file(write_fd, false),
> -m_pipe() {
> +m_pipe(), m_is_running(false) {
>  m_pipe.CreateNew(false);
>  m_read_file.SetDescriptor(GetInputFD(), false);
>}
> Index: source/Host/common/FileSpec.cpp
> ===
> --- source/Host/common/FileSpec.cpp
> +++ source/Host/common/FileSpec.cpp
> @@ -278,8 +278,8 @@
>  }
>
>  FileSpec::FileSpec()
> -: m_directory(), m_filename(),
> m_syntax(FileSystem::GetNativePathSyntax()) {
> -}
> +: m_directory(), m_filename(), m_is_resolved(false),
> +  m_syntax(FileSystem::GetNativePathSyntax()) {}
>
>  //--
>  // Default constructor that can take an optional full path to a
>
>
> ___
> lldb-commits mailing list
> lldb-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r286565 - Revert unwanted changes in lldb when updating llvm::Error()

2016-11-10 Thread Mehdi Amini via lldb-commits
Author: mehdi_amini
Date: Thu Nov 10 23:07:57 2016
New Revision: 286565

URL: http://llvm.org/viewvc/llvm-project?rev=286565&view=rev
Log:
Revert unwanted changes in lldb when updating llvm::Error()

My script updated lldb::Errors, and I failed to fix it entirely
before pushing. This restore everything in lldb as it was before
r286561.

Modified:
lldb/trunk/source/Host/windows/LockFileWindows.cpp
lldb/trunk/source/Host/windows/PipeWindows.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp

lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp
lldb/trunk/source/Plugins/Process/Windows/Live/ProcessWindowsLive.cpp
lldb/trunk/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp

Modified: lldb/trunk/source/Host/windows/LockFileWindows.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/LockFileWindows.cpp?rev=286565&r1=286564&r2=286565&view=diff
==
--- lldb/trunk/source/Host/windows/LockFileWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/LockFileWindows.cpp Thu Nov 10 23:07:57 2016
@@ -31,7 +31,7 @@ Error fileLock(HANDLE file_handle, DWORD
   if (!::GetOverlappedResult(file_handle, &overlapped, &bytes, TRUE))
 return Error(::GetLastError(), eErrorTypeWin32);
 
-  return Error::success();
+  return Error();
 }
 
 } // namespace
@@ -74,5 +74,5 @@ Error LockFileWindows::DoUnlock() {
   if (!::GetOverlappedResult(m_file, &overlapped, &bytes, TRUE))
 return Error(::GetLastError(), eErrorTypeWin32);
 
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/source/Host/windows/PipeWindows.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/PipeWindows.cpp?rev=286565&r1=286564&r2=286565&view=diff
==
--- lldb/trunk/source/Host/windows/PipeWindows.cpp (original)
+++ lldb/trunk/source/Host/windows/PipeWindows.cpp Thu Nov 10 23:07:57 2016
@@ -161,7 +161,7 @@ Error PipeWindows::OpenNamedPipe(llvm::S
 ZeroMemory(&m_write_overlapped, sizeof(m_write_overlapped));
   }
 
-  return Error::success();
+  return Error();
 }
 
 int PipeWindows::GetReadFileDescriptor() const { return m_read_fd; }
@@ -217,7 +217,7 @@ void PipeWindows::Close() {
   CloseWriteFileDescriptor();
 }
 
-Error PipeWindows::Delete(llvm::StringRef name) { return Error::success(); }
+Error PipeWindows::Delete(llvm::StringRef name) { return Error(); }
 
 bool PipeWindows::CanRead() const { return (m_read != INVALID_HANDLE_VALUE); }
 
@@ -273,7 +273,7 @@ Error PipeWindows::ReadWithTimeout(void
 return Error(::GetLastError(), eErrorTypeWin32);
 
   bytes_read = sys_bytes_read;
-  return Error::success();
+  return Error();
 }
 
 Error PipeWindows::Write(const void *buf, size_t num_bytes,
@@ -291,5 +291,5 @@ Error PipeWindows::Write(const void *buf
 &sys_bytes_written, TRUE);
   if (!result)
 return Error(::GetLastError(), eErrorTypeWin32);
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=286565&r1=286564&r2=286565&view=diff
==
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Thu Nov 10 
23:07:57 2016
@@ -150,7 +150,7 @@ Error ProcessFreeBSD::DoResume() {
   else
 m_monitor->Resume(GetID(), m_resume_signo);
 
-  return Error::success();
+  return Error();
 }
 
 bool ProcessFreeBSD::UpdateThreadList(ThreadList &old_thread_list,

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=286565&r1=286564&r2=286565&view=diff
==
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Thu Nov 10 
23:07:57 2016
@@ -1364,13 +1364,13 @@ Error NativeProcessLinux::SetupSoftwareS
   // If setting the breakpoint fails because next_pc is out of
   // the address space, ignore it and let the debugee segfault.
   if (error.GetError() == EIO || error.GetE