llvm-capstone/lldb
Pavel Labath 107d9bbd6c Add a more succinct logging syntax
This adds the LLDB_LOG macro, which enables one to write more succinct log
statements.
if (log)
  log->Printf("log something: %d", var);
becomes
LLDB_LOG(log, "log something: {0}, var);

The macro still internally does the "if(log)" dance, so the arguments are only
evaluated if logging is enabled, meaning it has the same overhead as the
previous syntax.

Additionally, the log statements will be automatically prefixed with the file
and function generating the log (if the corresponding new argument to the "log
enable" command is enabled), so one does not need to manually specify this in
the log statement.

It also uses the new llvm formatv syntax, which means we don't have to worry
about PRIx64 macros and similar, and we can log complex object (llvm::StringRef,
lldb_private::Error, ...) more easily.

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

llvm-svn: 292360
2017-01-18 11:00:26 +00:00
..
cmake [cmake] Make lldb build with the android ndk toolchain file 2017-01-17 11:55:00 +00:00
docs Small tweaks to the markup in StructuredDataPlugins. 2016-12-13 05:59:24 +00:00
examples
include/lldb Add a more succinct logging syntax 2017-01-18 11:00:26 +00:00
lit
lldb.xcodeproj Remove SymbolFilePDBTests.cpp from the list of tests to include in the 2017-01-04 00:01:25 +00:00
lldb.xcworkspace
packages/Python/lldbsuite Fix TestRegisterVariables for linux arm/arm64 gcc ver > 5 2017-01-13 19:28:42 +00:00
resources
scripts Install lldb Python module on Windows. 2017-01-06 22:05:35 +00:00
source Add a more succinct logging syntax 2017-01-18 11:00:26 +00:00
test [CMake] Only support LLDB_BUILD_FRAMEWORK on CMake 3.7 and later 2016-12-15 18:18:47 +00:00
third_party/Python/module
tools Add a more succinct logging syntax 2017-01-18 11:00:26 +00:00
unittests Add a more succinct logging syntax 2017-01-18 11:00:26 +00:00
utils
www
.arcconfig
.clang-format
.gitignore
CMakeLists.txt [cmake] Make lldb build with the android ndk toolchain file 2017-01-17 11:55:00 +00:00
CODE_OWNERS.txt Removing myself from code ownership file 2016-12-12 22:42:00 +00:00
INSTALL.txt
LICENSE.TXT
use_lldb_suite_root.py