[Lldb-commits] [lldb] r291756 - Fix build for clang r291753

2017-01-12 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan 12 04:44:16 2017
New Revision: 291756

URL: http://llvm.org/viewvc/llvm-project?rev=291756&view=rev
Log:
Fix build for clang r291753

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=291756&r1=291755&r2=291756&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Jan 12 04:44:16 2017
@@ -1528,8 +1528,7 @@ ClassTemplateDecl *ClangASTContext::Crea
   *ast,
   decl_ctx, // What decl context do we use here? TU? The actual decl
 // context?
-  SourceLocation(), decl_name, template_param_list, template_cxx_decl,
-  nullptr);
+  SourceLocation(), decl_name, template_param_list, template_cxx_decl);
 
   if (class_template_decl) {
 if (access_type != eAccessNone)


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


[Lldb-commits] [lldb] r291759 - Add format_provider for the Error class

2017-01-12 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan 12 05:13:24 2017
New Revision: 291759

URL: http://llvm.org/viewvc/llvm-project?rev=291759&view=rev
Log:
Add format_provider for the Error class

Summary:
The formatter supports the same options as the string-like classes, i.e. the
ability to truncate the displayed string. I don't anticipate it would be much
used, but it seems consistent.

Reviewers: zturner, clayborg

Subscribers: mgorny, lldb-commits

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

Added:
lldb/trunk/unittests/Core/ErrorTest.cpp
Modified:
lldb/trunk/include/lldb/Core/Error.h
lldb/trunk/unittests/Core/CMakeLists.txt

Modified: lldb/trunk/include/lldb/Core/Error.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Error.h?rev=291759&r1=291758&r2=291759&view=diff
==
--- lldb/trunk/include/lldb/Core/Error.h (original)
+++ lldb/trunk/include/lldb/Core/Error.h Thu Jan 12 05:13:24 2017
@@ -12,6 +12,7 @@
 #if defined(__cplusplus)
 
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/FormatVariadic.h"
 
 #include 
 #include 
@@ -300,5 +301,15 @@ protected:
 
 } // namespace lldb_private
 
+namespace llvm {
+template <> struct llvm::format_provider {
+  static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
+ llvm::StringRef Options) {
+llvm::format_provider::format(error.AsCString(), OS,
+   Options);
+  }
+};
+}
+
 #endif // #if defined(__cplusplus)
 #endif // #ifndef __DCError_h__

Modified: lldb/trunk/unittests/Core/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/CMakeLists.txt?rev=291759&r1=291758&r2=291759&view=diff
==
--- lldb/trunk/unittests/Core/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Core/CMakeLists.txt Thu Jan 12 05:13:24 2017
@@ -2,6 +2,7 @@ add_lldb_unittest(LLDBCoreTests
   ArchSpecTest.cpp
   BroadcasterTest.cpp
   DataExtractorTest.cpp
+  ErrorTest.cpp
   ListenerTest.cpp
   ScalarTest.cpp
   StructuredDataTest.cpp

Added: lldb/trunk/unittests/Core/ErrorTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ErrorTest.cpp?rev=291759&view=auto
==
--- lldb/trunk/unittests/Core/ErrorTest.cpp (added)
+++ lldb/trunk/unittests/Core/ErrorTest.cpp Thu Jan 12 05:13:24 2017
@@ -0,0 +1,19 @@
+//===-- ErrorTest.cpp ---*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "gtest/gtest.h"
+#include "lldb/Core/Error.h"
+
+using namespace lldb_private;
+
+TEST(ErrorTest, Formatv) {
+  EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
+  EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
+  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());
+}


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


[Lldb-commits] [PATCH] D28519: Add format_provider for the Error class

2017-01-12 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL291759: Add format_provider for the Error class (authored by 
labath).

Changed prior to commit:
  https://reviews.llvm.org/D28519?vs=83813&id=84098#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28519

Files:
  lldb/trunk/include/lldb/Core/Error.h
  lldb/trunk/unittests/Core/CMakeLists.txt
  lldb/trunk/unittests/Core/ErrorTest.cpp


Index: lldb/trunk/unittests/Core/CMakeLists.txt
===
--- lldb/trunk/unittests/Core/CMakeLists.txt
+++ lldb/trunk/unittests/Core/CMakeLists.txt
@@ -2,6 +2,7 @@
   ArchSpecTest.cpp
   BroadcasterTest.cpp
   DataExtractorTest.cpp
+  ErrorTest.cpp
   ListenerTest.cpp
   ScalarTest.cpp
   StructuredDataTest.cpp
