LLDB  mainline
Classes | Macros | Typedefs | Enumerations | Functions | Variables
DynamicLoaderDarwinKernel.cpp File Reference
#include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
#include "lldb/Core/StreamFile.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/OperatingSystem.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlanRunToAddress.h"
#include "lldb/Utility/DataBuffer.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
#include "DynamicLoaderDarwinKernel.h"
#include <memory>
#include <algorithm>
Include dependency graph for DynamicLoaderDarwinKernel.cpp:

Go to the source code of this file.

Classes

class  DynamicLoaderDarwinKernelProperties
 

Macros

#define DEBUG_PRINTF(fmt, ...)
 

Typedefs

typedef std::shared_ptr< DynamicLoaderDarwinKernelPropertiesDynamicLoaderDarwinKernelPropertiesSP
 

Enumerations

enum  KASLRScanType { eKASLRScanNone = 0, eKASLRScanLowgloAddresses, eKASLRScanNearPC, eKASLRScanExhaustiveScan }
 
enum  { ePropertyLoadKexts, ePropertyScanType }
 

Functions

static const DynamicLoaderDarwinKernelPropertiesSPGetGlobalProperties ()
 

Variables

static constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values []
 
static constexpr PropertyDefinition g_properties []
 

Macro Definition Documentation

◆ DEBUG_PRINTF

#define DEBUG_PRINTF (   fmt,
  ... 
)

Typedef Documentation

◆ DynamicLoaderDarwinKernelPropertiesSP

Definition at line 113 of file DynamicLoaderDarwinKernel.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ePropertyLoadKexts 
ePropertyScanType 

Definition at line 83 of file DynamicLoaderDarwinKernel.cpp.

◆ KASLRScanType

Enumerator
eKASLRScanNone 
eKASLRScanLowgloAddresses 
eKASLRScanNearPC 
eKASLRScanExhaustiveScan 

Definition at line 53 of file DynamicLoaderDarwinKernel.cpp.

Function Documentation

◆ GetGlobalProperties()

static const DynamicLoaderDarwinKernelPropertiesSP& GetGlobalProperties ( )
static

Variable Documentation

◆ g_kaslr_kernel_scan_enum_values

constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values[]
static
Initial value:
= {
{eKASLRScanNone, "none",
"Do not read memory looking for a Darwin kernel when attaching."},
{eKASLRScanLowgloAddresses, "basic", "Check for the Darwin kernel's load "
"addr in the lowglo page "
"(boot-args=debug) only."},
{eKASLRScanNearPC, "fast-scan", "Scan near the pc value on attach to find "
"the Darwin kernel's load address."},
{eKASLRScanExhaustiveScan, "exhaustive-scan",
"Scan through the entire potential address range of Darwin kernel (only "
"on 32-bit targets)."}}

Definition at line 63 of file DynamicLoaderDarwinKernel.cpp.

◆ g_properties

constexpr PropertyDefinition g_properties[]
static
Initial value:
= {
{"load-kexts", OptionValue::eTypeBoolean, true, true, NULL, {},
"Automatically loads kext images when attaching to a kernel."},
{"scan-type", OptionValue::eTypeEnum, true, eKASLRScanNearPC, NULL,
"Control how many reads lldb will make while searching for a Darwin "
"kernel on attach."}}
static constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values[]

Definition at line 75 of file DynamicLoaderDarwinKernel.cpp.

Referenced by DynamicLoaderDarwinKernelProperties::DynamicLoaderDarwinKernelProperties(), DynamicLoaderDarwinKernelProperties::GetLoadKexts(), and DynamicLoaderDarwinKernelProperties::GetScanType().