Index: lldb/trunk/include/lldb/Core/Log.h =================================================================== --- lldb/trunk/include/lldb/Core/Log.h +++ lldb/trunk/include/lldb/Core/Log.h @@ -1,207 +0,0 @@ -//===-- Log.h ---------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef liblldb_Log_h_ -#define liblldb_Log_h_ - -// Project includes -#include "lldb/Core/Logging.h" -#include "lldb/Utility/Flags.h" -#include "lldb/lldb-private.h" - -// Other libraries and framework includes -#include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/RWMutex.h" -// C++ Includes -#include -#include -#include -// C Includes - -//---------------------------------------------------------------------- -// Logging Options -//---------------------------------------------------------------------- -#define LLDB_LOG_OPTION_THREADSAFE (1u << 0) -#define LLDB_LOG_OPTION_VERBOSE (1u << 1) -#define LLDB_LOG_OPTION_PREPEND_SEQUENCE (1u << 3) -#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP (1u << 4) -#define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD (1u << 5) -#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME (1U << 6) -#define LLDB_LOG_OPTION_BACKTRACE (1U << 7) -#define LLDB_LOG_OPTION_APPEND (1U << 8) -#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION (1U << 9) - -//---------------------------------------------------------------------- -// Logging Functions -//---------------------------------------------------------------------- -namespace lldb_private { - -class Log final { -public: - // Description of a log channel category. - struct Category { - llvm::StringLiteral name; - llvm::StringLiteral description; - uint32_t flag; - }; - - // This class describes a log channel. It also encapsulates the behavior - // necessary to enable a log channel in an atomic manner. - class Channel { - std::atomic log_ptr; - - public: - const llvm::ArrayRef categories; - const uint32_t default_flags; - - constexpr Channel(llvm::ArrayRef categories, - uint32_t default_flags) - : log_ptr(nullptr), categories(categories), - default_flags(default_flags) {} - - // This function is safe to call at any time - // FIXME: Not true yet, mask access is not atomic - Log *GetLogIfAll(uint32_t mask) { - Log *log = log_ptr.load(std::memory_order_acquire); - if (log && log->GetMask().AllSet(mask)) - return log; - return nullptr; - } - - // This function is safe to call at any time - // FIXME: Not true yet, mask access is not atomic - Log *GetLogIfAny(uint32_t mask) { - Log *log = log_ptr.load(std::memory_order_acquire); - if (log && log->GetMask().AnySet(mask)) - return log; - return nullptr; - } - - // Calls to Enable and disable need to be serialized externally. - void Enable(Log &log, const std::shared_ptr &stream_sp, - uint32_t options, uint32_t flags); - - // Calls to Enable and disable need to be serialized externally. - void Disable(uint32_t flags); - }; - - //------------------------------------------------------------------ - // Static accessors for logging channels - //------------------------------------------------------------------ - static void Register(llvm::StringRef name, Channel &channel); - static void Unregister(llvm::StringRef name); - - static bool - EnableLogChannel(const std::shared_ptr &log_stream_sp, - uint32_t log_options, llvm::StringRef channel, - llvm::ArrayRef categories, - Stream &error_stream); - - static bool DisableLogChannel(llvm::StringRef channel, - llvm::ArrayRef categories, - Stream &error_stream); - - static bool ListChannelCategories(llvm::StringRef channel, Stream &stream); - - static void DisableAllLogChannels(Stream *feedback_strm); - - static void ListAllLogChannels(Stream *strm); - - //------------------------------------------------------------------ - // Member functions - //------------------------------------------------------------------ - Log(); - - Log(const std::shared_ptr &stream_sp); - - ~Log(); - - void PutCString(const char *cstr); - void PutString(llvm::StringRef str); - - template - void Format(llvm::StringRef file, llvm::StringRef function, - const char *format, Args &&... args) { - Format(file, function, llvm::formatv(format, std::forward(args)...)); - } - - // CLEANUP: Add llvm::raw_ostream &Stream() function. - void Printf(const char *format, ...) __attribute__((format(printf, 2, 3))); - - void VAPrintf(const char *format, va_list args); - - void LogIf(uint32_t mask, const char *fmt, ...) - __attribute__((format(printf, 3, 4))); - - void Error(const char *fmt, ...) __attribute__((format(printf, 2, 3))); - - void VAError(const char *format, va_list args); - - void Verbose(const char *fmt, ...) __attribute__((format(printf, 2, 3))); - - void Warning(const char *fmt, ...) __attribute__((format(printf, 2, 3))); - - Flags &GetOptions(); - - const Flags &GetOptions() const; - - Flags &GetMask(); - - const Flags &GetMask() const; - - bool GetVerbose() const; - - void SetStream(const std::shared_ptr &stream_sp) { - llvm::sys::ScopedWriter lock(m_stream_mutex); - m_stream_sp = stream_sp; - } - - std::shared_ptr GetStream() { - llvm::sys::ScopedReader lock(m_stream_mutex); - return m_stream_sp; - } - -protected: - //------------------------------------------------------------------ - // Member variables - //------------------------------------------------------------------ - llvm::sys::RWMutex m_stream_mutex; // Protects m_stream_sp - std::shared_ptr m_stream_sp; - - Flags m_options; - Flags m_mask_bits; - -private: - DISALLOW_COPY_AND_ASSIGN(Log); - - void WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file, - llvm::StringRef function); - void WriteMessage(const std::string &message); - - void Format(llvm::StringRef file, llvm::StringRef function, - const llvm::formatv_object_base &payload); -}; - -} // namespace lldb_private - -#define LLDB_LOG(log, ...) \ - do { \ - ::lldb_private::Log *log_private = (log); \ - if (log_private) \ - log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ - } while (0) - -#define LLDB_LOGV(log, ...) \ - do { \ - ::lldb_private::Log *log_private = (log); \ - if (log_private && log_private->GetVerbose()) \ - log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ - } while (0) - -#endif // liblldb_Log_h_ Index: lldb/trunk/include/lldb/Core/Logging.h =================================================================== --- lldb/trunk/include/lldb/Core/Logging.h +++ lldb/trunk/include/lldb/Core/Logging.h @@ -1,69 +0,0 @@ -//===-- Logging.h -----------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef liblldb_Core_Logging_h_ -#define liblldb_Core_Logging_h_ - -// Project includes -#include "lldb/lldb-private.h" -// Other libraries and framework includes -#include "llvm/Support/raw_ostream.h" - -//---------------------------------------------------------------------- -// Log Bits specific to logging in lldb -//---------------------------------------------------------------------- -#define LIBLLDB_LOG_PROCESS (1u << 1) -#define LIBLLDB_LOG_THREAD (1u << 2) -#define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3) -#define LIBLLDB_LOG_EVENTS (1u << 4) -#define LIBLLDB_LOG_BREAKPOINTS (1u << 5) -#define LIBLLDB_LOG_WATCHPOINTS (1u << 6) -#define LIBLLDB_LOG_STEP (1u << 7) -#define LIBLLDB_LOG_EXPRESSIONS (1u << 8) -#define LIBLLDB_LOG_STATE (1u << 10) -#define LIBLLDB_LOG_OBJECT (1u << 11) -#define LIBLLDB_LOG_COMMUNICATION (1u << 12) -#define LIBLLDB_LOG_CONNECTION (1u << 13) -#define LIBLLDB_LOG_HOST (1u << 14) -#define LIBLLDB_LOG_UNWIND (1u << 15) -#define LIBLLDB_LOG_API (1u << 16) -#define LIBLLDB_LOG_SCRIPT (1u << 17) -#define LIBLLDB_LOG_COMMANDS (1U << 18) -#define LIBLLDB_LOG_TYPES (1u << 19) -#define LIBLLDB_LOG_SYMBOLS (1u << 20) -#define LIBLLDB_LOG_MODULES (1u << 21) -#define LIBLLDB_LOG_TARGET (1u << 22) -#define LIBLLDB_LOG_MMAP (1u << 23) -#define LIBLLDB_LOG_OS (1u << 24) -#define LIBLLDB_LOG_PLATFORM (1u << 25) -#define LIBLLDB_LOG_SYSTEM_RUNTIME (1u << 26) -#define LIBLLDB_LOG_JIT_LOADER (1u << 27) -#define LIBLLDB_LOG_LANGUAGE (1u << 28) -#define LIBLLDB_LOG_DATAFORMATTERS (1u << 29) -#define LIBLLDB_LOG_DEMANGLE (1u << 30) -#define LIBLLDB_LOG_ALL (UINT32_MAX) -#define LIBLLDB_LOG_DEFAULT \ - (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD | LIBLLDB_LOG_DYNAMIC_LOADER | \ - LIBLLDB_LOG_BREAKPOINTS | LIBLLDB_LOG_WATCHPOINTS | LIBLLDB_LOG_STEP | \ - LIBLLDB_LOG_STATE | LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_TARGET | \ - LIBLLDB_LOG_COMMANDS) - -namespace lldb_private { - -void LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...); - -Log *GetLogIfAllCategoriesSet(uint32_t mask); - -Log *GetLogIfAnyCategoriesSet(uint32_t mask); - -void InitializeLog(); - -} // namespace lldb_private - -#endif // liblldb_Core_Logging_h_ Index: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h @@ -19,13 +19,13 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/Event.h" #include "lldb/Core/IOHandler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StringList.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandAlias.h" #include "lldb/Interpreter/CommandHistory.h" #include "lldb/Interpreter/CommandObject.h" #include "lldb/Interpreter/ScriptInterpreter.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-forward.h" #include "lldb/lldb-private.h" Index: lldb/trunk/include/lldb/Utility/Log.h =================================================================== --- lldb/trunk/include/lldb/Utility/Log.h +++ lldb/trunk/include/lldb/Utility/Log.h @@ -0,0 +1,207 @@ +//===-- Log.h ---------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_UTILITY_LOG_H +#define LLDB_UTILITY_LOG_H + +// Project includes +#include "lldb/Utility/Flags.h" +#include "lldb/Utility/Logging.h" +#include "lldb/lldb-private.h" + +// Other libraries and framework includes +#include "llvm/Support/FormatVariadic.h" +#include "llvm/Support/RWMutex.h" +// C++ Includes +#include +#include +#include +// C Includes + +//---------------------------------------------------------------------- +// Logging Options +//---------------------------------------------------------------------- +#define LLDB_LOG_OPTION_THREADSAFE (1u << 0) +#define LLDB_LOG_OPTION_VERBOSE (1u << 1) +#define LLDB_LOG_OPTION_PREPEND_SEQUENCE (1u << 3) +#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP (1u << 4) +#define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD (1u << 5) +#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME (1U << 6) +#define LLDB_LOG_OPTION_BACKTRACE (1U << 7) +#define LLDB_LOG_OPTION_APPEND (1U << 8) +#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION (1U << 9) + +//---------------------------------------------------------------------- +// Logging Functions +//---------------------------------------------------------------------- +namespace lldb_private { + +class Log final { +public: + // Description of a log channel category. + struct Category { + llvm::StringLiteral name; + llvm::StringLiteral description; + uint32_t flag; + }; + + // This class describes a log channel. It also encapsulates the behavior + // necessary to enable a log channel in an atomic manner. + class Channel { + std::atomic log_ptr; + + public: + const llvm::ArrayRef categories; + const uint32_t default_flags; + + constexpr Channel(llvm::ArrayRef categories, + uint32_t default_flags) + : log_ptr(nullptr), categories(categories), + default_flags(default_flags) {} + + // This function is safe to call at any time + // FIXME: Not true yet, mask access is not atomic + Log *GetLogIfAll(uint32_t mask) { + Log *log = log_ptr.load(std::memory_order_acquire); + if (log && log->GetMask().AllSet(mask)) + return log; + return nullptr; + } + + // This function is safe to call at any time + // FIXME: Not true yet, mask access is not atomic + Log *GetLogIfAny(uint32_t mask) { + Log *log = log_ptr.load(std::memory_order_acquire); + if (log && log->GetMask().AnySet(mask)) + return log; + return nullptr; + } + + // Calls to Enable and disable need to be serialized externally. + void Enable(Log &log, const std::shared_ptr &stream_sp, + uint32_t options, uint32_t flags); + + // Calls to Enable and disable need to be serialized externally. + void Disable(uint32_t flags); + }; + + //------------------------------------------------------------------ + // Static accessors for logging channels + //------------------------------------------------------------------ + static void Register(llvm::StringRef name, Channel &channel); + static void Unregister(llvm::StringRef name); + + static bool + EnableLogChannel(const std::shared_ptr &log_stream_sp, + uint32_t log_options, llvm::StringRef channel, + llvm::ArrayRef categories, + Stream &error_stream); + + static bool DisableLogChannel(llvm::StringRef channel, + llvm::ArrayRef categories, + Stream &error_stream); + + static bool ListChannelCategories(llvm::StringRef channel, Stream &stream); + + static void DisableAllLogChannels(Stream *feedback_strm); + + static void ListAllLogChannels(Stream *strm); + + //------------------------------------------------------------------ + // Member functions + //------------------------------------------------------------------ + Log(); + + Log(const std::shared_ptr &stream_sp); + + ~Log(); + + void PutCString(const char *cstr); + void PutString(llvm::StringRef str); + + template + void Format(llvm::StringRef file, llvm::StringRef function, + const char *format, Args &&... args) { + Format(file, function, llvm::formatv(format, std::forward(args)...)); + } + + // CLEANUP: Add llvm::raw_ostream &Stream() function. + void Printf(const char *format, ...) __attribute__((format(printf, 2, 3))); + + void VAPrintf(const char *format, va_list args); + + void LogIf(uint32_t mask, const char *fmt, ...) + __attribute__((format(printf, 3, 4))); + + void Error(const char *fmt, ...) __attribute__((format(printf, 2, 3))); + + void VAError(const char *format, va_list args); + + void Verbose(const char *fmt, ...) __attribute__((format(printf, 2, 3))); + + void Warning(const char *fmt, ...) __attribute__((format(printf, 2, 3))); + + Flags &GetOptions(); + + const Flags &GetOptions() const; + + Flags &GetMask(); + + const Flags &GetMask() const; + + bool GetVerbose() const; + + void SetStream(const std::shared_ptr &stream_sp) { + llvm::sys::ScopedWriter lock(m_stream_mutex); + m_stream_sp = stream_sp; + } + + std::shared_ptr GetStream() { + llvm::sys::ScopedReader lock(m_stream_mutex); + return m_stream_sp; + } + +protected: + //------------------------------------------------------------------ + // Member variables + //------------------------------------------------------------------ + llvm::sys::RWMutex m_stream_mutex; // Protects m_stream_sp + std::shared_ptr m_stream_sp; + + Flags m_options; + Flags m_mask_bits; + +private: + DISALLOW_COPY_AND_ASSIGN(Log); + + void WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file, + llvm::StringRef function); + void WriteMessage(const std::string &message); + + void Format(llvm::StringRef file, llvm::StringRef function, + const llvm::formatv_object_base &payload); +}; + +} // namespace lldb_private + +#define LLDB_LOG(log, ...) \ + do { \ + ::lldb_private::Log *log_private = (log); \ + if (log_private) \ + log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ + } while (0) + +#define LLDB_LOGV(log, ...) \ + do { \ + ::lldb_private::Log *log_private = (log); \ + if (log_private && log_private->GetVerbose()) \ + log_private->Format(__FILE__, __FUNCTION__, __VA_ARGS__); \ + } while (0) + +#endif // LLDB_UTILITY_LOG_H Index: lldb/trunk/include/lldb/Utility/Logging.h =================================================================== --- lldb/trunk/include/lldb/Utility/Logging.h +++ lldb/trunk/include/lldb/Utility/Logging.h @@ -0,0 +1,69 @@ +//===-- Logging.h -----------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_UTILITY_LOGGING_H +#define LLDB_UTILITY_LOGGING_H + +// Project includes +#include "lldb/lldb-private.h" +// Other libraries and framework includes +#include "llvm/Support/raw_ostream.h" + +//---------------------------------------------------------------------- +// Log Bits specific to logging in lldb +//---------------------------------------------------------------------- +#define LIBLLDB_LOG_PROCESS (1u << 1) +#define LIBLLDB_LOG_THREAD (1u << 2) +#define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3) +#define LIBLLDB_LOG_EVENTS (1u << 4) +#define LIBLLDB_LOG_BREAKPOINTS (1u << 5) +#define LIBLLDB_LOG_WATCHPOINTS (1u << 6) +#define LIBLLDB_LOG_STEP (1u << 7) +#define LIBLLDB_LOG_EXPRESSIONS (1u << 8) +#define LIBLLDB_LOG_STATE (1u << 10) +#define LIBLLDB_LOG_OBJECT (1u << 11) +#define LIBLLDB_LOG_COMMUNICATION (1u << 12) +#define LIBLLDB_LOG_CONNECTION (1u << 13) +#define LIBLLDB_LOG_HOST (1u << 14) +#define LIBLLDB_LOG_UNWIND (1u << 15) +#define LIBLLDB_LOG_API (1u << 16) +#define LIBLLDB_LOG_SCRIPT (1u << 17) +#define LIBLLDB_LOG_COMMANDS (1U << 18) +#define LIBLLDB_LOG_TYPES (1u << 19) +#define LIBLLDB_LOG_SYMBOLS (1u << 20) +#define LIBLLDB_LOG_MODULES (1u << 21) +#define LIBLLDB_LOG_TARGET (1u << 22) +#define LIBLLDB_LOG_MMAP (1u << 23) +#define LIBLLDB_LOG_OS (1u << 24) +#define LIBLLDB_LOG_PLATFORM (1u << 25) +#define LIBLLDB_LOG_SYSTEM_RUNTIME (1u << 26) +#define LIBLLDB_LOG_JIT_LOADER (1u << 27) +#define LIBLLDB_LOG_LANGUAGE (1u << 28) +#define LIBLLDB_LOG_DATAFORMATTERS (1u << 29) +#define LIBLLDB_LOG_DEMANGLE (1u << 30) +#define LIBLLDB_LOG_ALL (UINT32_MAX) +#define LIBLLDB_LOG_DEFAULT \ + (LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD | LIBLLDB_LOG_DYNAMIC_LOADER | \ + LIBLLDB_LOG_BREAKPOINTS | LIBLLDB_LOG_WATCHPOINTS | LIBLLDB_LOG_STEP | \ + LIBLLDB_LOG_STATE | LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_TARGET | \ + LIBLLDB_LOG_COMMANDS) + +namespace lldb_private { + +void LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...); + +Log *GetLogIfAllCategoriesSet(uint32_t mask); + +Log *GetLogIfAnyCategoriesSet(uint32_t mask); + +void InitializeLog(); + +} // namespace lldb_private + +#endif // LLDB_UTILITY_LOGGING_H Index: lldb/trunk/source/API/SBAddress.cpp =================================================================== --- lldb/trunk/source/API/SBAddress.cpp +++ lldb/trunk/source/API/SBAddress.cpp @@ -12,10 +12,10 @@ #include "lldb/API/SBSection.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/LineEntry.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/API/SBBlock.cpp =================================================================== --- lldb/trunk/source/API/SBBlock.cpp +++ lldb/trunk/source/API/SBBlock.cpp @@ -14,7 +14,6 @@ #include "lldb/API/SBStream.h" #include "lldb/API/SBValue.h" #include "lldb/Core/AddressRange.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/Function.h" @@ -22,6 +21,7 @@ #include "lldb/Symbol/VariableList.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBBreakpoint.cpp =================================================================== --- lldb/trunk/source/API/SBBreakpoint.cpp +++ lldb/trunk/source/API/SBBreakpoint.cpp @@ -26,7 +26,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Address.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" @@ -35,6 +34,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/lldb-enumerations.h" Index: lldb/trunk/source/API/SBBreakpointLocation.cpp =================================================================== --- lldb/trunk/source/API/SBBreakpointLocation.cpp +++ lldb/trunk/source/API/SBBreakpointLocation.cpp @@ -16,13 +16,13 @@ #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/lldb-defines.h" #include "lldb/lldb-types.h" Index: lldb/trunk/source/API/SBBroadcaster.cpp =================================================================== --- lldb/trunk/source/API/SBBroadcaster.cpp +++ lldb/trunk/source/API/SBBroadcaster.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/Broadcaster.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/API/SBEvent.h" Index: lldb/trunk/source/API/SBCommandReturnObject.cpp =================================================================== --- lldb/trunk/source/API/SBCommandReturnObject.cpp +++ lldb/trunk/source/API/SBCommandReturnObject.cpp @@ -15,10 +15,10 @@ #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBCommunication.cpp =================================================================== --- lldb/trunk/source/API/SBCommunication.cpp +++ lldb/trunk/source/API/SBCommunication.cpp @@ -10,8 +10,8 @@ #include "lldb/API/SBCommunication.h" #include "lldb/API/SBBroadcaster.h" #include "lldb/Core/Communication.h" -#include "lldb/Core/Log.h" #include "lldb/Host/ConnectionFileDescriptor.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBCompileUnit.cpp =================================================================== --- lldb/trunk/source/API/SBCompileUnit.cpp +++ lldb/trunk/source/API/SBCompileUnit.cpp @@ -10,13 +10,13 @@ #include "lldb/API/SBCompileUnit.h" #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/LineEntry.h" #include "lldb/Symbol/LineTable.h" #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/Type.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBData.cpp =================================================================== --- lldb/trunk/source/API/SBData.cpp +++ lldb/trunk/source/API/SBData.cpp @@ -15,7 +15,7 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/API/SBDeclaration.cpp =================================================================== --- lldb/trunk/source/API/SBDeclaration.cpp +++ lldb/trunk/source/API/SBDeclaration.cpp @@ -10,8 +10,8 @@ #include "lldb/API/SBDeclaration.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/Declaration.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include Index: lldb/trunk/source/API/SBError.cpp =================================================================== --- lldb/trunk/source/API/SBError.cpp +++ lldb/trunk/source/API/SBError.cpp @@ -9,8 +9,8 @@ #include "lldb/API/SBError.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include Index: lldb/trunk/source/API/SBFileSpec.cpp =================================================================== --- lldb/trunk/source/API/SBFileSpec.cpp +++ lldb/trunk/source/API/SBFileSpec.cpp @@ -12,8 +12,8 @@ #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "llvm/ADT/SmallString.h" Index: lldb/trunk/source/API/SBFileSpecList.cpp =================================================================== --- lldb/trunk/source/API/SBFileSpecList.cpp +++ lldb/trunk/source/API/SBFileSpecList.cpp @@ -13,8 +13,8 @@ #include "lldb/API/SBFileSpecList.h" #include "lldb/API/SBStream.h" #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/API/SBFrame.cpp =================================================================== --- lldb/trunk/source/API/SBFrame.cpp +++ lldb/trunk/source/API/SBFrame.cpp @@ -21,7 +21,6 @@ #include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/ValueObjectRegister.h" #include "lldb/Core/ValueObjectVariable.h" @@ -41,6 +40,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/API/SBAddress.h" Index: lldb/trunk/source/API/SBFunction.cpp =================================================================== --- lldb/trunk/source/API/SBFunction.cpp +++ lldb/trunk/source/API/SBFunction.cpp @@ -11,7 +11,6 @@ #include "lldb/API/SBProcess.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" @@ -19,6 +18,7 @@ #include "lldb/Symbol/VariableList.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBHostOS.cpp =================================================================== --- lldb/trunk/source/API/SBHostOS.cpp +++ lldb/trunk/source/API/SBHostOS.cpp @@ -9,13 +9,13 @@ #include "lldb/API/SBHostOS.h" #include "lldb/API/SBError.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/HostNativeThread.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ThreadLauncher.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/Path.h" Index: lldb/trunk/source/API/SBLineEntry.cpp =================================================================== --- lldb/trunk/source/API/SBLineEntry.cpp +++ lldb/trunk/source/API/SBLineEntry.cpp @@ -11,8 +11,8 @@ #include "lldb/API/SBLineEntry.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/LineEntry.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/API/SBListener.cpp =================================================================== --- lldb/trunk/source/API/SBListener.cpp +++ lldb/trunk/source/API/SBListener.cpp @@ -15,7 +15,7 @@ #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Listener.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/API/SBMemoryRegionInfoList.cpp =================================================================== --- lldb/trunk/source/API/SBMemoryRegionInfoList.cpp +++ lldb/trunk/source/API/SBMemoryRegionInfoList.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBMemoryRegionInfoList.h" +#include "lldb/API/SBMemoryRegionInfo.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Target/MemoryRegionInfo.h" +#include "lldb/Utility/Log.h" #include Index: lldb/trunk/source/API/SBModule.cpp =================================================================== --- lldb/trunk/source/API/SBModule.cpp +++ lldb/trunk/source/API/SBModule.cpp @@ -14,7 +14,6 @@ #include "lldb/API/SBProcess.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBSymbolContextList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Core/ValueObjectList.h" @@ -26,6 +25,7 @@ #include "lldb/Symbol/TypeSystem.h" #include "lldb/Symbol/VariableList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/API/SBProcess.cpp =================================================================== --- lldb/trunk/source/API/SBProcess.cpp +++ lldb/trunk/source/API/SBProcess.cpp @@ -16,7 +16,6 @@ #include "lldb/lldb-types.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" @@ -28,6 +27,7 @@ #include "lldb/Target/SystemRuntime.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" // Project includes Index: lldb/trunk/source/API/SBQueue.cpp =================================================================== --- lldb/trunk/source/API/SBQueue.cpp +++ lldb/trunk/source/API/SBQueue.cpp @@ -15,11 +15,11 @@ #include "lldb/API/SBQueueItem.h" #include "lldb/API/SBThread.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/Queue.h" #include "lldb/Target/QueueItem.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBQueueItem.cpp =================================================================== --- lldb/trunk/source/API/SBQueueItem.cpp +++ lldb/trunk/source/API/SBQueueItem.cpp @@ -13,10 +13,10 @@ #include "lldb/API/SBQueueItem.h" #include "lldb/API/SBThread.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/QueueItem.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBSection.cpp =================================================================== --- lldb/trunk/source/API/SBSection.cpp +++ lldb/trunk/source/API/SBSection.cpp @@ -12,10 +12,10 @@ #include "lldb/API/SBTarget.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Symbol/ObjectFile.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/API/SBSymbol.cpp =================================================================== --- lldb/trunk/source/API/SBSymbol.cpp +++ lldb/trunk/source/API/SBSymbol.cpp @@ -10,11 +10,11 @@ #include "lldb/API/SBSymbol.h" #include "lldb/API/SBStream.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBSymbolContext.cpp =================================================================== --- lldb/trunk/source/API/SBSymbolContext.cpp +++ lldb/trunk/source/API/SBSymbolContext.cpp @@ -9,11 +9,11 @@ #include "lldb/API/SBSymbolContext.h" #include "lldb/API/SBStream.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/API/SBTarget.cpp =================================================================== --- lldb/trunk/source/API/SBTarget.cpp +++ lldb/trunk/source/API/SBTarget.cpp @@ -34,7 +34,6 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/STLUtils.h" @@ -60,6 +59,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/TargetList.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "../source/Commands/CommandObjectBreakpoint.h" Index: lldb/trunk/source/API/SBType.cpp =================================================================== --- lldb/trunk/source/API/SBType.cpp +++ lldb/trunk/source/API/SBType.cpp @@ -11,12 +11,12 @@ #include "lldb/API/SBDefines.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBTypeEnumMember.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Mangled.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/Type.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "llvm/ADT/APSInt.h" Index: lldb/trunk/source/API/SBUnixSignals.cpp =================================================================== --- lldb/trunk/source/API/SBUnixSignals.cpp +++ lldb/trunk/source/API/SBUnixSignals.cpp @@ -8,10 +8,10 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Core/Log.h" #include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" #include "lldb/Target/UnixSignals.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-defines.h" #include "lldb/API/SBUnixSignals.h" Index: lldb/trunk/source/API/SBValue.cpp =================================================================== --- lldb/trunk/source/API/SBValue.cpp +++ lldb/trunk/source/API/SBValue.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Scalar.h" #include "lldb/Core/Section.h" @@ -38,6 +37,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/API/SBDebugger.h" Index: lldb/trunk/source/API/SBValueList.cpp =================================================================== --- lldb/trunk/source/API/SBValueList.cpp +++ lldb/trunk/source/API/SBValueList.cpp @@ -10,8 +10,8 @@ #include "lldb/API/SBValueList.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBValue.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ValueObjectList.h" +#include "lldb/Utility/Log.h" #include Index: lldb/trunk/source/API/SBWatchpoint.cpp =================================================================== --- lldb/trunk/source/API/SBWatchpoint.cpp +++ lldb/trunk/source/API/SBWatchpoint.cpp @@ -16,10 +16,10 @@ #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Breakpoint/WatchpointList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/lldb-defines.h" #include "lldb/lldb-types.h" Index: lldb/trunk/source/Breakpoint/Breakpoint.cpp =================================================================== --- lldb/trunk/source/Breakpoint/Breakpoint.cpp +++ lldb/trunk/source/Breakpoint/Breakpoint.cpp @@ -19,7 +19,6 @@ #include "lldb/Breakpoint/BreakpointResolver.h" #include "lldb/Breakpoint/BreakpointResolverFileLine.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/SearchFilter.h" @@ -29,6 +28,7 @@ #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp +++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp @@ -15,7 +15,6 @@ #include "lldb/Breakpoint/BreakpointID.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ValueObject.h" #include "lldb/Expression/DiagnosticManager.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Breakpoint/BreakpointResolver.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolver.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolver.cpp @@ -22,13 +22,13 @@ #include "lldb/Breakpoint/BreakpointResolverFileRegex.h" #include "lldb/Breakpoint/BreakpointResolverName.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/SearchFilter.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverAddress.cpp @@ -15,11 +15,11 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverFileLine.cpp @@ -14,10 +14,10 @@ // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -14,10 +14,10 @@ // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/SourceManager.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp =================================================================== --- lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp +++ lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp @@ -16,12 +16,12 @@ #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Commands/CommandObjectLog.cpp =================================================================== --- lldb/trunk/source/Commands/CommandObjectLog.cpp +++ lldb/trunk/source/Commands/CommandObjectLog.cpp @@ -14,7 +14,6 @@ #include "CommandObjectLog.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" @@ -30,6 +29,7 @@ #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" Index: lldb/trunk/source/Core/AddressResolver.cpp =================================================================== --- lldb/trunk/source/Core/AddressResolver.cpp +++ lldb/trunk/source/Core/AddressResolver.cpp @@ -12,11 +12,11 @@ // Project includes #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/SearchFilter.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Core/AddressResolverFileLine.cpp =================================================================== --- lldb/trunk/source/Core/AddressResolverFileLine.cpp +++ lldb/trunk/source/Core/AddressResolverFileLine.cpp @@ -10,9 +10,9 @@ #include "lldb/Core/AddressResolverFileLine.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Core/AddressResolverName.cpp =================================================================== --- lldb/trunk/source/Core/AddressResolverName.cpp +++ lldb/trunk/source/Core/AddressResolverName.cpp @@ -13,11 +13,11 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Core/Broadcaster.cpp =================================================================== --- lldb/trunk/source/Core/Broadcaster.cpp +++ lldb/trunk/source/Core/Broadcaster.cpp @@ -15,7 +15,7 @@ // Project includes #include "lldb/Core/Event.h" #include "lldb/Core/Listener.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Core/CMakeLists.txt =================================================================== --- lldb/trunk/source/Core/CMakeLists.txt +++ lldb/trunk/source/Core/CMakeLists.txt @@ -25,8 +25,6 @@ History.cpp IOHandler.cpp Listener.cpp - Log.cpp - Logging.cpp Mangled.cpp Module.cpp ModuleChild.cpp Index: lldb/trunk/source/Core/Communication.cpp =================================================================== --- lldb/trunk/source/Core/Communication.cpp +++ lldb/trunk/source/Core/Communication.cpp @@ -17,11 +17,11 @@ #include "lldb/Core/Connection.h" #include "lldb/Core/Event.h" #include "lldb/Core/Listener.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ThreadLauncher.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Core/DataExtractor.cpp =================================================================== --- lldb/trunk/source/Core/DataExtractor.cpp +++ lldb/trunk/source/Core/DataExtractor.cpp @@ -31,7 +31,6 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/UUID.h" #include "lldb/Core/dwarf.h" #include "lldb/Symbol/ClangASTContext.h" @@ -40,6 +39,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Core/Event.cpp =================================================================== --- lldb/trunk/source/Core/Event.cpp +++ lldb/trunk/source/Core/Event.cpp @@ -16,10 +16,10 @@ #include "lldb/Core/Broadcaster.h" #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Event.h" -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Target/Process.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Core/FileLineResolver.cpp =================================================================== --- lldb/trunk/source/Core/FileLineResolver.cpp +++ lldb/trunk/source/Core/FileLineResolver.cpp @@ -10,9 +10,9 @@ #include "lldb/Core/FileLineResolver.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/LineTable.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Core/Listener.cpp =================================================================== --- lldb/trunk/source/Core/Listener.cpp +++ lldb/trunk/source/Core/Listener.cpp @@ -17,7 +17,7 @@ // Project includes #include "lldb/Core/Broadcaster.h" #include "lldb/Core/Event.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Core/Log.cpp =================================================================== --- lldb/trunk/source/Core/Log.cpp +++ lldb/trunk/source/Core/Log.cpp @@ -1,358 +0,0 @@ -//===-- Log.cpp -------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// Project includes -#include "lldb/Core/Log.h" -#include "lldb/Core/PluginManager.h" -#include "lldb/Core/StreamFile.h" -#include "lldb/Host/Host.h" -#include "lldb/Host/ThisThread.h" -#include "lldb/Interpreter/Args.h" -#include "lldb/Utility/NameMatches.h" -#include "lldb/Utility/StreamString.h" - -// Other libraries and framework includes -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/Support/Chrono.h" -#include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/Signals.h" -#include "llvm/Support/raw_ostream.h" - -// C Includes -// C++ Includes -#include -#include -#include -#include -#include -#include - -using namespace lldb; -using namespace lldb_private; - -namespace { - struct ChannelAndLog { - Log log; - Log::Channel &channel; - - ChannelAndLog(Log::Channel &channel) : channel(channel) {} - }; - typedef llvm::StringMap ChannelMap; -} - -static llvm::ManagedStatic g_channel_map; - -static void ListCategories(Stream &stream, const ChannelMap::value_type &entry) { - stream.Format("Logging categories for '{0}':\n", entry.first()); - stream.Format(" all - all available logging categories\n"); - stream.Format(" default - default set of logging categories\n"); - for (const auto &category : entry.second.channel.categories) - stream.Format(" {0} - {1}\n", category.name, category.description); -} - -static uint32_t GetFlags(Stream &stream, const ChannelMap::value_type &entry, - llvm::ArrayRef categories) { - bool list_categories = false; - uint32_t flags = 0; - for (const char *category : categories) { - if (llvm::StringRef("all").equals_lower(category)) { - flags |= UINT32_MAX; - continue; - } - if (llvm::StringRef("default").equals_lower(category)) { - flags |= entry.second.channel.default_flags; - continue; - } - auto cat = llvm::find_if( - entry.second.channel.categories, - [&](const Log::Category &c) { return c.name.equals_lower(category); }); - if (cat != entry.second.channel.categories.end()) { - flags |= cat->flag; - continue; - } - stream.Format("error: unrecognized log category '{0}'\n", category); - list_categories = true; - } - if (list_categories) - ListCategories(stream, entry); - return flags; -} - -void Log::Channel::Enable(Log &log, - const std::shared_ptr &stream_sp, - uint32_t options, uint32_t flags) { - log.GetMask().Set(flags); - if (log.GetMask().Get()) { - log.GetOptions().Set(options); - log.SetStream(stream_sp); - log_ptr.store(&log, std::memory_order_release); - } -} - -void Log::Channel::Disable(uint32_t flags) { - Log *log = log_ptr.load(std::memory_order_acquire); - if (!log) - return; - log->GetMask().Clear(flags); - if (!log->GetMask().Get()) { - log->SetStream(nullptr); - log_ptr.store(nullptr, std::memory_order_release); - } -} - -Log::Log() : m_stream_sp(), m_options(0), m_mask_bits(0) {} - -Log::Log(const std::shared_ptr &stream_sp) - : m_stream_sp(stream_sp), m_options(0), m_mask_bits(0) {} - -Log::~Log() = default; - -Flags &Log::GetOptions() { return m_options; } - -const Flags &Log::GetOptions() const { return m_options; } - -Flags &Log::GetMask() { return m_mask_bits; } - -const Flags &Log::GetMask() const { return m_mask_bits; } - -void Log::PutCString(const char *cstr) { Printf("%s", cstr); } -void Log::PutString(llvm::StringRef str) { PutCString(str.str().c_str()); } - -//---------------------------------------------------------------------- -// Simple variable argument logging with flags. -//---------------------------------------------------------------------- -void Log::Printf(const char *format, ...) { - va_list args; - va_start(args, format); - VAPrintf(format, args); - va_end(args); -} - -//---------------------------------------------------------------------- -// All logging eventually boils down to this function call. If we have -// a callback registered, then we call the logging callback. If we have -// a valid file handle, we also log to the file. -//---------------------------------------------------------------------- -void Log::VAPrintf(const char *format, va_list args) { - std::string message_string; - llvm::raw_string_ostream message(message_string); - WriteHeader(message, "", ""); - - char *text; - vasprintf(&text, format, args); - message << text; - free(text); - - message << "\n"; - - WriteMessage(message.str()); -} - -//---------------------------------------------------------------------- -// Log only if all of the bits are set -//---------------------------------------------------------------------- -void Log::LogIf(uint32_t bits, const char *format, ...) { - if (!m_options.AllSet(bits)) - return; - - va_list args; - va_start(args, format); - VAPrintf(format, args); - va_end(args); -} - -//---------------------------------------------------------------------- -// Printing of errors that are not fatal. -//---------------------------------------------------------------------- -void Log::Error(const char *format, ...) { - va_list args; - va_start(args, format); - VAError(format, args); - va_end(args); -} - -void Log::VAError(const char *format, va_list args) { - char *arg_msg = nullptr; - ::vasprintf(&arg_msg, format, args); - - if (arg_msg == nullptr) - return; - - Printf("error: %s", arg_msg); - free(arg_msg); -} - -//---------------------------------------------------------------------- -// Printing of warnings that are not fatal only if verbose mode is -// enabled. -//---------------------------------------------------------------------- -void Log::Verbose(const char *format, ...) { - if (!m_options.Test(LLDB_LOG_OPTION_VERBOSE)) - return; - - va_list args; - va_start(args, format); - VAPrintf(format, args); - va_end(args); -} - -//---------------------------------------------------------------------- -// Printing of warnings that are not fatal. -//---------------------------------------------------------------------- -void Log::Warning(const char *format, ...) { - char *arg_msg = nullptr; - va_list args; - va_start(args, format); - ::vasprintf(&arg_msg, format, args); - va_end(args); - - if (arg_msg == nullptr) - return; - - Printf("warning: %s", arg_msg); - free(arg_msg); -} - -void Log::Register(llvm::StringRef name, Channel &channel) { - auto iter = g_channel_map->try_emplace(name, channel); - assert(iter.second == true); - (void)iter; -} - -void Log::Unregister(llvm::StringRef name) { - auto iter = g_channel_map->find(name); - assert(iter != g_channel_map->end()); - iter->second.channel.Disable(UINT32_MAX); - g_channel_map->erase(iter); -} - -bool Log::EnableLogChannel( - const std::shared_ptr &log_stream_sp, - uint32_t log_options, llvm::StringRef channel, - llvm::ArrayRef categories, Stream &error_stream) { - auto iter = g_channel_map->find(channel); - if (iter == g_channel_map->end()) { - error_stream.Format("Invalid log channel '{0}'.\n", channel); - return false; - } - uint32_t flags = categories.empty() - ? iter->second.channel.default_flags - : GetFlags(error_stream, *iter, categories); - iter->second.channel.Enable(iter->second.log, log_stream_sp, log_options, - flags); - return true; -} - -bool Log::DisableLogChannel(llvm::StringRef channel, - llvm::ArrayRef categories, - Stream &error_stream) { - auto iter = g_channel_map->find(channel); - if (iter == g_channel_map->end()) { - error_stream.Format("Invalid log channel '{0}'.\n", channel); - return false; - } - uint32_t flags = categories.empty() - ? UINT32_MAX - : GetFlags(error_stream, *iter, categories); - iter->second.channel.Disable(flags); - return true; -} - -bool Log::ListChannelCategories(llvm::StringRef channel, Stream &stream) { - auto ch = g_channel_map->find(channel); - if (ch == g_channel_map->end()) { - stream.Format("Invalid log channel '{0}'.\n", channel); - return false; - } - ListCategories(stream, *ch); - return true; -} - -void Log::DisableAllLogChannels(Stream *feedback_strm) { - for (auto &entry : *g_channel_map) - entry.second.channel.Disable(UINT32_MAX); -} - -void Log::ListAllLogChannels(Stream *strm) { - if (g_channel_map->empty()) { - strm->PutCString("No logging channels are currently registered.\n"); - return; - } - - for (const auto &channel : *g_channel_map) - ListCategories(*strm, channel); -} -bool Log::GetVerbose() const { return m_options.Test(LLDB_LOG_OPTION_VERBOSE); } - -void Log::WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file, - llvm::StringRef function) { - static uint32_t g_sequence_id = 0; - // Add a sequence ID if requested - if (m_options.Test(LLDB_LOG_OPTION_PREPEND_SEQUENCE)) - OS << ++g_sequence_id << " "; - - // Timestamp if requested - if (m_options.Test(LLDB_LOG_OPTION_PREPEND_TIMESTAMP)) { - auto now = std::chrono::duration( - std::chrono::system_clock::now().time_since_epoch()); - OS << llvm::formatv("{0:f9} ", now.count()); - } - - // Add the process and thread if requested - if (m_options.Test(LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD)) - OS << llvm::formatv("[{0,0+4}/{1,0+4}] ", getpid(), - Host::GetCurrentThreadID()); - - // Add the thread name if requested - if (m_options.Test(LLDB_LOG_OPTION_PREPEND_THREAD_NAME)) { - llvm::SmallString<32> thread_name; - ThisThread::GetName(thread_name); - if (!thread_name.empty()) - OS << thread_name; - } - - if (m_options.Test(LLDB_LOG_OPTION_BACKTRACE)) - llvm::sys::PrintStackTrace(OS); - - if (m_options.Test(LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION) && - (!file.empty() || !function.empty())) { - file = llvm::sys::path::filename(file).take_front(40); - function = function.take_front(40); - OS << llvm::formatv("{0,-60:60} ", (file + ":" + function).str()); - } -} - -void Log::WriteMessage(const std::string &message) { - // Make a copy of our stream shared pointer in case someone disables our - // log while we are logging and releases the stream - auto stream_sp = GetStream(); - if (!stream_sp) - return; - - if (m_options.Test(LLDB_LOG_OPTION_THREADSAFE)) { - static std::recursive_mutex g_LogThreadedMutex; - std::lock_guard guard(g_LogThreadedMutex); - *stream_sp << message; - stream_sp->flush(); - } else { - *stream_sp << message; - stream_sp->flush(); - } -} - -void Log::Format(llvm::StringRef file, llvm::StringRef function, - const llvm::formatv_object_base &payload) { - std::string message_string; - llvm::raw_string_ostream message(message_string); - WriteHeader(message, file, function); - message << payload << "\n"; - WriteMessage(message.str()); -} Index: lldb/trunk/source/Core/Logging.cpp =================================================================== --- lldb/trunk/source/Core/Logging.cpp +++ lldb/trunk/source/Core/Logging.cpp @@ -1,80 +0,0 @@ -//===-- Logging.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/Logging.h" - -// C Includes -// C++ Includes -#include -#include - -// Other libraries and framework includes -// Project includes -#include "lldb/Core/Log.h" -#include "lldb/Core/StreamFile.h" -#include "lldb/Interpreter/Args.h" - -using namespace lldb; -using namespace lldb_private; - -static constexpr Log::Category g_categories[] = { - {{"api"}, {"log API calls and return values"}, LIBLLDB_LOG_API}, - {{"break"}, {"log breakpoints"}, LIBLLDB_LOG_BREAKPOINTS}, - {{"commands"}, {"log command argument parsing"}, LIBLLDB_LOG_COMMANDS}, - {{"comm"}, {"log communication activities"}, LIBLLDB_LOG_COMMUNICATION}, - {{"conn"}, {"log connection details"}, LIBLLDB_LOG_CONNECTION}, - {{"demangle"}, {"log mangled names to catch demangler crashes"}, LIBLLDB_LOG_DEMANGLE}, - {{"dyld"}, {"log shared library related activities"}, LIBLLDB_LOG_DYNAMIC_LOADER}, - {{"event"}, {"log broadcaster, listener and event queue activities"}, LIBLLDB_LOG_EVENTS}, - {{"expr"}, {"log expressions"}, LIBLLDB_LOG_EXPRESSIONS}, - {{"formatters"}, {"log data formatters related activities"}, LIBLLDB_LOG_DATAFORMATTERS}, - {{"host"}, {"log host activities"}, LIBLLDB_LOG_HOST}, - {{"jit"}, {"log JIT events in the target"}, LIBLLDB_LOG_JIT_LOADER}, - {{"language"}, {"log language runtime events"}, LIBLLDB_LOG_LANGUAGE}, - {{"mmap"}, {"log mmap related activities"}, LIBLLDB_LOG_MMAP}, - {{"module"}, {"log module activities such as when modules are created, destroyed, replaced, and more"}, LIBLLDB_LOG_MODULES}, - {{"object"}, {"log object construction/destruction for important objects"}, LIBLLDB_LOG_OBJECT}, - {{"os"}, {"log OperatingSystem plugin related activities"}, LIBLLDB_LOG_OS}, - {{"platform"}, {"log platform events and activities"}, LIBLLDB_LOG_PLATFORM}, - {{"process"}, {"log process events and activities"}, LIBLLDB_LOG_PROCESS}, - {{"script"}, {"log events about the script interpreter"}, LIBLLDB_LOG_SCRIPT}, - {{"state"}, {"log private and public process state changes"}, LIBLLDB_LOG_STATE}, - {{"step"}, {"log step related activities"}, LIBLLDB_LOG_STEP}, - {{"symbol"}, {"log symbol related issues and warnings"}, LIBLLDB_LOG_SYMBOLS}, - {{"system-runtime"}, {"log system runtime events"}, LIBLLDB_LOG_SYSTEM_RUNTIME}, - {{"target"}, {"log target events and activities"}, LIBLLDB_LOG_TARGET}, - {{"thread"}, {"log thread events and activities"}, LIBLLDB_LOG_THREAD}, - {{"types"}, {"log type system related activities"}, LIBLLDB_LOG_TYPES}, - {{"unwind"}, {"log stack unwind activities"}, LIBLLDB_LOG_UNWIND}, - {{"watch"}, {"log watchpoint related activities"}, LIBLLDB_LOG_WATCHPOINTS}, -}; - -static Log::Channel g_log_channel(g_categories, LIBLLDB_LOG_DEFAULT); - -void lldb_private::InitializeLog() { - Log::Register("lldb", g_log_channel); -} - -Log *lldb_private::GetLogIfAllCategoriesSet(uint32_t mask) { - return g_log_channel.GetLogIfAll(mask); -} - -Log *lldb_private::GetLogIfAnyCategoriesSet(uint32_t mask) { - return g_log_channel.GetLogIfAny(mask); -} - - -void lldb_private::LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...) { - if (Log *log = GetLogIfAnyCategoriesSet(mask)) { - va_list args; - va_start(args, format); - log->VAPrintf(format, args); - va_end(args); - } -} Index: lldb/trunk/source/Core/Mangled.cpp =================================================================== --- lldb/trunk/source/Core/Mangled.cpp +++ lldb/trunk/source/Core/Mangled.cpp @@ -28,11 +28,11 @@ #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" -#include "lldb/Core/Log.h" -#include "lldb/Core/Logging.h" #include "lldb/Core/Mangled.h" #include "lldb/Core/Timer.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" #include Index: lldb/trunk/source/Core/Module.cpp =================================================================== --- lldb/trunk/source/Core/Module.cpp +++ lldb/trunk/source/Core/Module.cpp @@ -21,7 +21,6 @@ #include "lldb/Core/AddressResolverFileLine.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -44,6 +43,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Core/ModuleList.cpp =================================================================== --- lldb/trunk/source/Core/ModuleList.cpp +++ lldb/trunk/source/Core/ModuleList.cpp @@ -16,7 +16,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/FileSystem.h" @@ -25,6 +24,7 @@ #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/SymbolFile.h" #include "lldb/Symbol/VariableList.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/Threading.h" Index: lldb/trunk/source/Core/StringList.cpp =================================================================== --- lldb/trunk/source/Core/StringList.cpp +++ lldb/trunk/source/Core/StringList.cpp @@ -9,8 +9,8 @@ #include "lldb/Core/StringList.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include Index: lldb/trunk/source/Core/ValueObject.cpp =================================================================== --- lldb/trunk/source/Core/ValueObject.cpp +++ lldb/trunk/source/Core/ValueObject.cpp @@ -19,7 +19,6 @@ // Project includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ValueObjectCast.h" #include "lldb/Core/ValueObjectChild.h" @@ -28,6 +27,7 @@ #include "lldb/Core/ValueObjectList.h" #include "lldb/Core/ValueObjectMemory.h" #include "lldb/Core/ValueObjectSyntheticFilter.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/DataFormatters/DataVisualization.h" Index: lldb/trunk/source/Core/ValueObjectCast.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectCast.cpp +++ lldb/trunk/source/Core/ValueObjectCast.cpp @@ -13,11 +13,11 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectList.h" +#include "lldb/Utility/Log.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/ObjectFile.h" Index: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp +++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp @@ -14,11 +14,11 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Core/ValueObject.h" #include "lldb/Core/ValueObjectList.h" +#include "lldb/Utility/Log.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Symbol/ObjectFile.h" Index: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp =================================================================== --- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp +++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp @@ -13,9 +13,9 @@ // Project includes #include "lldb/Core/ValueObjectSyntheticFilter.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/TypeSynthetic.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/DataFormatters/FormatManager.cpp =================================================================== --- lldb/trunk/source/DataFormatters/FormatManager.cpp +++ lldb/trunk/source/DataFormatters/FormatManager.cpp @@ -17,11 +17,11 @@ // Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/DataFormatters/LanguageCategory.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Language.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp =================================================================== --- lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp +++ lldb/trunk/source/DataFormatters/TypeCategoryMap.cpp @@ -10,8 +10,8 @@ #include "lldb/DataFormatters/TypeCategoryMap.h" -#include "lldb/Core/Log.h" #include "lldb/DataFormatters/FormatClasses.h" +#include "lldb/Utility/Log.h" // C Includes // C++ Includes Index: lldb/trunk/source/Expression/DWARFExpression.cpp =================================================================== --- lldb/trunk/source/Expression/DWARFExpression.cpp +++ lldb/trunk/source/Expression/DWARFExpression.cpp @@ -16,12 +16,12 @@ #include #include "lldb/Core/DataEncoder.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" #include "lldb/Core/VMRange.h" #include "lldb/Core/Value.h" #include "lldb/Core/dwarf.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h" Index: lldb/trunk/source/Expression/DiagnosticManager.cpp =================================================================== --- lldb/trunk/source/Expression/DiagnosticManager.cpp +++ lldb/trunk/source/Expression/DiagnosticManager.cpp @@ -11,7 +11,7 @@ #include "llvm/Support/ErrorHandling.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/ExpressionVariable.cpp =================================================================== --- lldb/trunk/source/Expression/ExpressionVariable.cpp +++ lldb/trunk/source/Expression/ExpressionVariable.cpp @@ -8,8 +8,8 @@ //===----------------------------------------------------------------------===// #include "lldb/Expression/ExpressionVariable.h" -#include "lldb/Core/Log.h" #include "lldb/Expression/IRExecutionUnit.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/FunctionCaller.cpp =================================================================== --- lldb/trunk/source/Expression/FunctionCaller.cpp +++ lldb/trunk/source/Expression/FunctionCaller.cpp @@ -14,7 +14,6 @@ // Project includes #include "lldb/Expression/FunctionCaller.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/State.h" #include "lldb/Core/ValueObject.h" @@ -31,6 +30,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallFunction.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/IRDynamicChecks.cpp =================================================================== --- lldb/trunk/source/Expression/IRDynamicChecks.cpp +++ lldb/trunk/source/Expression/IRDynamicChecks.cpp @@ -21,7 +21,6 @@ // Project includes #include "lldb/Expression/IRDynamicChecks.h" -#include "lldb/Core/Log.h" #include "lldb/Expression/UtilityFunction.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/ObjCLanguageRuntime.h" @@ -29,6 +28,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" using namespace llvm; using namespace lldb_private; Index: lldb/trunk/source/Expression/IRExecutionUnit.cpp =================================================================== --- lldb/trunk/source/Expression/IRExecutionUnit.cpp +++ lldb/trunk/source/Expression/IRExecutionUnit.cpp @@ -19,7 +19,6 @@ #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Expression/IRExecutionUnit.h" @@ -31,6 +30,7 @@ #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/../../source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" Index: lldb/trunk/source/Expression/IRInterpreter.cpp =================================================================== --- lldb/trunk/source/Expression/IRInterpreter.cpp +++ lldb/trunk/source/Expression/IRInterpreter.cpp @@ -9,7 +9,6 @@ #include "lldb/Expression/IRInterpreter.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Scalar.h" @@ -20,6 +19,7 @@ #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Target/ABI.h" Index: lldb/trunk/source/Expression/IRMemoryMap.cpp =================================================================== --- lldb/trunk/source/Expression/IRMemoryMap.cpp +++ lldb/trunk/source/Expression/IRMemoryMap.cpp @@ -10,13 +10,13 @@ #include "lldb/Expression/IRMemoryMap.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Scalar.h" #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/LLVMUserExpression.cpp =================================================================== --- lldb/trunk/source/Expression/LLVMUserExpression.cpp +++ lldb/trunk/source/Expression/LLVMUserExpression.cpp @@ -12,7 +12,6 @@ // Project includes #include "lldb/Expression/LLVMUserExpression.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/ValueObjectConstResult.h" @@ -37,6 +36,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/Materializer.cpp =================================================================== --- lldb/trunk/source/Expression/Materializer.cpp +++ lldb/trunk/source/Expression/Materializer.cpp @@ -12,7 +12,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Expression/Materializer.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/Core/ValueObjectVariable.h" @@ -26,6 +25,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/UserExpression.cpp =================================================================== --- lldb/trunk/source/Expression/UserExpression.cpp +++ lldb/trunk/source/Expression/UserExpression.cpp @@ -17,7 +17,6 @@ #include #include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/ValueObjectConstResult.h" @@ -42,6 +41,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb_private; Index: lldb/trunk/source/Expression/UtilityFunction.cpp =================================================================== --- lldb/trunk/source/Expression/UtilityFunction.cpp +++ lldb/trunk/source/Expression/UtilityFunction.cpp @@ -15,7 +15,6 @@ // C++ Includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Expression/DiagnosticManager.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb_private; Index: lldb/trunk/source/Host/common/File.cpp =================================================================== --- lldb/trunk/source/Host/common/File.cpp +++ lldb/trunk/source/Host/common/File.cpp @@ -26,11 +26,11 @@ #include "llvm/Support/Process.h" // for llvm::sys::Process::FileDescriptorHasColors() #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Config.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/FileSystem.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Host/common/Host.cpp =================================================================== --- lldb/trunk/source/Host/common/Host.cpp +++ lldb/trunk/source/Host/common/Host.cpp @@ -50,7 +50,6 @@ // Project includes #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" @@ -65,6 +64,7 @@ #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/CleanUp.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-private-forward.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" Index: lldb/trunk/source/Host/common/HostInfoBase.cpp =================================================================== --- lldb/trunk/source/Host/common/HostInfoBase.cpp +++ lldb/trunk/source/Host/common/HostInfoBase.cpp @@ -10,11 +10,11 @@ #include "lldb/Host/Config.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/HostInfoBase.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "llvm/ADT/StringExtras.h" Index: lldb/trunk/source/Host/common/HostNativeThreadBase.cpp =================================================================== --- lldb/trunk/source/Host/common/HostNativeThreadBase.cpp +++ lldb/trunk/source/Host/common/HostNativeThreadBase.cpp @@ -8,10 +8,10 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/HostNativeThreadBase.h" -#include "lldb/Core/Log.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/ThisThread.h" #include "lldb/Host/ThreadLauncher.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/StringExtras.h" using namespace lldb; Index: lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp =================================================================== --- lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp +++ lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/MonitoringProcessLauncher.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/HostProcess.h" @@ -16,6 +15,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Host/common/NativeBreakpoint.cpp =================================================================== --- lldb/trunk/source/Host/common/NativeBreakpoint.cpp +++ lldb/trunk/source/Host/common/NativeBreakpoint.cpp @@ -9,8 +9,8 @@ #include "lldb/Host/common/NativeBreakpoint.h" -#include "lldb/Core/Log.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-defines.h" using namespace lldb_private; Index: lldb/trunk/source/Host/common/NativeBreakpointList.cpp =================================================================== --- lldb/trunk/source/Host/common/NativeBreakpointList.cpp +++ lldb/trunk/source/Host/common/NativeBreakpointList.cpp @@ -9,7 +9,7 @@ #include "lldb/Host/common/NativeBreakpointList.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Host/common/NativeBreakpoint.h" #include "lldb/Host/common/SoftwareBreakpoint.h" Index: lldb/trunk/source/Host/common/NativeProcessProtocol.cpp =================================================================== --- lldb/trunk/source/Host/common/NativeProcessProtocol.cpp +++ lldb/trunk/source/Host/common/NativeProcessProtocol.cpp @@ -10,7 +10,6 @@ #include "lldb/Host/common/NativeProcessProtocol.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/State.h" #include "lldb/Host/Host.h" @@ -20,6 +19,7 @@ #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/Process.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-enumerations.h" using namespace lldb; Index: lldb/trunk/source/Host/common/NativeRegisterContext.cpp =================================================================== --- lldb/trunk/source/Host/common/NativeRegisterContext.cpp +++ lldb/trunk/source/Host/common/NativeRegisterContext.cpp @@ -9,8 +9,8 @@ #include "lldb/Host/common/NativeRegisterContext.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" +#include "lldb/Utility/Log.h" #include "lldb/Host/PosixApi.h" #include "lldb/Host/common/NativeProcessProtocol.h" Index: lldb/trunk/source/Host/common/NativeWatchpointList.cpp =================================================================== --- lldb/trunk/source/Host/common/NativeWatchpointList.cpp +++ lldb/trunk/source/Host/common/NativeWatchpointList.cpp @@ -9,7 +9,7 @@ #include "lldb/Host/common/NativeWatchpointList.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Host/common/Socket.cpp =================================================================== --- lldb/trunk/source/Host/common/Socket.cpp +++ lldb/trunk/source/Host/common/Socket.cpp @@ -9,13 +9,13 @@ #include "lldb/Host/Socket.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Config.h" #include "lldb/Host/Host.h" #include "lldb/Host/SocketAddress.h" #include "lldb/Host/StringConvert.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Host/common/UDPSocket.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #ifndef LLDB_DISABLE_POSIX Index: lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp =================================================================== --- lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp +++ lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp @@ -9,9 +9,9 @@ #include "lldb/Host/common/SoftwareBreakpoint.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Debug.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Host/common/NativeProcessProtocol.h" Index: lldb/trunk/source/Host/common/Symbols.cpp =================================================================== --- lldb/trunk/source/Host/common/Symbols.cpp +++ lldb/trunk/source/Host/common/Symbols.cpp @@ -11,13 +11,13 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Timer.h" #include "lldb/Core/UUID.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/SafeMachO.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Host/common/TCPSocket.cpp =================================================================== --- lldb/trunk/source/Host/common/TCPSocket.cpp +++ lldb/trunk/source/Host/common/TCPSocket.cpp @@ -13,8 +13,8 @@ #include "lldb/Host/common/TCPSocket.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Config.h" +#include "lldb/Utility/Log.h" #ifndef LLDB_DISABLE_POSIX #include Index: lldb/trunk/source/Host/common/ThreadLauncher.cpp =================================================================== --- lldb/trunk/source/Host/common/ThreadLauncher.cpp +++ lldb/trunk/source/Host/common/ThreadLauncher.cpp @@ -10,10 +10,10 @@ // lldb Includes #include "lldb/Host/ThreadLauncher.h" -#include "lldb/Core/Log.h" #include "lldb/Host/HostNativeThread.h" #include "lldb/Host/HostThread.h" #include "lldb/Host/ThisThread.h" +#include "lldb/Utility/Log.h" #if defined(_WIN32) #include "lldb/Host/windows/windows.h" Index: lldb/trunk/source/Host/common/UDPSocket.cpp =================================================================== --- lldb/trunk/source/Host/common/UDPSocket.cpp +++ lldb/trunk/source/Host/common/UDPSocket.cpp @@ -9,8 +9,8 @@ #include "lldb/Host/common/UDPSocket.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Config.h" +#include "lldb/Utility/Log.h" #ifndef LLDB_DISABLE_POSIX #include Index: lldb/trunk/source/Host/freebsd/Host.cpp =================================================================== --- lldb/trunk/source/Host/freebsd/Host.cpp +++ lldb/trunk/source/Host/freebsd/Host.cpp @@ -27,7 +27,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Host/Host.h" @@ -36,6 +35,7 @@ #include "lldb/Target/Process.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Core/DataBufferHeap.h" Index: lldb/trunk/source/Host/linux/Host.cpp =================================================================== --- lldb/trunk/source/Host/linux/Host.cpp +++ lldb/trunk/source/Host/linux/Host.cpp @@ -21,9 +21,9 @@ // Other libraries and framework includes #include "llvm/Support/ScopedPrinter.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" Index: lldb/trunk/source/Host/linux/HostInfoLinux.cpp =================================================================== --- lldb/trunk/source/Host/linux/HostInfoLinux.cpp +++ lldb/trunk/source/Host/linux/HostInfoLinux.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/linux/HostInfoLinux.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/Threading.h" Index: lldb/trunk/source/Host/macosx/Host.mm =================================================================== --- lldb/trunk/source/Host/macosx/Host.mm +++ lldb/trunk/source/Host/macosx/Host.mm @@ -58,7 +58,6 @@ #include "lldb/Core/Communication.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/StreamFile.h" @@ -72,6 +71,7 @@ #include "lldb/Target/Process.h" #include "lldb/Utility/CleanUp.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/NameMatches.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm =================================================================== --- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm +++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm @@ -11,10 +11,10 @@ #include "Plugins/ScriptInterpreter/Python/lldb-python.h" #endif -#include "lldb/Core/Log.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/macosx/HostInfoMacOSX.h" #include "lldb/Interpreter/Args.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/SafeMachO.h" #include "llvm/ADT/SmallString.h" Index: lldb/trunk/source/Host/macosx/Symbols.cpp =================================================================== --- lldb/trunk/source/Host/macosx/Symbols.cpp +++ lldb/trunk/source/Host/macosx/Symbols.cpp @@ -26,7 +26,6 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Timer.h" @@ -35,6 +34,7 @@ #include "lldb/Symbol/ObjectFile.h" #include "lldb/Utility/CleanUp.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "mach/machine.h" Index: lldb/trunk/source/Host/netbsd/Host.cpp =================================================================== --- lldb/trunk/source/Host/netbsd/Host.cpp +++ lldb/trunk/source/Host/netbsd/Host.cpp @@ -28,7 +28,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Host/Host.h" @@ -37,6 +36,7 @@ #include "lldb/Target/Process.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Core/DataBufferHeap.h" Index: lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp =================================================================== --- lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -43,12 +43,12 @@ #endif // Project includes #include "lldb/Core/Communication.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" #include "lldb/Host/Socket.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Interpreter/Args.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Host/posix/HostInfoPosix.cpp =================================================================== --- lldb/trunk/source/Host/posix/HostInfoPosix.cpp +++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp @@ -11,8 +11,8 @@ #include "Plugins/ScriptInterpreter/Python/lldb-python.h" #endif -#include "lldb/Core/Log.h" #include "lldb/Host/posix/HostInfoPosix.h" +#include "lldb/Utility/Log.h" #include "clang/Basic/Version.h" #include "clang/Config/config.h" Index: lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp =================================================================== --- lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp +++ lldb/trunk/source/Host/posix/ProcessLauncherPosixFork.cpp @@ -8,12 +8,12 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/posix/ProcessLauncherPosixFork.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostProcess.h" #include "lldb/Host/Pipe.h" #include "lldb/Target/ProcessLaunchInfo.h" +#include "lldb/Utility/Log.h" #include #include Index: lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp =================================================================== --- lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp +++ lldb/trunk/source/Host/windows/ConnectionGenericFileWindows.cpp @@ -8,8 +8,8 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/windows/ConnectionGenericFileWindows.h" -#include "lldb/Core/Log.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" Index: lldb/trunk/source/Host/windows/Host.cpp =================================================================== --- lldb/trunk/source/Host/windows/Host.cpp +++ lldb/trunk/source/Host/windows/Host.cpp @@ -15,9 +15,9 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" Index: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp =================================================================== --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp @@ -17,10 +17,10 @@ #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" +#include "lldb/Utility/Log.h" #if defined(__APPLE__) #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" Index: lldb/trunk/source/Interpreter/CommandInterpreter.cpp =================================================================== --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp @@ -42,11 +42,11 @@ #include "../Commands/CommandObjectWatchpoint.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #ifndef LLDB_DISABLE_LIBEDIT Index: lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp +++ lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp @@ -17,7 +17,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Triple.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Utility/ARM64_DWARF_Registers.h" Index: lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp @@ -18,7 +18,6 @@ #include "llvm/ADT/Triple.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Utility/ARM64_DWARF_Registers.h" Index: lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp =================================================================== --- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp +++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp @@ -17,7 +17,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/RegisterValue.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp =================================================================== --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp @@ -32,7 +32,6 @@ #include "lldb/Core/Address.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/ExecutionContext.h" @@ -41,6 +40,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/RegularExpression.h" Index: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -15,7 +15,6 @@ #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -31,6 +30,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderDarwinKernel.h" Index: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp @@ -11,7 +11,6 @@ // C++ Includes // Other libraries and framework includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -21,6 +20,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderHexagonDYLD.h" Index: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp @@ -11,13 +11,13 @@ // C++ Includes // Other libraries and framework includes #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/Process.h" Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp @@ -13,7 +13,6 @@ #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanCallFunction.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp @@ -9,7 +9,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" @@ -21,6 +20,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderDarwin.h" #include "DynamicLoaderMacOS.h" Index: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -11,7 +11,6 @@ #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderDarwin.h" #include "DynamicLoaderMacOSXDYLD.h" Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp @@ -16,8 +16,8 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/Log.h" #if defined(__linux__) || defined(__FreeBSD__) #include "Plugins/Process/elf-core/ProcessElfCore.h" Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -11,7 +11,6 @@ // C++ Includes // Other libraries and framework includes #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Symbol.h" @@ -20,6 +19,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/Path.h" Index: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp =================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" // C++ Includes // C Includes Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp @@ -9,10 +9,10 @@ #include "ASTDumper.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangUtil.h" #include "lldb/Symbol/CompilerType.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/raw_ostream.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp @@ -11,11 +11,11 @@ #include "ClangPersistentVariables.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangASTImporter.h" #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "stdlib.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp @@ -9,7 +9,7 @@ #include "ASTStructExtractor.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "stdlib.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -12,7 +12,6 @@ #include "ASTDumper.h" #include "ClangModulesDeclVendor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Symbol/ClangASTContext.h" @@ -24,6 +23,7 @@ #include "lldb/Symbol/TaggedASTType.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "clang/AST/ASTContext.h" #include "clang/AST/RecordLayout.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -15,7 +15,6 @@ #include "ClangPersistentVariables.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/RegisterValue.h" @@ -45,6 +44,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-private.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -70,7 +70,6 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/StringList.h" @@ -88,6 +87,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlanCallFunction.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp @@ -27,7 +27,6 @@ // Project includes #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/State.h" #include "lldb/Core/ValueObject.h" @@ -44,6 +43,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallFunction.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -26,13 +26,13 @@ // Project includes #include "ClangModulesDeclVendor.h" -#include "lldb/Core/Log.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb_private; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp @@ -10,8 +10,8 @@ #include "ClangPersistentVariables.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Value.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "clang/AST/Decl.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -26,7 +26,6 @@ #include "ClangPersistentVariables.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/ValueObjectConstResult.h" @@ -50,6 +49,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "clang/AST/DeclCXX.h" Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp @@ -19,7 +19,6 @@ // C++ Includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Expression/ExpressionSourceCode.h" @@ -28,6 +27,7 @@ #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb_private; Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -26,7 +26,6 @@ #include "clang/AST/ASTContext.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Scalar.h" #include "lldb/Core/dwarf.h" #include "lldb/Expression/IRExecutionUnit.h" @@ -36,6 +35,7 @@ #include "lldb/Symbol/CompilerType.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include Index: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp @@ -29,7 +29,6 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataEncoder.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/ValueObjectConstResult.h" @@ -48,6 +47,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/lldb-private.h" Index: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp =================================================================== --- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -13,7 +13,6 @@ #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -25,6 +24,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "JITLoaderGDB.h" Index: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp =================================================================== --- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp +++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp @@ -25,7 +25,6 @@ // Project includes #include "lldb/Core/FastDemangle.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/UniqueCStringMap.h" #include "lldb/DataFormatters/CXXFunctionPointer.h" @@ -33,6 +32,7 @@ #include "lldb/DataFormatters/FormattersHelpers.h" #include "lldb/DataFormatters/VectorType.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "BlockPointer.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -11,7 +11,6 @@ #include "ItaniumABILanguageRuntime.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Mangled.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include Index: lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp @@ -11,7 +11,6 @@ #include "GoLanguageRuntime.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" @@ -29,6 +28,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/Twine.h" #include Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp @@ -10,8 +10,8 @@ #include "AppleObjCClassDescriptorV2.h" -#include "lldb/Core/Log.h" #include "lldb/Expression/FunctionCaller.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp @@ -10,13 +10,13 @@ #include "AppleObjCDeclVendor.h" #include "Plugins/ExpressionParser/Clang/ASTDumper.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/ClangExternalASTSourceCommon.h" #include "lldb/Symbol/ClangUtil.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -14,7 +14,6 @@ #include "clang/AST/Type.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/PluginManager.h" @@ -33,6 +32,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp @@ -15,7 +15,6 @@ #include "clang/AST/Type.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" @@ -30,6 +29,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -25,7 +25,6 @@ #include "lldb/Core/ClangForward.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" @@ -53,6 +52,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Value.h" @@ -38,6 +37,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp @@ -14,7 +14,6 @@ // Project includes #include "AppleThreadPlanStepThroughObjCTrampoline.h" #include "AppleObjCTrampolineHandler.h" -#include "lldb/Core/Log.h" #include "lldb/Expression/DiagnosticManager.h" #include "lldb/Expression/FunctionCaller.h" #include "lldb/Expression/UtilityFunction.h" @@ -24,6 +23,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" #include "lldb/Target/ThreadPlanStepOut.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp @@ -25,9 +25,9 @@ #include "clang/Basic/TargetOptions.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "RenderScriptExpressionOpts.h" #include "RenderScriptRuntime.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/ValueObjectVariable.h" #include "lldb/DataFormatters/DumpValueObjectOptions.h" @@ -40,6 +39,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" using namespace lldb; Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp @@ -9,7 +9,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Host/StringConvert.h" #include "lldb/Interpreter/Args.h" @@ -24,6 +23,7 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "RenderScriptRuntime.h" #include "RenderScriptScriptGroup.h" Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -24,8 +24,8 @@ #include "llvm/Pass.h" // Project includes -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; namespace { Index: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -16,7 +16,6 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/DataBufferLLVM.h" #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -27,6 +26,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "llvm/ADT/PointerUnion.h" Index: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -16,7 +16,6 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #ifndef __APPLE__ Index: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -21,7 +21,6 @@ #include "lldb/Core/DataBufferLLVM.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -43,6 +42,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadList.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/SafeMachO.h" Index: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" @@ -15,6 +14,7 @@ #include "lldb/Core/ValueObject.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/StringConvert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/UriParser.h" // Project includes Index: lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp +++ lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp @@ -8,10 +8,10 @@ //===----------------------------------------------------------------------===// // Other libraries and framework includes -#include "lldb/Core/Log.h" #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/UriParser.h" #include "PlatformAndroidRemoteGDBServer.h" Index: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -22,7 +22,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointSite.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" #include "lldb/Host/FileSpec.h" @@ -30,6 +29,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" // Define these constants from FreeBSD mman.h for use when targeting Index: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -20,7 +20,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" #include "lldb/Host/FileSpec.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" // Define these constants from Linux mman.h for use when targeting Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp @@ -15,7 +15,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -26,6 +25,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp @@ -15,7 +15,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -26,6 +25,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -22,7 +22,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointSite.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Timer.h" @@ -39,6 +38,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Threading.h" Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -19,7 +19,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -34,6 +33,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -18,7 +18,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -31,6 +30,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -15,7 +15,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -25,6 +24,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp +++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp @@ -16,7 +16,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp +++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp @@ -20,7 +20,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/State.h" #include "lldb/Host/FileSpec.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" // Define these constants from NetBSD mman.h for use when targeting Index: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -16,7 +16,6 @@ #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/ValueObject.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp =================================================================== --- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp +++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp @@ -15,7 +15,6 @@ // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -29,6 +28,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/UriParser.h" Index: lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp +++ lldb/trunk/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp @@ -30,10 +30,10 @@ // LLDB includes #include "lldb/lldb-enumerations.h" -#include "lldb/Core/Log.h" #include "lldb/Host/PseudoTerminal.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "CFBundle.h" Index: lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp +++ lldb/trunk/source/Plugins/Process/Darwin/MachException.cpp @@ -22,10 +22,10 @@ #include // LLDB includes -#include "lldb/Core/Log.h" #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp +++ lldb/trunk/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp @@ -19,10 +19,10 @@ // C++ includes // LLDB includes -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Host/PseudoTerminal.h" #include "lldb/Target/ProcessLaunchInfo.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "CFBundle.h" Index: lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp +++ lldb/trunk/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp @@ -20,8 +20,8 @@ #include // LLDB includes -#include "lldb/Core/Log.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "lldb/lldb-enumerations.h" Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp @@ -12,9 +12,9 @@ #include "NativeRegisterContextLinux_arm.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Linux/Procfs.h" #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp @@ -17,10 +17,10 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Host/common/NativeProcessProtocol.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Linux/NativeProcessLinux.h" #include "Plugins/Process/Linux/Procfs.h" Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp @@ -22,12 +22,12 @@ #include "Plugins/Process/Utility/RegisterContextLinux_mips64.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/EmulateInstruction.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-private-enumerations.h" #define NT_MIPS_MSA 0x600 Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp @@ -12,10 +12,10 @@ #include "NativeRegisterContextLinux_s390x.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Host/HostInfo.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Utility/RegisterContextLinux_s390x.h" Index: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp @@ -12,10 +12,10 @@ #include "NativeRegisterContextLinux_x86_64.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Host/HostInfo.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Utility/RegisterContextLinux_i386.h" #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h" Index: lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ lldb/trunk/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -16,11 +16,11 @@ #include "NativeRegisterContextLinux.h" #include "SingleStepCheck.h" -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Host/HostNativeThread.h" #include "lldb/Host/linux/Ptrace.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-enumerations.h" #include "llvm/ADT/SmallString.h" Index: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -19,12 +19,12 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Core/UUID.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Host.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/Log.h" // Project includes #include "ProcessKDPLog.h" Index: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h =================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h +++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.h @@ -10,7 +10,7 @@ #ifndef liblldb_ProcessKDPLog_h_ #define liblldb_ProcessKDPLog_h_ -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #define KDP_LOG_PROCESS (1u << 1) #define KDP_LOG_THREAD (1u << 2) Index: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h =================================================================== --- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h +++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h @@ -16,7 +16,7 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #define POSIX_LOG_PROCESS (1u << 1) #define POSIX_LOG_THREAD (1u << 2) Index: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp +++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp @@ -13,9 +13,9 @@ #include "Plugins/Process/Utility/HistoryUnwind.h" #include "Plugins/Process/Utility/RegisterContextHistory.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/StackFrameList.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp @@ -19,10 +19,10 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/Compiler.h" #include "Plugins/Process/Utility/InstructionUtils.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -21,12 +21,12 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" #include "lldb/Target/Process.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -14,10 +14,10 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -16,10 +16,10 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Scalar.h" #include "lldb/Utility/Endian.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.cpp @@ -11,7 +11,6 @@ #include "lldb/Core/Address.h" #include "lldb/Core/AddressRange.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Value.h" @@ -28,6 +27,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-private.h" #include "RegisterContextDummy.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.cpp @@ -11,7 +11,6 @@ #include "lldb/Core/Address.h" #include "lldb/Core/AddressRange.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Value.h" @@ -28,6 +27,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-private.h" #include "RegisterContextHistory.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -10,7 +10,6 @@ #include "lldb/Core/Address.h" #include "lldb/Core/AddressRange.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/Value.h" @@ -31,6 +30,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/lldb-private.h" #include "RegisterContextLLDB.h" Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h @@ -16,8 +16,8 @@ // Project includes #include "RegisterInfoInterface.h" #include "lldb-arm-register-enums.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" class ProcessMonitor; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h @@ -16,8 +16,8 @@ // Project includes #include "RegisterInfoInterface.h" #include "lldb-arm64-register-enums.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" class ProcessMonitor; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h @@ -17,8 +17,8 @@ #include "RegisterContext_mips.h" #include "RegisterInfoInterface.h" #include "lldb-mips-freebsd-register-enums.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" using namespace lldb_private; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h @@ -16,8 +16,8 @@ // Project includes #include "RegisterContext_powerpc.h" #include "RegisterInfoInterface.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" class ProcessMonitor; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h @@ -17,8 +17,8 @@ #include "RegisterContext_s390x.h" #include "RegisterInfoInterface.h" #include "lldb-s390x-register-enums.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" class ProcessMonitor; Index: lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h +++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h @@ -17,8 +17,8 @@ #include "RegisterContext_x86.h" #include "RegisterInfoInterface.h" #include "lldb-x86-register-enums.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" class ProcessMonitor; Index: lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/FuncUnwinders.h" #include "lldb/Symbol/Function.h" @@ -17,6 +16,7 @@ #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "RegisterContextLLDB.h" #include "UnwindLLDB.h" Index: lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp +++ lldb/trunk/source/Plugins/Process/Windows/Common/DebuggerThread.cpp @@ -11,7 +11,6 @@ #include "ExceptionRecord.h" #include "IDebugDelegate.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/FileSpec.h" #include "lldb/Host/Predicate.h" @@ -23,6 +22,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Windows/Common/ProcessWindowsLog.h" Index: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h +++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindowsLog.h @@ -10,7 +10,7 @@ #ifndef liblldb_ProcessWindowsLog_h_ #define liblldb_ProcessWindowsLog_h_ -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #define WINDOWS_LOG_PROCESS (1u << 1) // Log process operations #define WINDOWS_LOG_EXCEPTION (1u << 1) // Log exceptions Index: lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp +++ lldb/trunk/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp @@ -7,14 +7,14 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Core/Log.h" -#include "lldb/Core/Logging.h" #include "lldb/Core/State.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/HostNativeThreadBase.h" #include "lldb/Host/windows/HostThreadWindows.h" #include "lldb/Host/windows/windows.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" +#include "lldb/Utility/Logging.h" #include "ProcessWindows.h" #include "ProcessWindowsLog.h" Index: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -25,6 +24,7 @@ #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/UnixSignals.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/ELF.h" #include "llvm/Support/Threading.h" Index: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -8,11 +8,11 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Unwind.h" +#include "lldb/Utility/Log.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h" Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -16,7 +16,6 @@ // C++ Includes // Other libraries and framework includes -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/FileSpec.h" @@ -28,6 +27,7 @@ #include "lldb/Host/ThreadLauncher.h" #include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/StreamString.h" #include "llvm/ADT/SmallString.h" Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -19,7 +19,6 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamGDBRemote.h" @@ -32,6 +31,7 @@ #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/JSON.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" // Project includes Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -22,7 +22,6 @@ #include // Other libraries and framework includes -#include "lldb/Core/Log.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/StreamGDBRemote.h" #include "lldb/Host/Config.h" @@ -38,6 +37,7 @@ #include "lldb/Target/Process.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/JSON.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "llvm/ADT/Triple.h" Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -22,7 +22,6 @@ // Other libraries and framework includes #include "lldb/Core/DataBuffer.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RegisterValue.h" #include "lldb/Core/State.h" #include "lldb/Host/ConnectionFileDescriptor.h" @@ -41,6 +40,7 @@ #include "lldb/Utility/Endian.h" #include "lldb/Utility/JSON.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/UriParser.h" #include "llvm/ADT/Triple.h" Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -22,7 +22,6 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamGDBRemote.h" #include "lldb/Core/StructuredData.h" #include "lldb/Host/Config.h" @@ -35,6 +34,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/JSON.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/UriParser.h" Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h @@ -15,7 +15,7 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #define GDBR_LOG_PROCESS (1u << 1) #define GDBR_LOG_THREAD (1u << 2) Index: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp +++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp @@ -20,7 +20,6 @@ // Other libraries and framework includes #include "lldb/Core/DataBuffer.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -31,6 +30,7 @@ #include "lldb/Target/MemoryRegionInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" // Project includes #include "ProcessMachCore.h" Index: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp +++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp @@ -13,7 +13,6 @@ // Other libraries and framework includes #include "lldb/Core/DataBufferLLVM.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -24,6 +23,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Threading.h" Index: lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp +++ lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp @@ -21,11 +21,11 @@ #include "Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" #include "lldb/Target/Unwind.h" +#include "lldb/Utility/Log.h" // C Includes // C++ Includes Index: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp =================================================================== --- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -17,7 +17,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -29,6 +28,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlanCallOnFunctionExit.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #define DARWIN_LOG_TYPE_VALUE "DarwinLog" Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -21,7 +21,6 @@ #include "UniqueDWARFASTType.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Host/Host.h" @@ -37,6 +36,7 @@ #include "lldb/Symbol/TypeMap.h" #include "lldb/Target/Language.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "clang/AST/DeclCXX.h" Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.cpp @@ -2,7 +2,6 @@ #include "DWARFASTParserOCaml.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" @@ -10,6 +9,7 @@ #include "lldb/Symbol/Type.h" #include "lldb/Symbol/TypeList.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp @@ -14,8 +14,8 @@ #include -#include "lldb/Core/Log.h" #include "lldb/Core/Timer.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" #include "DWARFCompileUnit.h" Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -13,10 +13,10 @@ #include #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Timer.h" #include "lldb/Host/Host.h" +#include "lldb/Utility/Log.h" #include "LogChannelDWARF.h" #include "SymbolFileDWARF.h" Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp @@ -9,7 +9,7 @@ #include "DWARFDebugPubnamesSet.h" -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "SymbolFileDWARF.h" Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h @@ -14,7 +14,7 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #define DWARF_LOG_DEBUG_INFO (1u << 1) #define DWARF_LOG_DEBUG_LINE (1u << 2) Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp =================================================================== --- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp +++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Expression/DiagnosticManager.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp =================================================================== --- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp +++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Expression/DiagnosticManager.h" @@ -28,6 +27,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp =================================================================== --- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp +++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp @@ -13,7 +13,6 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Expression/DiagnosticManager.h" @@ -26,6 +25,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp =================================================================== --- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp +++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Value.h" #include "lldb/Expression/DiagnosticManager.h" @@ -30,6 +29,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/lldb-private.h" Index: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp =================================================================== --- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp +++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp @@ -11,7 +11,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/DataExtractor.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -26,6 +25,7 @@ #include "lldb/Target/QueueList.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "SystemRuntimeMacOSX.h" Index: lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp =================================================================== --- lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp +++ lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp @@ -15,13 +15,13 @@ #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/FormatEntity.h" -#include "lldb/Core/Log.h" #include "lldb/Core/PluginManager.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Symbol/Block.cpp =================================================================== --- lldb/trunk/source/Symbol/Block.cpp +++ lldb/trunk/source/Symbol/Block.cpp @@ -9,13 +9,13 @@ #include "lldb/Symbol/Block.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/SymbolFile.h" #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/VariableList.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Symbol/ClangASTContext.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp +++ lldb/trunk/source/Symbol/ClangASTContext.cpp @@ -73,7 +73,6 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Utility/Flags.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Scalar.h" @@ -94,6 +93,7 @@ #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h" Index: lldb/trunk/source/Symbol/ClangASTImporter.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTImporter.cpp +++ lldb/trunk/source/Symbol/ClangASTImporter.cpp @@ -8,12 +8,12 @@ //===----------------------------------------------------------------------===// #include "lldb/Symbol/ClangASTImporter.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/ClangASTContext.h" #include "lldb/Symbol/ClangExternalASTSourceCommon.h" #include "lldb/Symbol/ClangUtil.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclObjC.h" Index: lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp +++ lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp @@ -40,7 +40,7 @@ #include #endif -#include "lldb/Core/Log.h" +#include "lldb/Utility/Log.h" #include "clang/AST/Decl.h" using namespace clang; Index: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp =================================================================== --- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp +++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp @@ -13,7 +13,6 @@ #include "lldb/Core/ArchSpec.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Core/Section.h" @@ -22,6 +21,7 @@ #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "llvm/Support/MathExtras.h" Index: lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp =================================================================== --- lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp +++ lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp @@ -12,7 +12,6 @@ #include #include "lldb/Core/ArchSpec.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Core/Section.h" @@ -23,6 +22,7 @@ #include "lldb/Symbol/UnwindPlan.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Symbol/OCamlASTContext.cpp =================================================================== --- lldb/trunk/source/Symbol/OCamlASTContext.cpp +++ lldb/trunk/source/Symbol/OCamlASTContext.cpp @@ -9,7 +9,6 @@ //===----------------------------------------------------------------------===// #include "lldb/Symbol/OCamlASTContext.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/StreamFile.h" @@ -19,6 +18,7 @@ #include "lldb/Symbol/Type.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "Plugins/SymbolFile/DWARF/DWARFASTParserOCaml.h" Index: lldb/trunk/source/Symbol/ObjectFile.cpp =================================================================== --- lldb/trunk/source/Symbol/ObjectFile.cpp +++ lldb/trunk/source/Symbol/ObjectFile.cpp @@ -11,7 +11,6 @@ #include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h" #include "lldb/Core/DataBuffer.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -23,6 +22,7 @@ #include "lldb/Target/RegisterContext.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/lldb-private.h" Index: lldb/trunk/source/Symbol/SymbolContext.cpp =================================================================== --- lldb/trunk/source/Symbol/SymbolContext.cpp +++ lldb/trunk/source/Symbol/SymbolContext.cpp @@ -9,7 +9,6 @@ #include "lldb/Symbol/SymbolContext.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/Host.h" @@ -23,6 +22,7 @@ #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/Variable.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Symbol/SymbolFile.cpp =================================================================== --- lldb/trunk/source/Symbol/SymbolFile.cpp +++ lldb/trunk/source/Symbol/SymbolFile.cpp @@ -9,13 +9,13 @@ #include "lldb/Symbol/SymbolFile.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/TypeMap.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Symbol/VariableList.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "lldb/lldb-private.h" Index: lldb/trunk/source/Symbol/UnwindPlan.cpp =================================================================== --- lldb/trunk/source/Symbol/UnwindPlan.cpp +++ lldb/trunk/source/Symbol/UnwindPlan.cpp @@ -9,11 +9,11 @@ #include "lldb/Symbol/UnwindPlan.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ConstString.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/Memory.cpp =================================================================== --- lldb/trunk/source/Target/Memory.cpp +++ lldb/trunk/source/Target/Memory.cpp @@ -14,10 +14,10 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/Log.h" #include "lldb/Core/RangeMap.h" #include "lldb/Core/State.h" #include "lldb/Target/Process.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ModuleCache.cpp =================================================================== --- lldb/trunk/source/Target/ModuleCache.cpp +++ lldb/trunk/source/Target/ModuleCache.cpp @@ -9,13 +9,13 @@ #include "lldb/Target/ModuleCache.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Host/File.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/LockFile.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/FileUtilities.h" Index: lldb/trunk/source/Target/ObjCLanguageRuntime.cpp =================================================================== --- lldb/trunk/source/Target/ObjCLanguageRuntime.cpp +++ lldb/trunk/source/Target/ObjCLanguageRuntime.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// #include "clang/AST/Type.h" -#include "lldb/Core/Log.h" #include "lldb/Core/MappedHash.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" @@ -21,6 +20,7 @@ #include "lldb/Symbol/TypeList.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "llvm/ADT/StringRef.h" Index: lldb/trunk/source/Target/Platform.cpp =================================================================== --- lldb/trunk/source/Target/Platform.cpp +++ lldb/trunk/source/Target/Platform.cpp @@ -22,7 +22,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -41,6 +40,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/UnixSignals.h" #include "lldb/Utility/Error.h" +#include "lldb/Utility/Log.h" // Define these constants from POSIX mman.h rather than include the file // so that they will be correct even when compiled on Linux. Index: lldb/trunk/source/Target/Process.cpp =================================================================== --- lldb/trunk/source/Target/Process.cpp +++ lldb/trunk/source/Target/Process.cpp @@ -20,7 +20,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Event.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" @@ -63,6 +62,7 @@ #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanBase.h" #include "lldb/Target/UnixSignals.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/NameMatches.h" #include "lldb/Utility/SelectHelper.h" Index: lldb/trunk/source/Target/ProcessLaunchInfo.cpp =================================================================== --- lldb/trunk/source/Target/ProcessLaunchInfo.cpp +++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp @@ -14,13 +14,13 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Host/Config.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/HostInfo.h" #include "lldb/Target/FileAction.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/FileSystem.h" Index: lldb/trunk/source/Target/SectionLoadList.cpp =================================================================== --- lldb/trunk/source/Target/SectionLoadList.cpp +++ lldb/trunk/source/Target/SectionLoadList.cpp @@ -13,12 +13,12 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/StackFrameList.cpp =================================================================== --- lldb/trunk/source/Target/StackFrameList.cpp +++ lldb/trunk/source/Target/StackFrameList.cpp @@ -14,7 +14,6 @@ #include "lldb/Target/StackFrameList.h" #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/Log.h" #include "lldb/Core/SourceManager.h" #include "lldb/Core/StreamFile.h" #include "lldb/Symbol/Block.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/Unwind.h" +#include "lldb/Utility/Log.h" //#define DEBUG_STACK_FRAMES 1 Index: lldb/trunk/source/Target/StopInfo.cpp =================================================================== --- lldb/trunk/source/Target/StopInfo.cpp +++ lldb/trunk/source/Target/StopInfo.cpp @@ -18,7 +18,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/ValueObject.h" #include "lldb/Expression/UserExpression.h" #include "lldb/Target/Process.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/UnixSignals.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Target/Target.cpp =================================================================== --- lldb/trunk/source/Target/Target.cpp +++ lldb/trunk/source/Target/Target.cpp @@ -24,7 +24,6 @@ #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Event.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/Section.h" @@ -57,6 +56,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" using namespace lldb; Index: lldb/trunk/source/Target/Thread.cpp =================================================================== --- lldb/trunk/source/Target/Thread.cpp +++ lldb/trunk/source/Target/Thread.cpp @@ -17,7 +17,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/FormatEntity.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/State.h" #include "lldb/Core/ValueObject.h" @@ -48,6 +47,7 @@ #include "lldb/Target/ThreadPlanStepUntil.h" #include "lldb/Target/ThreadSpec.h" #include "lldb/Target/Unwind.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" Index: lldb/trunk/source/Target/ThreadList.cpp =================================================================== --- lldb/trunk/source/Target/ThreadList.cpp +++ lldb/trunk/source/Target/ThreadList.cpp @@ -15,7 +15,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" @@ -23,6 +22,7 @@ #include "lldb/Target/ThreadList.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Utility/LLDBAssert.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlan.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlan.cpp +++ lldb/trunk/source/Target/ThreadPlan.cpp @@ -13,12 +13,12 @@ // Project includes #include "lldb/Target/ThreadPlan.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanBase.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanBase.cpp +++ lldb/trunk/source/Target/ThreadPlanBase.cpp @@ -18,10 +18,10 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointSite.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp +++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp @@ -15,7 +15,6 @@ #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/ABI.h" @@ -26,6 +25,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanCallFunctionUsingABI.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanCallFunctionUsingABI.cpp +++ lldb/trunk/source/Target/ThreadPlanCallFunctionUsingABI.cpp @@ -13,11 +13,11 @@ // Project includes #include "lldb/Target/ThreadPlanCallFunctionUsingABI.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanCallUserExpression.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanCallUserExpression.cpp +++ lldb/trunk/source/Target/ThreadPlanCallUserExpression.cpp @@ -17,7 +17,6 @@ #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/Address.h" -#include "lldb/Core/Log.h" #include "lldb/Expression/DiagnosticManager.h" #include "lldb/Expression/IRDynamicChecks.h" #include "lldb/Expression/UserExpression.h" @@ -29,6 +28,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanPython.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanPython.cpp +++ lldb/trunk/source/Target/ThreadPlanPython.cpp @@ -14,7 +14,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/State.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" @@ -24,6 +23,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanPython.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp +++ lldb/trunk/source/Target/ThreadPlanRunToAddress.cpp @@ -12,11 +12,11 @@ // Other libraries and framework includes // Project includes #include "lldb/Target/ThreadPlanRunToAddress.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp +++ lldb/trunk/source/Target/ThreadPlanShouldStopHere.cpp @@ -11,11 +11,11 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Target/Thread.h" -#include "lldb/Core/Log.h" +#include "lldb/Target/ThreadPlanShouldStopHere.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/RegisterContext.h" -#include "lldb/Target/ThreadPlanShouldStopHere.h" +#include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanStepInRange.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepInRange.cpp +++ lldb/trunk/source/Target/ThreadPlanStepInRange.cpp @@ -12,7 +12,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Target/ThreadPlanStepInRange.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" @@ -22,6 +21,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanStepOut.h" #include "lldb/Target/ThreadPlanStepThrough.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" Index: lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp +++ lldb/trunk/source/Target/ThreadPlanStepInstruction.cpp @@ -12,12 +12,12 @@ // Other libraries and framework includes // Project includes #include "lldb/Target/ThreadPlanStepInstruction.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanStepOut.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepOut.cpp +++ lldb/trunk/source/Target/ThreadPlanStepOut.cpp @@ -13,7 +13,6 @@ // Project includes #include "lldb/Target/ThreadPlanStepOut.h" #include "lldb/Breakpoint/Breakpoint.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Value.h" #include "lldb/Core/ValueObjectConstResult.h" #include "lldb/Symbol/Block.h" @@ -27,6 +26,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlanStepOverRange.h" #include "lldb/Target/ThreadPlanStepThrough.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp +++ lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp @@ -13,9 +13,9 @@ // C++ Includes // Other libraries and framework includes // Project includes -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp +++ lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp @@ -12,7 +12,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Target/ThreadPlanStepOverRange.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/Block.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" @@ -23,6 +22,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanStepOut.h" #include "lldb/Target/ThreadPlanStepThrough.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanStepRange.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepRange.cpp +++ lldb/trunk/source/Target/ThreadPlanStepRange.cpp @@ -15,7 +15,6 @@ #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Breakpoint/BreakpointSite.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Symbol/Function.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Target/ExecutionContext.h" @@ -25,6 +24,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlanRunToAddress.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanStepThrough.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepThrough.cpp +++ lldb/trunk/source/Target/ThreadPlanStepThrough.cpp @@ -13,12 +13,12 @@ // Project includes #include "lldb/Target/ThreadPlanStepThrough.h" #include "lldb/Breakpoint/Breakpoint.h" -#include "lldb/Core/Log.h" #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" using namespace lldb; Index: lldb/trunk/source/Target/ThreadPlanStepUntil.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanStepUntil.cpp +++ lldb/trunk/source/Target/ThreadPlanStepUntil.cpp @@ -13,11 +13,11 @@ // Project includes #include "lldb/Target/ThreadPlanStepUntil.h" #include "lldb/Breakpoint/Breakpoint.h" -#include "lldb/Core/Log.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/StopInfo.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Target/ThreadPlanTracer.cpp =================================================================== --- lldb/trunk/source/Target/ThreadPlanTracer.cpp +++ lldb/trunk/source/Target/ThreadPlanTracer.cpp @@ -18,7 +18,6 @@ #include "lldb/Core/DataExtractor.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Disassembler.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/State.h" #include "lldb/Core/StreamFile.h" @@ -32,6 +31,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadPlan.h" +#include "lldb/Utility/Log.h" using namespace lldb; using namespace lldb_private; Index: lldb/trunk/source/Utility/CMakeLists.txt =================================================================== --- lldb/trunk/source/Utility/CMakeLists.txt +++ lldb/trunk/source/Utility/CMakeLists.txt @@ -3,6 +3,8 @@ Error.cpp JSON.cpp LLDBAssert.cpp + Log.cpp + Logging.cpp NameMatches.cpp Range.cpp RegularExpression.cpp Index: lldb/trunk/source/Utility/Log.cpp =================================================================== --- lldb/trunk/source/Utility/Log.cpp +++ lldb/trunk/source/Utility/Log.cpp @@ -0,0 +1,346 @@ +//===-- Log.cpp -------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// Project includes +#include "lldb/Utility/Log.h" + +#include "lldb/Utility/NameMatches.h" +#include "lldb/Utility/StreamString.h" +#include "lldb/Utility/VASPrintf.h" + +// Other libraries and framework includes +#include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/Support/Chrono.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/Path.h" +#include "llvm/Support/Signals.h" +#include "llvm/Support/Threading.h" +#include "llvm/Support/raw_ostream.h" + +// C Includes +// C++ Includes +#include +#include +#include +#include +#include +#include + +using namespace lldb; +using namespace lldb_private; + +namespace { + struct ChannelAndLog { + Log log; + Log::Channel &channel; + + ChannelAndLog(Log::Channel &channel) : channel(channel) {} + }; + typedef llvm::StringMap ChannelMap; +} + +static llvm::ManagedStatic g_channel_map; + +static void ListCategories(Stream &stream, const ChannelMap::value_type &entry) { + stream.Format("Logging categories for '{0}':\n", entry.first()); + stream.Format(" all - all available logging categories\n"); + stream.Format(" default - default set of logging categories\n"); + for (const auto &category : entry.second.channel.categories) + stream.Format(" {0} - {1}\n", category.name, category.description); +} + +static uint32_t GetFlags(Stream &stream, const ChannelMap::value_type &entry, + llvm::ArrayRef categories) { + bool list_categories = false; + uint32_t flags = 0; + for (const char *category : categories) { + if (llvm::StringRef("all").equals_lower(category)) { + flags |= UINT32_MAX; + continue; + } + if (llvm::StringRef("default").equals_lower(category)) { + flags |= entry.second.channel.default_flags; + continue; + } + auto cat = llvm::find_if( + entry.second.channel.categories, + [&](const Log::Category &c) { return c.name.equals_lower(category); }); + if (cat != entry.second.channel.categories.end()) { + flags |= cat->flag; + continue; + } + stream.Format("error: unrecognized log category '{0}'\n", category); + list_categories = true; + } + if (list_categories) + ListCategories(stream, entry); + return flags; +} + +void Log::Channel::Enable(Log &log, + const std::shared_ptr &stream_sp, + uint32_t options, uint32_t flags) { + log.GetMask().Set(flags); + if (log.GetMask().Get()) { + log.GetOptions().Set(options); + log.SetStream(stream_sp); + log_ptr.store(&log, std::memory_order_release); + } +} + +void Log::Channel::Disable(uint32_t flags) { + Log *log = log_ptr.load(std::memory_order_acquire); + if (!log) + return; + log->GetMask().Clear(flags); + if (!log->GetMask().Get()) { + log->SetStream(nullptr); + log_ptr.store(nullptr, std::memory_order_release); + } +} + +Log::Log() : m_stream_sp(), m_options(0), m_mask_bits(0) {} + +Log::Log(const std::shared_ptr &stream_sp) + : m_stream_sp(stream_sp), m_options(0), m_mask_bits(0) {} + +Log::~Log() = default; + +Flags &Log::GetOptions() { return m_options; } + +const Flags &Log::GetOptions() const { return m_options; } + +Flags &Log::GetMask() { return m_mask_bits; } + +const Flags &Log::GetMask() const { return m_mask_bits; } + +void Log::PutCString(const char *cstr) { Printf("%s", cstr); } +void Log::PutString(llvm::StringRef str) { PutCString(str.str().c_str()); } + +//---------------------------------------------------------------------- +// Simple variable argument logging with flags. +//---------------------------------------------------------------------- +void Log::Printf(const char *format, ...) { + va_list args; + va_start(args, format); + VAPrintf(format, args); + va_end(args); +} + +//---------------------------------------------------------------------- +// All logging eventually boils down to this function call. If we have +// a callback registered, then we call the logging callback. If we have +// a valid file handle, we also log to the file. +//---------------------------------------------------------------------- +void Log::VAPrintf(const char *format, va_list args) { + llvm::SmallString<64> FinalMessage; + llvm::raw_svector_ostream Stream(FinalMessage); + WriteHeader(Stream, "", ""); + + llvm::SmallString<64> Content; + lldb_private::VASprintf(Content, format, args); + + Stream << Content << "\n"; + + WriteMessage(FinalMessage.str()); +} + +//---------------------------------------------------------------------- +// Log only if all of the bits are set +//---------------------------------------------------------------------- +void Log::LogIf(uint32_t bits, const char *format, ...) { + if (!m_options.AllSet(bits)) + return; + + va_list args; + va_start(args, format); + VAPrintf(format, args); + va_end(args); +} + +//---------------------------------------------------------------------- +// Printing of errors that are not fatal. +//---------------------------------------------------------------------- +void Log::Error(const char *format, ...) { + va_list args; + va_start(args, format); + VAError(format, args); + va_end(args); +} + +void Log::VAError(const char *format, va_list args) { + llvm::SmallString<64> Content; + VASprintf(Content, format, args); + + Printf("error: %s", Content.c_str()); +} + +//---------------------------------------------------------------------- +// Printing of warnings that are not fatal only if verbose mode is +// enabled. +//---------------------------------------------------------------------- +void Log::Verbose(const char *format, ...) { + if (!m_options.Test(LLDB_LOG_OPTION_VERBOSE)) + return; + + va_list args; + va_start(args, format); + VAPrintf(format, args); + va_end(args); +} + +//---------------------------------------------------------------------- +// Printing of warnings that are not fatal. +//---------------------------------------------------------------------- +void Log::Warning(const char *format, ...) { + llvm::SmallString<64> Content; + va_list args; + va_start(args, format); + VASprintf(Content, format, args); + va_end(args); + + Printf("warning: %s", Content.c_str()); +} + +void Log::Register(llvm::StringRef name, Channel &channel) { + auto iter = g_channel_map->try_emplace(name, channel); + assert(iter.second == true); + (void)iter; +} + +void Log::Unregister(llvm::StringRef name) { + auto iter = g_channel_map->find(name); + assert(iter != g_channel_map->end()); + iter->second.channel.Disable(UINT32_MAX); + g_channel_map->erase(iter); +} + +bool Log::EnableLogChannel( + const std::shared_ptr &log_stream_sp, + uint32_t log_options, llvm::StringRef channel, + llvm::ArrayRef categories, Stream &error_stream) { + auto iter = g_channel_map->find(channel); + if (iter == g_channel_map->end()) { + error_stream.Format("Invalid log channel '{0}'.\n", channel); + return false; + } + uint32_t flags = categories.empty() + ? iter->second.channel.default_flags + : GetFlags(error_stream, *iter, categories); + iter->second.channel.Enable(iter->second.log, log_stream_sp, log_options, + flags); + return true; +} + +bool Log::DisableLogChannel(llvm::StringRef channel, + llvm::ArrayRef categories, + Stream &error_stream) { + auto iter = g_channel_map->find(channel); + if (iter == g_channel_map->end()) { + error_stream.Format("Invalid log channel '{0}'.\n", channel); + return false; + } + uint32_t flags = categories.empty() + ? UINT32_MAX + : GetFlags(error_stream, *iter, categories); + iter->second.channel.Disable(flags); + return true; +} + +bool Log::ListChannelCategories(llvm::StringRef channel, Stream &stream) { + auto ch = g_channel_map->find(channel); + if (ch == g_channel_map->end()) { + stream.Format("Invalid log channel '{0}'.\n", channel); + return false; + } + ListCategories(stream, *ch); + return true; +} + +void Log::DisableAllLogChannels(Stream *feedback_strm) { + for (auto &entry : *g_channel_map) + entry.second.channel.Disable(UINT32_MAX); +} + +void Log::ListAllLogChannels(Stream *strm) { + if (g_channel_map->empty()) { + strm->PutCString("No logging channels are currently registered.\n"); + return; + } + + for (const auto &channel : *g_channel_map) + ListCategories(*strm, channel); +} +bool Log::GetVerbose() const { return m_options.Test(LLDB_LOG_OPTION_VERBOSE); } + +void Log::WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file, + llvm::StringRef function) { + static uint32_t g_sequence_id = 0; + // Add a sequence ID if requested + if (m_options.Test(LLDB_LOG_OPTION_PREPEND_SEQUENCE)) + OS << ++g_sequence_id << " "; + + // Timestamp if requested + if (m_options.Test(LLDB_LOG_OPTION_PREPEND_TIMESTAMP)) { + auto now = std::chrono::duration( + std::chrono::system_clock::now().time_since_epoch()); + OS << llvm::formatv("{0:f9} ", now.count()); + } + + // Add the process and thread if requested + if (m_options.Test(LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD)) + OS << llvm::formatv("[{0,0+4}/{1,0+4}] ", getpid(), + llvm::get_threadid()); + + // Add the thread name if requested + if (m_options.Test(LLDB_LOG_OPTION_PREPEND_THREAD_NAME)) { + llvm::SmallString<32> thread_name; + llvm::get_thread_name(thread_name); + if (!thread_name.empty()) + OS << thread_name; + } + + if (m_options.Test(LLDB_LOG_OPTION_BACKTRACE)) + llvm::sys::PrintStackTrace(OS); + + if (m_options.Test(LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION) && + (!file.empty() || !function.empty())) { + file = llvm::sys::path::filename(file).take_front(40); + function = function.take_front(40); + OS << llvm::formatv("{0,-60:60} ", (file + ":" + function).str()); + } +} + +void Log::WriteMessage(const std::string &message) { + // Make a copy of our stream shared pointer in case someone disables our + // log while we are logging and releases the stream + auto stream_sp = GetStream(); + if (!stream_sp) + return; + + if (m_options.Test(LLDB_LOG_OPTION_THREADSAFE)) { + static std::recursive_mutex g_LogThreadedMutex; + std::lock_guard guard(g_LogThreadedMutex); + *stream_sp << message; + stream_sp->flush(); + } else { + *stream_sp << message; + stream_sp->flush(); + } +} + +void Log::Format(llvm::StringRef file, llvm::StringRef function, + const llvm::formatv_object_base &payload) { + std::string message_string; + llvm::raw_string_ostream message(message_string); + WriteHeader(message, file, function); + message << payload << "\n"; + WriteMessage(message.str()); +} Index: lldb/trunk/source/Utility/Logging.cpp =================================================================== --- lldb/trunk/source/Utility/Logging.cpp +++ lldb/trunk/source/Utility/Logging.cpp @@ -0,0 +1,78 @@ +//===-- Logging.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/Utility/Logging.h" + +// C Includes +// C++ Includes +#include +#include + +// Other libraries and framework includes +// Project includes +#include "lldb/Utility/Log.h" + +using namespace lldb; +using namespace lldb_private; + +static constexpr Log::Category g_categories[] = { + {{"api"}, {"log API calls and return values"}, LIBLLDB_LOG_API}, + {{"break"}, {"log breakpoints"}, LIBLLDB_LOG_BREAKPOINTS}, + {{"commands"}, {"log command argument parsing"}, LIBLLDB_LOG_COMMANDS}, + {{"comm"}, {"log communication activities"}, LIBLLDB_LOG_COMMUNICATION}, + {{"conn"}, {"log connection details"}, LIBLLDB_LOG_CONNECTION}, + {{"demangle"}, {"log mangled names to catch demangler crashes"}, LIBLLDB_LOG_DEMANGLE}, + {{"dyld"}, {"log shared library related activities"}, LIBLLDB_LOG_DYNAMIC_LOADER}, + {{"event"}, {"log broadcaster, listener and event queue activities"}, LIBLLDB_LOG_EVENTS}, + {{"expr"}, {"log expressions"}, LIBLLDB_LOG_EXPRESSIONS}, + {{"formatters"}, {"log data formatters related activities"}, LIBLLDB_LOG_DATAFORMATTERS}, + {{"host"}, {"log host activities"}, LIBLLDB_LOG_HOST}, + {{"jit"}, {"log JIT events in the target"}, LIBLLDB_LOG_JIT_LOADER}, + {{"language"}, {"log language runtime events"}, LIBLLDB_LOG_LANGUAGE}, + {{"mmap"}, {"log mmap related activities"}, LIBLLDB_LOG_MMAP}, + {{"module"}, {"log module activities such as when modules are created, destroyed, replaced, and more"}, LIBLLDB_LOG_MODULES}, + {{"object"}, {"log object construction/destruction for important objects"}, LIBLLDB_LOG_OBJECT}, + {{"os"}, {"log OperatingSystem plugin related activities"}, LIBLLDB_LOG_OS}, + {{"platform"}, {"log platform events and activities"}, LIBLLDB_LOG_PLATFORM}, + {{"process"}, {"log process events and activities"}, LIBLLDB_LOG_PROCESS}, + {{"script"}, {"log events about the script interpreter"}, LIBLLDB_LOG_SCRIPT}, + {{"state"}, {"log private and public process state changes"}, LIBLLDB_LOG_STATE}, + {{"step"}, {"log step related activities"}, LIBLLDB_LOG_STEP}, + {{"symbol"}, {"log symbol related issues and warnings"}, LIBLLDB_LOG_SYMBOLS}, + {{"system-runtime"}, {"log system runtime events"}, LIBLLDB_LOG_SYSTEM_RUNTIME}, + {{"target"}, {"log target events and activities"}, LIBLLDB_LOG_TARGET}, + {{"thread"}, {"log thread events and activities"}, LIBLLDB_LOG_THREAD}, + {{"types"}, {"log type system related activities"}, LIBLLDB_LOG_TYPES}, + {{"unwind"}, {"log stack unwind activities"}, LIBLLDB_LOG_UNWIND}, + {{"watch"}, {"log watchpoint related activities"}, LIBLLDB_LOG_WATCHPOINTS}, +}; + +static Log::Channel g_log_channel(g_categories, LIBLLDB_LOG_DEFAULT); + +void lldb_private::InitializeLog() { + Log::Register("lldb", g_log_channel); +} + +Log *lldb_private::GetLogIfAllCategoriesSet(uint32_t mask) { + return g_log_channel.GetLogIfAll(mask); +} + +Log *lldb_private::GetLogIfAnyCategoriesSet(uint32_t mask) { + return g_log_channel.GetLogIfAny(mask); +} + + +void lldb_private::LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...) { + if (Log *log = GetLogIfAnyCategoriesSet(mask)) { + va_list args; + va_start(args, format); + log->VAPrintf(format, args); + va_end(args); + } +} Index: lldb/trunk/tools/lldb-server/LLDBServerUtilities.cpp =================================================================== --- lldb/trunk/tools/lldb-server/LLDBServerUtilities.cpp +++ lldb/trunk/tools/lldb-server/LLDBServerUtilities.cpp @@ -9,9 +9,9 @@ #include "LLDBServerUtilities.h" -#include "lldb/Core/Log.h" #include "lldb/Core/StreamFile.h" #include "lldb/Interpreter/Args.h" +#include "lldb/Utility/Log.h" #include "lldb/Utility/StreamString.h" #include "llvm/ADT/SmallVector.h" Index: lldb/trunk/unittests/Core/CMakeLists.txt =================================================================== --- lldb/trunk/unittests/Core/CMakeLists.txt +++ lldb/trunk/unittests/Core/CMakeLists.txt @@ -3,7 +3,6 @@ BroadcasterTest.cpp DataExtractorTest.cpp ListenerTest.cpp - LogTest.cpp ScalarTest.cpp StateTest.cpp StreamCallbackTest.cpp Index: lldb/trunk/unittests/Core/LogTest.cpp =================================================================== --- lldb/trunk/unittests/Core/LogTest.cpp +++ lldb/trunk/unittests/Core/LogTest.cpp @@ -1,212 +0,0 @@ -//===-- 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 "gtest/gtest.h" - -#include "lldb/Core/Log.h" -#include "lldb/Host/Host.h" -#include "lldb/Utility/StreamString.h" -#include "llvm/Support/ManagedStatic.h" -#include - -using namespace lldb; -using namespace lldb_private; - -enum { FOO = 1, BAR = 2 }; -static constexpr Log::Category test_categories[] = { - {{"foo"}, {"log foo"}, FOO}, {{"bar"}, {"log bar"}, BAR}, -}; -static constexpr uint32_t default_flags = FOO; - -static Log::Channel test_channel(test_categories, default_flags); - -struct LogChannelTest : public ::testing::Test { - void TearDown() override { Log::DisableAllLogChannels(nullptr); } - - static void SetUpTestCase() { - Log::Register("chan", test_channel); - } - - static void TearDownTestCase() { - Log::Unregister("chan"); - llvm::llvm_shutdown(); - } -}; - -static std::string GetLogString(uint32_t log_options, const char *format, - int arg) { - std::string stream_string; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(stream_string)); - Log log_(stream_sp); - log_.GetOptions().Reset(log_options); - Log *log = &log_; - LLDB_LOG(log, format, arg); - return stream_sp->str(); -} - -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,0+4}/{1,0+4}] Hello World 47\n", - Host::GetCurrentProcessID(), - Host::GetCurrentThreadID()) - .str(), - GetLogString(LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD, - "Hello World {0}", 47)); -} - -TEST(LogTest, Register) { - llvm::llvm_shutdown_obj obj; - Log::Register("chan", test_channel); - Log::Unregister("chan"); - Log::Register("chan", test_channel); - Log::Unregister("chan"); -} - -TEST(LogTest, Unregister) { - llvm::llvm_shutdown_obj obj; - Log::Register("chan", test_channel); - EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO)); - const char *cat1[] = {"foo"}; - std::string message; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(message)); - StreamString err; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat1, err)); - EXPECT_NE(nullptr, test_channel.GetLogIfAny(FOO)); - Log::Unregister("chan"); - EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO)); -} - -TEST_F(LogChannelTest, Enable) { - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); - std::string message; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(message)); - StreamString err; - EXPECT_FALSE(Log::EnableLogChannel(stream_sp, 0, "chanchan", {}, err)); - EXPECT_EQ("Invalid log channel 'chanchan'.\n", err.GetString()); - err.Clear(); - - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", {}, err)); - EXPECT_EQ("", err.GetString()) << "err: " << err.GetString().str(); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); - - const char *cat2[] = {"bar"}; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat2, err)); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); - - const char *cat3[] = {"baz"}; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat3, err)); - EXPECT_TRUE(err.GetString().contains("unrecognized log category 'baz'")) - << "err: " << err.GetString().str(); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); -} - -TEST_F(LogChannelTest, EnableOptions) { - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); - std::string message; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(message)); - StreamString err; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, LLDB_LOG_OPTION_VERBOSE, "chan", - {}, err)); - - Log *log = test_channel.GetLogIfAll(FOO); - ASSERT_NE(nullptr, log); - EXPECT_TRUE(log->GetVerbose()); -} - -TEST_F(LogChannelTest, Disable) { - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); - const char *cat12[] = {"foo", "bar"}; - std::string message; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(message)); - StreamString err; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat12, err)); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); - - const char *cat2[] = {"bar"}; - EXPECT_TRUE(Log::DisableLogChannel("chan", cat2, err)); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); - - const char *cat3[] = {"baz"}; - EXPECT_TRUE(Log::DisableLogChannel("chan", cat3, err)); - EXPECT_TRUE(err.GetString().contains("unrecognized log category 'baz'")) - << "err: " << err.GetString().str(); - EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); - EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); - err.Clear(); - - EXPECT_TRUE(Log::DisableLogChannel("chan", {}, err)); - EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO | BAR)); -} - -TEST_F(LogChannelTest, List) { - StreamString str; - EXPECT_TRUE(Log::ListChannelCategories("chan", str)); - std::string expected = - R"(Logging categories for 'chan': - all - all available logging categories - default - default set of logging categories - foo - log foo - bar - log bar -)"; - EXPECT_EQ(expected, str.GetString().str()); - str.Clear(); - - EXPECT_FALSE(Log::ListChannelCategories("chanchan", str)); - EXPECT_EQ("Invalid log channel 'chanchan'.\n", str.GetString().str()); -} - -TEST_F(LogChannelTest, LogThread) { - // Test that we are able to concurrently write to a log channel and disable - // it. - std::string message; - std::shared_ptr stream_sp( - new llvm::raw_string_ostream(message)); - StreamString err; - EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", {}, err)); - - Log *log = test_channel.GetLogIfAll(FOO); - - // Start logging on one thread. Concurrently, try disabling the log channel. - std::thread log_thread([log] { LLDB_LOG(log, "Hello World"); }); - EXPECT_TRUE(Log::DisableLogChannel("chan", {}, err)); - log_thread.join(); - - // The log thread either managed to write to the log in time, or it didn't. In - // either case, we should not trip any undefined behavior (run the test under - // TSAN to verify this). - EXPECT_TRUE(stream_sp->str() == "" || stream_sp->str() == "Hello World\n") - << "str(): " << stream_sp->str(); -} Index: lldb/trunk/unittests/Utility/CMakeLists.txt =================================================================== --- lldb/trunk/unittests/Utility/CMakeLists.txt +++ lldb/trunk/unittests/Utility/CMakeLists.txt @@ -1,6 +1,7 @@ add_lldb_unittest(UtilityTests ConstStringTest.cpp ErrorTest.cpp + LogTest.cpp NameMatchesTest.cpp StringExtractorTest.cpp TaskPoolTest.cpp Index: lldb/trunk/unittests/Utility/LogTest.cpp =================================================================== --- lldb/trunk/unittests/Utility/LogTest.cpp +++ lldb/trunk/unittests/Utility/LogTest.cpp @@ -0,0 +1,212 @@ +//===-- 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 "gtest/gtest.h" + +#include "lldb/Utility/Log.h" +#include "lldb/Utility/StreamString.h" +#include "llvm/Support/ManagedStatic.h" +#include "llvm/Support/Threading.h" +#include + +using namespace lldb; +using namespace lldb_private; + +enum { FOO = 1, BAR = 2 }; +static constexpr Log::Category test_categories[] = { + {{"foo"}, {"log foo"}, FOO}, {{"bar"}, {"log bar"}, BAR}, +}; +static constexpr uint32_t default_flags = FOO; + +static Log::Channel test_channel(test_categories, default_flags); + +struct LogChannelTest : public ::testing::Test { + void TearDown() override { Log::DisableAllLogChannels(nullptr); } + + static void SetUpTestCase() { + Log::Register("chan", test_channel); + } + + static void TearDownTestCase() { + Log::Unregister("chan"); + llvm::llvm_shutdown(); + } +}; + +static std::string GetLogString(uint32_t log_options, const char *format, + int arg) { + std::string stream_string; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(stream_string)); + Log log_(stream_sp); + log_.GetOptions().Reset(log_options); + Log *log = &log_; + LLDB_LOG(log, format, arg); + return stream_sp->str(); +} + +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,0+4}/{1,0+4}] Hello World 47\n", + ::getpid(), + llvm::get_threadid_np()) + .str(), + GetLogString(LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD, + "Hello World {0}", 47)); +} + +TEST(LogTest, Register) { + llvm::llvm_shutdown_obj obj; + Log::Register("chan", test_channel); + Log::Unregister("chan"); + Log::Register("chan", test_channel); + Log::Unregister("chan"); +} + +TEST(LogTest, Unregister) { + llvm::llvm_shutdown_obj obj; + Log::Register("chan", test_channel); + EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO)); + const char *cat1[] = {"foo"}; + std::string message; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(message)); + StreamString err; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat1, err)); + EXPECT_NE(nullptr, test_channel.GetLogIfAny(FOO)); + Log::Unregister("chan"); + EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO)); +} + +TEST_F(LogChannelTest, Enable) { + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); + std::string message; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(message)); + StreamString err; + EXPECT_FALSE(Log::EnableLogChannel(stream_sp, 0, "chanchan", {}, err)); + EXPECT_EQ("Invalid log channel 'chanchan'.\n", err.GetString()); + err.Clear(); + + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", {}, err)); + EXPECT_EQ("", err.GetString()) << "err: " << err.GetString().str(); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); + + const char *cat2[] = {"bar"}; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat2, err)); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); + + const char *cat3[] = {"baz"}; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat3, err)); + EXPECT_TRUE(err.GetString().contains("unrecognized log category 'baz'")) + << "err: " << err.GetString().str(); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); +} + +TEST_F(LogChannelTest, EnableOptions) { + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); + std::string message; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(message)); + StreamString err; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, LLDB_LOG_OPTION_VERBOSE, "chan", + {}, err)); + + Log *log = test_channel.GetLogIfAll(FOO); + ASSERT_NE(nullptr, log); + EXPECT_TRUE(log->GetVerbose()); +} + +TEST_F(LogChannelTest, Disable) { + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(FOO)); + const char *cat12[] = {"foo", "bar"}; + std::string message; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(message)); + StreamString err; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", cat12, err)); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO | BAR)); + + const char *cat2[] = {"bar"}; + EXPECT_TRUE(Log::DisableLogChannel("chan", cat2, err)); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); + + const char *cat3[] = {"baz"}; + EXPECT_TRUE(Log::DisableLogChannel("chan", cat3, err)); + EXPECT_TRUE(err.GetString().contains("unrecognized log category 'baz'")) + << "err: " << err.GetString().str(); + EXPECT_NE(nullptr, test_channel.GetLogIfAll(FOO)); + EXPECT_EQ(nullptr, test_channel.GetLogIfAll(BAR)); + err.Clear(); + + EXPECT_TRUE(Log::DisableLogChannel("chan", {}, err)); + EXPECT_EQ(nullptr, test_channel.GetLogIfAny(FOO | BAR)); +} + +TEST_F(LogChannelTest, List) { + StreamString str; + EXPECT_TRUE(Log::ListChannelCategories("chan", str)); + std::string expected = + R"(Logging categories for 'chan': + all - all available logging categories + default - default set of logging categories + foo - log foo + bar - log bar +)"; + EXPECT_EQ(expected, str.GetString().str()); + str.Clear(); + + EXPECT_FALSE(Log::ListChannelCategories("chanchan", str)); + EXPECT_EQ("Invalid log channel 'chanchan'.\n", str.GetString().str()); +} + +TEST_F(LogChannelTest, LogThread) { + // Test that we are able to concurrently write to a log channel and disable + // it. + std::string message; + std::shared_ptr stream_sp( + new llvm::raw_string_ostream(message)); + StreamString err; + EXPECT_TRUE(Log::EnableLogChannel(stream_sp, 0, "chan", {}, err)); + + Log *log = test_channel.GetLogIfAll(FOO); + + // Start logging on one thread. Concurrently, try disabling the log channel. + std::thread log_thread([log] { LLDB_LOG(log, "Hello World"); }); + EXPECT_TRUE(Log::DisableLogChannel("chan", {}, err)); + log_thread.join(); + + // The log thread either managed to write to the log in time, or it didn't. In + // either case, we should not trip any undefined behavior (run the test under + // TSAN to verify this). + EXPECT_TRUE(stream_sp->str() == "" || stream_sp->str() == "Hello World\n") + << "str(): " << stream_sp->str(); +}