Index: lldb/trunk/unittests/Core/ErrorTest.cpp
===
--- lldb/trunk/unittests/Core/ErrorTest.cpp
+++ lldb/trunk/unittests/Core/ErrorTest.cpp
@@ -0,0 +1,19 @@
+//===-- ErrorTest.cpp ---*- C++ 
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "gtest/gtest.h"
+#include "lldb/Core/Error.h"
+
+using namespace lldb_private;
+
+TEST(ErrorTest, Formatv) {
+  EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
+  EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
+  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());
+}
Index: lldb/trunk/include/lldb/Core/Error.h
===
--- lldb/trunk/include/lldb/Core/Error.h
+++ lldb/trunk/include/lldb/Core/Error.h
@@ -12,6 +12,7 @@
 #if defined(__cplusplus)
 
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/FormatVariadic.h"
 
 #include 
 #include 
@@ -300,5 +301,15 @@
 
 } // namespace lldb_private
 
+namespace llvm {
+template <> struct llvm::format_provider {
+  static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
+ llvm::StringRef Options) {
+llvm::format_provider::format(error.AsCString(), OS,
+   Options);
+  }
+};
+}
+
 #endif // #if defined(__cplusplus)
 #endif // #ifndef __DCError_h__


Index: lldb/trunk/unittests/Core/CMakeLists.txt
===
--- lldb/trunk/unittests/Core/CMakeLists.txt
+++ lldb/trunk/unittests/Core/CMakeLists.txt
@@ -2,6 +2,7 @@
   ArchSpecTest.cpp
   BroadcasterTest.cpp
   DataExtractorTest.cpp
+  ErrorTest.cpp
   ListenerTest.cpp
   ScalarTest.cpp
   StructuredDataTest.cpp
Index: lldb/trunk/unittests/Core/ErrorTest.cpp
===
--- lldb/trunk/unittests/Core/ErrorTest.cpp
+++ lldb/trunk/unittests/Core/ErrorTest.cpp
@@ -0,0 +1,19 @@
+//===-- ErrorTest.cpp ---*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "gtest/gtest.h"
+#include "lldb/Core/Error.h"
+
+using namespace lldb_private;
+
+TEST(ErrorTest, Formatv) {
+  EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
+  EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
+  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());
+}
Index: lldb/trunk/include/lldb/Core/Error.h
===
--- lldb/trunk/include/lldb/Core/Error.h
+++ lldb/trunk/include/lldb/Core/Error.h
@@ -12,6 +12,7 @@
 #if defined(__cplusplus)
 
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/FormatVariadic.h"
 
 #include 
 #include 
@@ -300,5 +301,15 @@
 
 } // namespace lldb_private
 
+namespace llvm {
+template <> struct llvm::format_provider {
+  static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
+ llvm::StringRef Options) {
+llvm::format_provider::format(error.AsCString(), OS,
+   Options);
+  }
+};
+}
+
 #endif // #if defined(__cplusplus)
 #endif // #ifndef __DCError_h__
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r291763 - Fix gcc build for r291756

2017-01-12 Thread Pavel Labath via lldb-commits
Author: labath
Date: Thu Jan 12 05:36:56 2017
New Revision: 291763

URL: http://llvm.org/viewvc/llvm-project?rev=291763&view=rev
Log:
Fix gcc build for r291756

I have accidentally added extra llvm:: namespace qualification.

Modified:
lldb/trunk/include/lldb/Core/Error.h

