LLDB  mainline
Classes | Namespaces | Macros
Log.h File Reference
#include "lldb/Utility/Flags.h"
#include "lldb/Utility/Logging.h"
#include "lldb/lldb-defines.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/RWMutex.h"
#include <atomic>
#include <cstdarg>
#include <cstdint>
#include <memory>
#include <string>
#include <type_traits>
Include dependency graph for Log.h:

Go to the source code of this file.

Classes

class  lldb_private::Log
 
struct  lldb_private::Log::Category
 
class  lldb_private::Log::Channel
 

Namespaces

 llvm
 
 lldb_private
 Enumerations for broadcasting.
 

Macros

#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)
 
#define LLDB_LOG(log, ...)
 
#define LLDB_LOGV(log, ...)
 
#define LLDB_LOG_ERROR(log, error, ...)
 

Macro Definition Documentation

◆ LLDB_LOG

#define LLDB_LOG (   log,
  ... 
)
Value:
do { \
::lldb_private::Log *log_private = (log); \
if (log_private) \
log_private->Format(__FILE__, __func__, __VA_ARGS__); \
} while (0)
void Format(llvm::StringRef file, llvm::StringRef function, const char *format, Args &&... args)
Definition: Log.h:131

Definition at line 209 of file Log.h.

Referenced by AddPosixSpawnFileAction(), lldb_private::breakpad::SymbolFileBreakpad::AddSymbols(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Attach(), lldb_private::process_linux::NativeProcessLinux::Factory::Attach(), lldb_private::Target::Attach(), lldb_private::ConnectionFileDescriptor::BytesAvailable(), lldb_private::RegisterContextWindows::CacheAllRegisterValues(), lldb_private::CallEdge::CallEdge(), lldb_private::ClangExpressionParser::ClangExpressionParser(), CollectCallEdges(), lldb_private::DebuggerThread::ContinueAsyncException(), lldb_private::process_linux::ProcessorTraceMonitor::Create(), lldb_private::platform_freebsd::PlatformFreeBSD::CreateInstance(), lldb_private::platform_linux::PlatformLinux::CreateInstance(), lldb_private::platform_netbsd::PlatformNetBSD::CreateInstance(), lldb_private::platform_openbsd::PlatformOpenBSD::CreateInstance(), lldb_private::TargetThreadWindows::CreateRegisterContextForFrame(), lldb_private::DebuggerThread::DebugAttach(), lldb_private::DebuggerThread::DebugLaunch(), lldb_private::platform_netbsd::PlatformNetBSD::DebugProcess(), lldb_private::platform_linux::PlatformLinux::DebugProcess(), lldb_private::ProcessWindows::DisableBreakpointSite(), lldb_private::ProcessWindows::DoAllocateMemory(), lldb_private::ProcessWindows::DoAttachToProcessWithID(), lldb_private::ProcessWindows::DoDeallocateMemory(), lldb_private::ProcessWindows::DoDestroy(), lldb_private::ProcessWindows::DoDetach(), lldb_private::ProcessWindows::DoHalt(), lldb_private::ProcessWindows::DoLaunch(), lldb_private::ProcessWindows::DoReadMemory(), lldb_private::process_linux::NativeRegisterContextLinux::DoReadRegisterValue(), lldb_private::ProcessWindows::DoResume(), lldb_private::process_linux::NativeProcessLinux::DoStopIDBumped(), lldb_private::ProcessWindows::DoWriteMemory(), lldb_private::process_linux::NativeRegisterContextLinux::DoWriteRegisterValue(), lldb_private::ProcessWindows::EnableBreakpointSite(), lldb_private::UserExpression::Evaluate(), lldb_private::EmulateInstructionPPC64::EvaluateInstruction(), ResumeOperation::Execute(), lldb_private::CPlusPlusLanguage::ExtractContextAndIdentifier(), lldb_private::BreakpointResolverFileLine::FilterContexts(), FindInterveningFrames(), lldb_private::NativeProcessProtocol::FixupBreakpointPCAsNeeded(), lldb_private::RichManglingContext::FromItaniumName(), lldb_private::Function::GetCallEdges(), lldb_private::process_linux::ProcessorTraceMonitor::GetCPUType(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetCurrentThreadID(), lldb_private::process_linux::NativeProcessLinux::GetData(), GetELFProcessCPUType(), lldb_private::Process::GetEventsPrivate(), lldb_private::process_netbsd::NativeProcessNetBSD::GetFileLoadAddress(), lldb_private::HostInfoBase::GetGlobalTempDir(), lldb_private::NativeProcessProtocol::GetHardwareDebugSupportInfo(), lldb_private::HostInfoBase::GetHeaderDir(), GetMacOSXProcessUserAndGroup(), lldb_private::process_netbsd::NativeProcessNetBSD::GetMemoryRegionInfo(), lldb_private::process_linux::NativeProcessLinux::GetMemoryRegionInfo(), lldb_private::ProcessWindows::GetMemoryRegionInfo(), lldb_private::process_linux::NativeProcessLinux::GetMetaData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationReplayServer::GetPacketAndSendResponse(), GetPermissions(), GetProcessAndStatInfo(), lldb_private::HostInfoBase::GetProcessTempDir(), lldb_private::getProcFile(), lldb_private::HostInfoBase::GetShlibDir(), lldb_private::Process::GetStateChangedEvents(), lldb_private::Process::GetStateChangedEventsPrivate(), lldb_private::process_netbsd::NativeThreadNetBSD::GetStopReason(), lldb_private::HostInfoBase::GetSupportExeDir(), lldb_private::HostInfoBase::GetSystemPluginDir(), lldb_private::process_linux::NativeProcessLinux::GetThreadByID(), lldb_private::process_linux::ProcessorTraceMonitor::GetTraceConfig(), lldb_private::process_linux::NativeProcessLinux::GetTraceConfig(), lldb_private::HostInfoBase::GetUserPluginDir(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_A(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_C(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_c(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_interrupt(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jThreadsInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jTraceStart(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_k(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_M(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_p(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QRestoreRegisterState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qXfer_auxv_read(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCont(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_Z(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_z(), HandleStoppedEvent(), lldb_private::process_linux::NativeProcessLinux::Interrupt(), lldb_private::RichManglingContext::IsFunction(), lldb_private::process_netbsd::NativeProcessNetBSD::Kill(), lldb_private::process_linux::NativeProcessLinux::Kill(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Launch(), lldb_private::process_linux::NativeProcessLinux::Factory::Launch(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), LaunchProcessPosixSpawn(), LaunchProcessXPC(), DynamicLoaderPOSIXDYLD::LoadAllCurrentModules(), DynamicLoaderPOSIXDYLD::LoadInterpreterModule(), DynamicLoaderPOSIXDYLD::LoadVDSO(), lldb_private::Process::MapSupportedStructuredDataPlugins(), MonitorChildProcessThreadFunction(), lldb_private::process_netbsd::NativeThreadNetBSD::NativeThreadNetBSD(), lldb_private::ProcessLaunchInfo::NoOpMonitorCallback(), lldb_private::ProcessWindows::OnDebugException(), lldb_private::ProcessWindows::OnDebuggerConnected(), lldb_private::ProcessWindows::OnDebuggerError(), lldb_private::ProcessWindows::OnExitProcess(), lldb_private::Listener::PeekAtNextEventForBroadcasterWithType(), lldb_private::darwin_process_launcher::PosixSpawnChildForPTraceDebugging(), ProcessVmReadvSupported(), lldb_private::process_netbsd::NativeProcessNetBSD::PtraceWrapper(), lldb_private::process_linux::NativeProcessLinux::PtraceWrapper(), lldb_private::DynamicLoaderDarwin::ImageInfo::PutToLog(), DynamicLoaderDarwinKernel::KextImageInfo::PutToLog(), lldb_private::ConnectionFileDescriptor::Read(), lldb_private::Communication::Read(), lldb_private::process_linux::ProcessorTraceMonitor::ReadCyclicBuffer(), lldb_private::process_netbsd::NativeProcessNetBSD::ReadMemory(), lldb_private::process_linux::NativeProcessLinux::ReadMemory(), lldb_private::minidump::ProcessMinidump::ReadModuleList(), lldb_private::process_linux::ProcessorTraceMonitor::ReadPerfTraceAux(), lldb_private::process_linux::ProcessorTraceMonitor::ReadPerfTraceData(), lldb_private::RegisterContextWindows_x86::ReadRegister(), lldb_private::Communication::ReadThread(), lldb_private::repro::Recorder::Recorder(), lldb_private::ProcessWindows::RefreshStateAfterStop(), ProcessFreeBSD::RefreshStateAfterStop(), lldb_private::process_linux::NativeThreadLinux::RemoveHardwareBreakpoint(), lldb_private::NativeProcessProtocol::RemoveSoftwareBreakpoint(), lldb_private::repro::Registry::Replay(), lldb_private::process_netbsd::NativeProcessNetBSD::Resume(), lldb_private::process_linux::NativeProcessLinux::Resume(), lldb_private::Process::RunThreadPlan(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendGetTraceConfigPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendGetTraceDataPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendStartTracePacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReasonForState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendStopTracePacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendWResponse(), lldb_private::Target::SetArchitecture(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetContinueThreadID(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetCurrentThreadID(), lldb_private::Target::SetExecutableModule(), lldb_private::NativeProcessProtocol::SetExitStatus(), lldb_private::NativeProcessProtocol::SetHardwareBreakpoint(), DynamicLoaderPOSIXDYLD::SetRendezvousBreakpoint(), lldb_private::NativeProcessProtocol::SetSoftwareBreakpoint(), SetupModuleHeaderPaths(), lldb_private::ProcessLaunchInfo::SetUpPtyRedirection(), lldb_private::NativeProcessProtocol::SetWatchpoint(), lldb_private::Platform::SetWorkingDirectory(), lldb_private::ThreadList::ShouldReportStop(), lldb_private::ThreadPlan::ShouldReportStop(), lldb_private::process_linux::NativeProcessLinux::Signal(), lldb_private::process_linux::NativeProcessLinux::StartTrace(), lldb_private::DebuggerThread::StopDebugging(), lldb_private::process_linux::NativeProcessLinux::StopTrace(), SupportsCxxModuleImport(), lldb_private::Process::SyncIOHandler(), lldb_private::StackFrameList::SynthesizeTailCallFrames(), lldb_private::process_gdb_remote::ThreadGDBRemote::ThreadGDBRemote(), ThreadKDP::ThreadKDP(), lldb_private::ThreadPlanStepOut::ThreadPlanStepOut(), lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateAutomaticSignalFiltering(), lldb_private::ProcessWindows::UpdateThreadList(), lldb_private::Process::WaitForProcessToStop(), lldb_private::process_netbsd::NativeProcessNetBSD::WriteMemory(), lldb_private::process_linux::NativeProcessLinux::WriteMemory(), lldb_private::RegisterContextWindows_x86::WriteRegister(), IRForTarget::~IRForTarget(), lldb_private::process_gdb_remote::ThreadGDBRemote::~ThreadGDBRemote(), and ThreadKDP::~ThreadKDP().

◆ LLDB_LOG_ERROR

#define LLDB_LOG_ERROR (   log,
  error,
  ... 
)
Value:
do { \
::lldb_private::Log *log_private = (log); \
::llvm::Error error_private = (error); \
if (log_private && error_private) { \
log_private->FormatError(::std::move(error_private), __FILE__, __func__, \
__VA_ARGS__); \
} else \
::llvm::consumeError(::std::move(error_private)); \
} while (0)
llvm::Error Error

Definition at line 225 of file Log.h.

Referenced by lldb_private::Target::Attach(), lldb_private::DebugNamesDWARFIndex::Create(), SymbolFileDWARF::DebugAbbrev(), lldb_private::minidump::MinidumpParser::GetArchitecture(), lldb_private::minidump::MinidumpParser::GetFilteredModuleList(), SymbolFileDWARF::GetGlobalAranges(), lldb_private::minidump::MinidumpParser::GetModuleList(), ABISysV_ppc64::GetReturnValueObjectSimple(), SymbolFileDWARF::InitializeObject(), and sddarwinlog_private::ParseAutoEnableOptions().

◆ LLDB_LOG_OPTION_APPEND

#define LLDB_LOG_OPTION_APPEND   (1U << 8)

◆ LLDB_LOG_OPTION_BACKTRACE

#define LLDB_LOG_OPTION_BACKTRACE   (1U << 7)

◆ LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION

#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION   (1U << 9)

◆ LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD

#define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD   (1u << 5)

◆ LLDB_LOG_OPTION_PREPEND_SEQUENCE

#define LLDB_LOG_OPTION_PREPEND_SEQUENCE   (1u << 3)

◆ LLDB_LOG_OPTION_PREPEND_THREAD_NAME

#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME   (1U << 6)

◆ LLDB_LOG_OPTION_PREPEND_TIMESTAMP

#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP   (1u << 4)

◆ LLDB_LOG_OPTION_THREADSAFE

#define LLDB_LOG_OPTION_THREADSAFE   (1u << 0)

◆ LLDB_LOG_OPTION_VERBOSE

#define LLDB_LOG_OPTION_VERBOSE   (1u << 1)

◆ LLDB_LOGV

#define LLDB_LOGV (   log,
  ... 
)
Value:
do { \
::lldb_private::Log *log_private = (log); \
if (log_private && log_private->GetVerbose()) \
log_private->Format(__FILE__, __func__, __VA_ARGS__); \
} while (0)
void Format(llvm::StringRef file, llvm::StringRef function, const char *format, Args &&... args)
Definition: Log.h:131
bool GetVerbose() const
Definition: Log.cpp:250

Definition at line 216 of file Log.h.

Referenced by lldb_private::ClangExpressionParser::ClangExpressionParser(), lldb_private::DebuggerThread::ContinueAsyncException(), FreeBSDThread::CreateRegisterContextForFrame(), ProcessFreeBSD::DoAttachToProcessWithID(), lldb_private::AllocatedBlock::FreeBlock(), FreeBSDThread::FreeBSDThread(), PlatformRemoteDarwinDevice::GetDeviceSupportDirectoryForOSVersion(), lldb_private::FormatManager::GetFormat(), lldb_private::ClassDescriptorV2::GetInstanceSize(), lldb_private::ProcessWindows::GetMemoryRegionInfo(), PlatformRemoteDarwinDevice::GetSharedModule(), lldb_private::FormatManager::GetSummaryFormat(), lldb_private::FormatManager::GetSyntheticChildren(), lldb_private::FormatManager::GetValidator(), lldb_private::ScriptInterpreterPythonImpl::Locker::Locker(), lldb_private::StringList::LogDump(), lldb_private::lldb_renderscript::RSModuleDescriptor::ParseRSInfo(), ProcessVmReadvSupported(), ProcessFreeBSD::RefreshStateAfterStop(), lldb_private::AllocatedBlock::ReserveBlock(), lldb_private::SectionLoadList::SetSectionLoadAddress(), lldb_private::ProcessWindows::UpdateThreadList(), ProcessKDP::UpdateThreadList(), lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadList(), lldb_private::process_gdb_remote::GDBRemoteCommunication::WaitForPacketNoLock(), and CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock().