LLDB mainline
Classes | Typedefs | Enumerations | Functions | Variables
sddarwinlog_private Namespace Reference

Classes

class  BaseCommand
 Provides the darwin-log base command. More...
 
class  EnableCommand
 
class  EnableOptions
 
class  ExactMatchFilterRule
 
class  FilterRule
 
class  RegexFilterRule
 
class  StatusCommand
 Provides the status command. More...
 
class  StructuredDataDarwinLogProperties
 

Typedefs

using EnableOptionsSP = std::shared_ptr< EnableOptions >
 
using OptionsMap = std::map< DebuggerWP, EnableOptionsSP, std::owner_less< DebuggerWP > >
 
using FilterRuleSP = std::shared_ptr< FilterRule >
 
using FilterRules = std::vector< FilterRuleSP >
 

Enumerations

enum  
 

Functions

static OptionsMapGetGlobalOptionsMap ()
 
static std::mutex & GetGlobalOptionsMapLock ()
 
EnableOptionsSP GetGlobalEnableOptions (const DebuggerSP &debugger_sp)
 
void SetGlobalEnableOptions (const DebuggerSP &debugger_sp, const EnableOptionsSP &options_sp)
 
static StructuredDataDarwinLogPropertiesGetGlobalProperties ()
 
static llvm::StringRef GetDarwinLogTypeName ()
 
static llvm::StringRef GetLogEventType ()
 
static void RegisterFilterOperations ()
 
EnableOptionsSP ParseAutoEnableOptions (Status &error, Debugger &debugger)
 
bool RunEnableCommand (CommandInterpreter &interpreter)
 

Variables

const uint64_t NANOS_PER_MICRO = 1000
 
const uint64_t NANOS_PER_MILLI = NANOS_PER_MICRO * 1000
 
const uint64_t NANOS_PER_SECOND = NANOS_PER_MILLI * 1000
 
const uint64_t NANOS_PER_MINUTE = NANOS_PER_SECOND * 60
 
const uint64_t NANOS_PER_HOUR = NANOS_PER_MINUTE * 60
 
static bool DEFAULT_FILTER_FALLTHROUGH_ACCEPTS = true
 
static bool s_is_explicitly_enabled
 Global, sticky enable switch.
 
const char *const s_filter_attributes []
 
static constexpr OptionDefinition g_enable_option_table []
 Provides the main on-off switch for enabling darwin logging.
 

Typedef Documentation

◆ EnableOptionsSP

using sddarwinlog_private::EnableOptionsSP = typedef std::shared_ptr<EnableOptions>

Definition at line 66 of file StructuredDataDarwinLog.cpp.

◆ FilterRules

using sddarwinlog_private::FilterRules = typedef std::vector<FilterRuleSP>

Definition at line 260 of file StructuredDataDarwinLog.cpp.

◆ FilterRuleSP

using sddarwinlog_private::FilterRuleSP = typedef std::shared_ptr<FilterRule>

Definition at line 178 of file StructuredDataDarwinLog.cpp.

◆ OptionsMap

using sddarwinlog_private::OptionsMap = typedef std::map<DebuggerWP, EnableOptionsSP, std::owner_less<DebuggerWP> >

Definition at line 68 of file StructuredDataDarwinLog.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 115 of file StructuredDataDarwinLog.cpp.

Function Documentation

◆ GetDarwinLogTypeName()

static llvm::StringRef sddarwinlog_private::GetDarwinLogTypeName ( )
static

◆ GetGlobalEnableOptions()

EnableOptionsSP sddarwinlog_private::GetGlobalEnableOptions ( const DebuggerSP debugger_sp)

◆ GetGlobalOptionsMap()

static OptionsMap & sddarwinlog_private::GetGlobalOptionsMap ( )
static

Definition at line 71 of file StructuredDataDarwinLog.cpp.

Referenced by GetGlobalEnableOptions(), and SetGlobalEnableOptions().

◆ GetGlobalOptionsMapLock()

static std::mutex & sddarwinlog_private::GetGlobalOptionsMapLock ( )
static

Definition at line 76 of file StructuredDataDarwinLog.cpp.

Referenced by GetGlobalEnableOptions(), and SetGlobalEnableOptions().

◆ GetGlobalProperties()

static StructuredDataDarwinLogProperties & sddarwinlog_private::GetGlobalProperties ( )
static

Definition at line 149 of file StructuredDataDarwinLog.cpp.

Referenced by RunEnableCommand().

◆ GetLogEventType()

static llvm::StringRef sddarwinlog_private::GetLogEventType ( )
static

◆ ParseAutoEnableOptions()

EnableOptionsSP sddarwinlog_private::ParseAutoEnableOptions ( Status error,
Debugger debugger 
)

◆ RegisterFilterOperations()

static void sddarwinlog_private::RegisterFilterOperations ( )
static

◆ RunEnableCommand()

bool sddarwinlog_private::RunEnableCommand ( CommandInterpreter interpreter)

◆ SetGlobalEnableOptions()

void sddarwinlog_private::SetGlobalEnableOptions ( const DebuggerSP debugger_sp,
const EnableOptionsSP options_sp 
)

Variable Documentation

◆ DEFAULT_FILTER_FALLTHROUGH_ACCEPTS

bool sddarwinlog_private::DEFAULT_FILTER_FALLTHROUGH_ACCEPTS = true
static

◆ g_enable_option_table

constexpr OptionDefinition sddarwinlog_private::g_enable_option_table[]
staticconstexpr

Provides the main on-off switch for enabling darwin logging.

It is valid to run the enable command when logging is already enabled. This resets the logging with whatever settings are currently set.

Definition at line 373 of file StructuredDataDarwinLog.cpp.

Referenced by sddarwinlog_private::EnableOptions::GetDefinitions().

◆ NANOS_PER_HOUR

const uint64_t sddarwinlog_private::NANOS_PER_HOUR = NANOS_PER_MINUTE * 60

◆ NANOS_PER_MICRO

const uint64_t sddarwinlog_private::NANOS_PER_MICRO = 1000

Definition at line 50 of file StructuredDataDarwinLog.cpp.

◆ NANOS_PER_MILLI

const uint64_t sddarwinlog_private::NANOS_PER_MILLI = NANOS_PER_MICRO * 1000

Definition at line 51 of file StructuredDataDarwinLog.cpp.

◆ NANOS_PER_MINUTE

const uint64_t sddarwinlog_private::NANOS_PER_MINUTE = NANOS_PER_SECOND * 60

◆ NANOS_PER_SECOND

const uint64_t sddarwinlog_private::NANOS_PER_SECOND = NANOS_PER_MILLI * 1000

◆ s_filter_attributes

const char* const sddarwinlog_private::s_filter_attributes[]
Initial value:
= {
"activity",
"activity-chain",
"category",
"message",
"subsystem"
}

Definition at line 154 of file StructuredDataDarwinLog.cpp.

Referenced by sddarwinlog_private::FilterRule::GetFilterAttribute(), sddarwinlog_private::EnableOptions::MatchAttributeIndex(), and sddarwinlog_private::FilterRule::Serialize().

◆ s_is_explicitly_enabled

bool sddarwinlog_private::s_is_explicitly_enabled
static

Global, sticky enable switch.

If true, the user has explicitly run the enable command. When a process launches or is attached to, we will enable DarwinLog if either the settings for auto-enable is on, or if the user had explicitly run enable at some point prior to the launch/attach.

Definition at line 63 of file StructuredDataDarwinLog.cpp.

Referenced by sddarwinlog_private::EnableCommand::DoExecute(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), and lldb_private::StructuredDataDarwinLog::ModulesDidLoad().