Modified: lldb/trunk/include/lldb/Core/Error.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Error.h?rev=291763&r1=291762&r2=291763&view=diff
==
--- lldb/trunk/include/lldb/Core/Error.h (original)
+++ lldb/trunk/include/lldb/Core/Error.h Thu Jan 12 05:36:56 2017
@@ -302,7 +302,7 @@ protected:
 } // namespace lldb_private
 
 namespace llvm {
-template <> struct llvm::format_provider {
+template <> struct format_provider {
   static void format(const lldb_private::Error &error, llvm::raw_ostream &OS,
  llvm::StringRef Options) {
 llvm::format_provider::format(error.AsCString(), OS,


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


[Lldb-commits] [PATCH] D27459: Straw-man proposal for new logging syntax

2017-01-12 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 84108.
labath added a comment.

- Several people expressed wishes to have this off by default, so I have done 
that.
- Renamed the log option to --file-function (Note I am deliberately not 
printing the line numbers -- they tend to change all the time and it's more 
consistent with what the code is currently doing)
- I am planning to submit the core changes only, the refactors are here just 
for illustration, and I'll handle them separately.


https://reviews.llvm.org/D27459

Files:
  include/lldb/Core/Log.h
  source/Commands/CommandObjectLog.cpp
  source/Core/Log.cpp
  source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  source/Plugins/Process/Linux/NativeProcessLinux.cpp
  source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
  tools/lldb-server/lldb-gdbserver.cpp
  unittests/Core/CMakeLists.txt
  unittests/Core/LogTest.cpp

Index: unittests/Core/LogTest.cpp
===
--- /dev/null
+++ unittests/Core/LogTest.cpp
@@ -0,0 +1,56 @@
+//===-- LogTest.cpp -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===--===//
+
+#include "lldb/Core/Log.h"
+#include "lldb/Core/StreamString.h"
+#include "lldb/Host/Host.h"
+#include "gtest/gtest.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+static std::string GetLogString(uint32_t log_options, const char *format,
+int arg) {
+  std::shared_ptr stream_sp(new StreamString());
+  Log log_(stream_sp);
+  log_.GetOptions().Reset(log_options);
+  Log *log = &log_;
+  LLDB_LOG(log, format, arg);
+  return stream_sp->GetString();
+}
+
+TEST(LogTest, LLDB_LOG_nullptr) {
+  Log *log = nullptr;
+  LLDB_LOG(log, "{0}", 0); // Shouldn't crash
+}
+
+TEST(LogTest, log_options) {
+  EXPECT_EQ("Hello World 47\n", GetLogString(0, "Hello World {0}", 47));
+  EXPECT_EQ("Hello World 47\n",
+GetLogString(LLDB_LOG_OPTION_THREADSAFE, "Hello World {0}", 47));
+
+  {
+std::string msg =
+GetLogString(LLDB_LOG_OPTION_PREPEND_SEQUENCE, "Hello World {0}", 47);
+int seq_no;
+EXPECT_EQ(1, sscanf(msg.c_str(), "%d Hello World 47", &seq_no));
+  }
+
+  EXPECT_EQ(
+  "LogTest.cpp:GetLogString Hello "
+  "World 47\n",
+  GetLogString(LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION, "Hello World {0}", 47));
+
+  EXPECT_EQ(llvm::formatv("[{0}/{1}] Hello World 47\n",
+  Host::GetCurrentProcessID(),
+  Host::GetCurrentThreadID())
+.str(),
+GetLogString(LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD,
+ "Hello World {0}", 47));
+}
Index: unittests/Core/CMakeLists.txt
===
--- unittests/Core/CMakeLists.txt
+++ unittests/Core/CMakeLists.txt
@@ -4,6 +4,7 @@
   DataExtractorTest.cpp
   ErrorTest.cpp
   ListenerTest.cpp
+  LogTest.cpp
   ScalarTest.cpp
   StructuredDataTest.cpp
   TimerTest.cpp
Index: tools/lldb-server/lldb-gdbserver.cpp
===
--- tools/lldb-server/lldb-gdbserver.cpp
+++ tools/lldb-server/lldb-gdbserver.cpp
@@ -424,8 +424,10 @@
 exit(option_error);
   }
 
-  if (!LLDBServerUtilities::SetupLogging(log_file, log_channels,
- LLDB_LOG_OPTION_PREPEND_TIMESTAMP))
+  if (!LLDBServerUtilities::SetupLogging(
+  log_file, log_channels,
+  LLDB_LOG_OPTION_PREPEND_TIMESTAMP |
+  LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION))
 return -1;
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(GDBR_LOG_VERBOSE));
Index: source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
===
--- source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
+++ source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
@@ -176,6 +176,7 @@
 
 bool RegisterContextWindows_x86::ReadRegister(const RegisterInfo *reg_info,
   RegisterValue ®_value) {
+  Log *log = ProcessWindowsLog::GetLogIfAllCategoriesSet(WINDOWS_LOG_REGISTERS);
   if (!CacheAllRegisterValues())
 return false;
 
@@ -203,7 +204,7 @@
 return ReadRegisterHelper(CONTEXT_CONTROL, "EFLAGS", m_context.EFlags,
   reg_value);
   default:
-WINWARN_IFALL(WINDOWS_LOG_REGISTERS, "Requested unknown register %u", reg);
+LLDB_LOG(log, "Requested unknown register %u", reg);
 break;
   }
   return false;
@@ -219,62 +220,52 @@
   if (!CacheAllRegisterValues())
 return false;
 
+  Log *log = ProcessWindowsLog::GetLogIfAl

[Lldb-commits] [PATCH] D28616: Remove a couple of Stream flags

2017-01-12 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision.
labath added reviewers: clayborg, zturner.
labath added subscribers: lldb-commits, beanz.
Herald added a subscriber: aprantl.

I came across this while trying to understand what Log::Debug does. It turns out
it does not do anything, as there is no instance of someone setting a debug flag
on a stream. The same is true for the Verbose and AddPrefix flags. Removing
these will enable some cleanups in the Logging class, and it brings us closer
towards the long term goal of standardizing on llvm stream classes.

I have removed these flags and all code the code which tested for their
presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is
probably going away at some point anyway.

The eBinary flag still has some users, so I am letting it life for the time
being.


https://reviews.llvm.org/D28616

Files:
  include/lldb/Core/Stream.h
  source/Core/Log.cpp
  source/Core/SearchFilter.cpp
  source/Core/Stream.cpp
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
  source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
  source/Symbol/Declaration.cpp

Index: source/Symbol/Declaration.cpp
===
--- source/Symbol/Declaration.cpp
+++ source/Symbol/Declaration.cpp
@@ -42,7 +42,7 @@
 
 bool Declaration::DumpStopContext(Stream *s, bool show_fullpaths) const {
   if (m_file) {
-if (show_fullpaths || s->GetVerbose())
+if (show_fullpaths)
   *s << m_file;
 else
   m_file.GetFilename().Dump(s);
Index: source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -406,8 +406,6 @@
   uint64_t uvalue = Unsigned();
   bool cu_relative_offset = false;
 
-  bool verbose = s.GetVerbose();
-
   switch (m_form) {
   case DW_FORM_addr:
 s.Address(uvalue, sizeof(uint64_t));
@@ -476,8 +474,6 @@
   case DW_FORM_strp: {
 const char *dbg_str = AsCString();
 if (dbg_str) {
-  if (verbose)
-s.Printf(" .debug_str[0x%8.8x] = ", (uint32_t)uvalue);
   s.QuotedCString(dbg_str);
 } else {
   s.PutHex32(uvalue);
@@ -496,28 +492,18 @@
   }
   case DW_FORM_ref1:
 cu_relative_offset = true;
-if (verbose)
-  s.Printf("cu + 0x%2.2x", (uint8_t)uvalue);
 break;
   case DW_FORM_ref2:
 cu_relative_offset = true;
-if (verbose)
-  s.Printf("cu + 0x%4.4x", (uint16_t)uvalue);
 break;
   case DW_FORM_ref4:
 cu_relative_offset = true;
-if (verbose)
-  s.Printf("cu + 0x%4.4x", (uint32_t)uvalue);
 break;
   case DW_FORM_ref8:
 cu_relative_offset = true;
-if (verbose)
-  s.Printf("cu + 0x%8.8" PRIx64, uvalue);
 break;
   case DW_FORM_ref_udata:
 cu_relative_offset = true;
-if (verbose)
-  s.Printf("cu + 0x%" PRIx64, uvalue);
 break;
 
   // All DW_FORM_indirect attributes should be resolved prior to calling this
@@ -535,9 +521,6 @@
   if (cu_relative_offset) {
 assert(m_cu); // CU must be valid for DW_FORM_ref forms that are compile
   // unit relative or we will get this wrong
-if (verbose)
-  s.PutCString(" => ");
-
 s.Printf("{0x%8.8" PRIx64 "}", uvalue + m_cu->GetOffset());
   }
 }
Index: source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
@@ -82,7 +82,6 @@
 lldb::offset_t *offset_ptr,
 dw_addr_t cu_base_addr) {
   uint32_t addr_size = s.GetAddressByteSize();
-  bool verbose = s.GetVerbose();
 
   dw_addr_t base_addr = cu_base_addr;
   while (
@@ -95,10 +94,6 @@
   begin = LLDB_INVALID_ADDRESS;
 
 s.Indent();
-if (verbose) {
-  s.AddressRange(begin, end, sizeof(dw_addr_t), " offsets = ");
-}
-
 if (begin == 0 && end == 0) {
   s.PutCString(" End");
   break;
@@ -111,8 +106,7 @@
   dw_addr_t begin_addr = begin + base_addr;
   dw_addr_t end_addr = end + base_addr;
 
-  s.AddressRange(begin_addr, end_addr, sizeof(dw_addr_t),
- verbose ? " ==> addrs = " : NULL);
+  s.AddressRange(begin_addr, end_addr, sizeof(dw_addr_t), NULL);
 }
   }
 }
Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
===
--- source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -666,13 +666,9 @@
 SymbolFileDWARF *dwarf2Data, const DWARFCompileUnit *cu,
 const DWARFDataExtractor &debug_info_data, lldb::offset_t *offset_ptr,
 Stream &s, dw_attr

[Lldb-commits] [PATCH] D28616: Remove a couple of Stream flags

2017-01-12 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Most of the DWARF stuff is about to go away anyway in favor of using the LLVM 
DWARF parser as I am currently modifying it to support all we need in LLDB so 
we can get rid of the entire DWARF parsers, so many of these changes are fine.

Just fix the definition of eBinary to be (1<<0) and this is good to go.




Comment at: include/lldb/Core/Stream.h:36
   enum {
-eVerbose = (1 << 0),   ///< If set, verbose logging is enabled
-eDebug = (1 << 1), ///< If set, debug logging is enabled
-eAddPrefix = (1 << 2), ///< Add number prefixes for binary, octal and hex
-   ///when eBinary is clear
 eBinary = (1 << 3) ///< Get and put data as binary instead of as the 
default
///string mode.

No one serializes this flag or sets it manually, so make it equal to (1<<0).


https://reviews.llvm.org/D28616



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


[Lldb-commits] [lldb] r291788 - [CMake] Fix finding LLDBWrapPython.cpp in Framework build

2017-01-12 Thread Chris Bieneman via lldb-commits
Author: cbieneman
Date: Thu Jan 12 12:45:59 2017
New Revision: 291788

URL: http://llvm.org/viewvc/llvm-project?rev=291788&view=rev
Log:
[CMake] Fix finding LLDBWrapPython.cpp in Framework build

The framework build was constructing the path to LLDBWrapPython incorrectly. It 
is apparently always in the scripts directory.

Modified:
lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=291788&r1=291787&r2=291788&view=diff
==
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Thu Jan 12 12:45:59 2017
@@ -28,7 +28,7 @@ if (NOT LLDB_DISABLE_PYTHON)
 # Don't set -m when building the framework.
 set(FINISH_EXTRA_ARGS "-m")
   endif()
-  set(LLDB_WRAP_PYTHON ${LLDB_PYTHON_TARGET_DIR}/LLDBWrapPython.cpp)
+  set(LLDB_WRAP_PYTHON ${LLDB_BINARY_DIR}/scripts/LLDBWrapPython.cpp)
 
   add_subdirectory(scripts)
 endif ()


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


[Lldb-commits] [PATCH] D28616: Remove a couple of Stream flags

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

Is this going to make passing LIBLLDB_LOG_OPTION_VERBOSE to 
GetLogIfAllCategoriesSet into a "you can't see these logs" operation?

I use this in a couple places where I have detailed information that I usually 
don't want to see, but in some odd cases I might need it.  Loosing this 
capability would be a shame.


https://reviews.llvm.org/D28616



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


[Lldb-commits] [PATCH] D28616: Remove a couple of Stream flags

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

In https://reviews.llvm.org/D28616#644287, @jingham wrote:

> Is this going to make passing LIBLLDB_LOG_OPTION_VERBOSE to 
> GetLogIfAllCategoriesSet into a "you can't see these logs" operation?
>
>   I use this in a couple places where I have detailed information that I 
> usually don't want to see, but in some odd cases I might need it.  Loosing 
> this capability would be a shame.


That is not going to be affected - I am not touching that flag. I am removing a 
*separate* flag on the Stream level, which was never set (although some of the 
(effectively dead) code did test for it's existence). See old and new 
implementations of Log::GetVerbose to see what I mean.


https://reviews.llvm.org/D28616



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


[Lldb-commits] [PATCH] D28616: Remove a couple of Stream flags

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

Yeah, I'm starting to remember this a bit.  For some reason, we have individual 
log channels with verbose as a category (LIBLLDB_LOG_VERBOSE, 
POSIX_LOG_VERBOSE, KDP_LOG_VERBOSE)  and we have LLDB_LOG_OPTION_VERBOSE which 
is set "GetVerbose" is testing for.

So you can do:

log enable -v lldb memory

or

log enable lldb memory verbose

and they will do different things depending on who checks what.  That seems 
really confusing.  We should remove the verbose category and have everybody 
check GetVerbose instead.  But that's orthogonal to this patch.


https://reviews.llvm.org/D28616



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