forked from OSchip/llvm-project
Added some functions to our API related to classifying symbols as code, data,
const data, etc, and also for SBAddress objects to classify their type of section they are in and also getting the module for a section offset address. lldb::SymbolType SBSymbol::GetType(); lldb::SectionType SBAddress::GetSectionType (); lldb::SBModule SBAddress::GetModule (); llvm-svn: 128602
This commit is contained in:
parent
0e43f321b6
commit
05d2b7f741
|
@ -11,6 +11,7 @@
|
|||
#define LLDB_SBAddress_h_
|
||||
|
||||
#include "lldb/API/SBDefines.h"
|
||||
#include "lldb/API/SBModule.h"
|
||||
|
||||
namespace lldb {
|
||||
|
||||
|
@ -47,6 +48,12 @@ public:
|
|||
bool
|
||||
GetDescription (lldb::SBStream &description);
|
||||
|
||||
SectionType
|
||||
GetSectionType ();
|
||||
|
||||
lldb::SBModule
|
||||
GetModule ();
|
||||
|
||||
protected:
|
||||
|
||||
friend class SBFrame;
|
||||
|
|
|
@ -66,9 +66,10 @@ public:
|
|||
GetSymbolAtIndex (size_t idx);
|
||||
|
||||
private:
|
||||
friend class SBAddress;
|
||||
friend class SBFrame;
|
||||
friend class SBSymbolContext;
|
||||
friend class SBTarget;
|
||||
friend class SBFrame;
|
||||
|
||||
explicit SBModule (const lldb::ModuleSP& module_sp);
|
||||
|
||||
|
|
|
@ -54,6 +54,9 @@ public:
|
|||
uint32_t
|
||||
GetPrologueByteSize ();
|
||||
|
||||
SymbolType
|
||||
GetType ();
|
||||
|
||||
#ifndef SWIG
|
||||
bool
|
||||
operator == (const lldb::SBSymbol &rhs) const;
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
/// pointer if it has one in the shared module list.
|
||||
//------------------------------------------------------------------
|
||||
lldb::ModuleSP
|
||||
GetSP ();
|
||||
GetSP () const;
|
||||
|
||||
//------------------------------------------------------------------
|
||||
/// @copydoc SymbolContextScope::CalculateSymbolContext(SymbolContext*)
|
||||
|
@ -144,16 +144,16 @@ public:
|
|||
//------------------------------------------------------------------
|
||||
const Symbol *
|
||||
FindFirstSymbolWithNameAndType (const ConstString &name,
|
||||
SymbolType symbol_type = eSymbolTypeAny);
|
||||
lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
|
||||
|
||||
size_t
|
||||
FindSymbolsWithNameAndType (const ConstString &name,
|
||||
SymbolType symbol_type,
|
||||
lldb::SymbolType symbol_type,
|
||||
SymbolContextList &sc_list);
|
||||
|
||||
size_t
|
||||
FindSymbolsMatchingRegExAndType (const RegularExpression ®ex,
|
||||
SymbolType symbol_type,
|
||||
lldb::SymbolType symbol_type,
|
||||
SymbolContextList &sc_list);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
|
@ -288,7 +288,7 @@ public:
|
|||
|
||||
size_t
|
||||
FindSymbolsWithNameAndType (const ConstString &name,
|
||||
SymbolType symbol_type,
|
||||
lldb::SymbolType symbol_type,
|
||||
SymbolContextList &sc_list);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
FindSectionByID (lldb::user_id_t sect_id) const;
|
||||
|
||||
lldb::SectionSP
|
||||
FindSectionByType (SectionType sect_type, bool check_children, uint32_t start_idx = 0) const;
|
||||
FindSectionByType (lldb::SectionType sect_type, bool check_children, uint32_t start_idx = 0) const;
|
||||
|
||||
lldb::SectionSP
|
||||
GetSharedPointer (const Section *section, bool check_children) const;
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
Module* module,
|
||||
lldb::user_id_t sect_id,
|
||||
const ConstString &name,
|
||||
SectionType sect_type,
|
||||
lldb::SectionType sect_type,
|
||||
lldb::addr_t file_vm_addr,
|
||||
lldb::addr_t vm_size,
|
||||
uint64_t file_offset,
|
||||
|
@ -268,7 +268,7 @@ public:
|
|||
lldb::addr_t
|
||||
GetLinkedFileAddress () const;
|
||||
|
||||
SectionType
|
||||
lldb::SectionType
|
||||
GetType () const
|
||||
{
|
||||
return m_type;
|
||||
|
@ -278,7 +278,7 @@ protected:
|
|||
|
||||
Section * m_parent; // Parent section or NULL if no parent.
|
||||
ConstString m_name; // Name of this section
|
||||
SectionType m_type; // The type of this section
|
||||
lldb::SectionType m_type; // The type of this section
|
||||
lldb::addr_t m_file_addr; // The absolute file virtual address range of this section if m_parent == NULL,
|
||||
// offset from parent file virtual address if m_parent != NULL
|
||||
lldb::addr_t m_byte_size; // Size in bytes that this section will occupy in memory at runtime
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
Symbol (lldb::user_id_t symID,
|
||||
const char *name,
|
||||
bool name_is_mangled,
|
||||
SymbolType type,
|
||||
lldb::SymbolType type,
|
||||
bool external,
|
||||
bool is_debug,
|
||||
bool is_trampoline,
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
Symbol (lldb::user_id_t symID,
|
||||
const char *name,
|
||||
bool name_is_mangled,
|
||||
SymbolType type,
|
||||
lldb::SymbolType type,
|
||||
bool external,
|
||||
bool is_debug,
|
||||
bool is_trampoline,
|
||||
|
@ -58,7 +58,7 @@ public:
|
|||
operator= (const Symbol& rhs);
|
||||
|
||||
bool
|
||||
Compare (const ConstString& name, SymbolType type) const;
|
||||
Compare (const ConstString& name, lldb::SymbolType type) const;
|
||||
|
||||
void
|
||||
Dump (Stream *s, Target *target, uint32_t index) const;
|
||||
|
@ -96,11 +96,11 @@ public:
|
|||
lldb::addr_t
|
||||
GetByteSize () const { return m_addr_range.GetByteSize(); }
|
||||
|
||||
SymbolType
|
||||
lldb::SymbolType
|
||||
GetType () const { return m_type; }
|
||||
|
||||
void
|
||||
SetType (SymbolType type) { m_type = type; }
|
||||
SetType (lldb::SymbolType type) { m_type = type; }
|
||||
|
||||
const char *
|
||||
GetTypeAsString () const;
|
||||
|
@ -186,7 +186,7 @@ public:
|
|||
protected:
|
||||
|
||||
Mangled m_mangled; // uniqued symbol name/mangled name pair
|
||||
SymbolType m_type; // symbol type
|
||||
lldb::SymbolType m_type; // symbol type
|
||||
uint16_t m_type_data; // data specific to m_type
|
||||
uint16_t m_type_data_resolved:1, // True if the data in m_type_data has already been calculated
|
||||
m_is_synthetic:1, // non-zero if this symbol is not actually in the symbol table, but synthesized from other info in the object file.
|
||||
|
|
|
@ -52,21 +52,21 @@ public:
|
|||
Symbol * FindSymbolByID (lldb::user_id_t uid) const;
|
||||
Symbol * SymbolAtIndex (uint32_t idx);
|
||||
const Symbol * SymbolAtIndex (uint32_t idx) const;
|
||||
Symbol * FindSymbolWithType (SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx);
|
||||
// const Symbol * FindSymbolWithType (SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx) const;
|
||||
uint32_t AppendSymbolIndexesWithType (SymbolType symbol_type, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
uint32_t AppendSymbolIndexesWithTypeAndFlagsValue (SymbolType symbol_type, uint32_t flags_value, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
uint32_t AppendSymbolIndexesWithType (SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& matches, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
Symbol * FindSymbolWithType (lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx);
|
||||
// const Symbol * FindSymbolWithType (lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx) const;
|
||||
uint32_t AppendSymbolIndexesWithType (lldb::SymbolType symbol_type, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
uint32_t AppendSymbolIndexesWithTypeAndFlagsValue (lldb::SymbolType symbol_type, uint32_t flags_value, std::vector<uint32_t>& indexes, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
uint32_t AppendSymbolIndexesWithType (lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& matches, uint32_t start_idx = 0, uint32_t end_index = UINT32_MAX) const;
|
||||
uint32_t AppendSymbolIndexesWithName (const ConstString& symbol_name, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesWithName (const ConstString& symbol_name, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesWithNameAndType (const ConstString& symbol_name, SymbolType symbol_type, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesWithNameAndType (const ConstString& symbol_name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesMatchingRegExAndType (const RegularExpression ®ex, SymbolType symbol_type, std::vector<uint32_t>& indexes);
|
||||
uint32_t AppendSymbolIndexesMatchingRegExAndType (const RegularExpression ®ex, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& indexes);
|
||||
size_t FindAllSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_type, std::vector<uint32_t>& symbol_indexes);
|
||||
size_t FindAllSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& symbol_indexes);
|
||||
size_t FindAllSymbolsMatchingRexExAndType (const RegularExpression ®ex, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& symbol_indexes);
|
||||
Symbol * FindFirstSymbolWithNameAndType (const ConstString &name, SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility);
|
||||
uint32_t AppendSymbolIndexesWithNameAndType (const ConstString& symbol_name, lldb::SymbolType symbol_type, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesWithNameAndType (const ConstString& symbol_name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& matches);
|
||||
uint32_t AppendSymbolIndexesMatchingRegExAndType (const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector<uint32_t>& indexes);
|
||||
uint32_t AppendSymbolIndexesMatchingRegExAndType (const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& indexes);
|
||||
size_t FindAllSymbolsWithNameAndType (const ConstString &name, lldb::SymbolType symbol_type, std::vector<uint32_t>& symbol_indexes);
|
||||
size_t FindAllSymbolsWithNameAndType (const ConstString &name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& symbol_indexes);
|
||||
size_t FindAllSymbolsMatchingRexExAndType (const RegularExpression ®ex, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, std::vector<uint32_t>& symbol_indexes);
|
||||
Symbol * FindFirstSymbolWithNameAndType (const ConstString &name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility);
|
||||
Symbol * FindSymbolWithFileAddress (lldb::addr_t file_addr);
|
||||
// Symbol * FindSymbolContainingAddress (const Address& value, const uint32_t* indexes, uint32_t num_indexes);
|
||||
// Symbol * FindSymbolContainingAddress (const Address& value);
|
||||
|
|
|
@ -12,380 +12,446 @@
|
|||
|
||||
namespace lldb {
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Process and Thread States
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum StateType
|
||||
{
|
||||
eStateInvalid = 0,
|
||||
eStateUnloaded, ///< Process is object is valid, but not currently loaded
|
||||
eStateConnected, ///< Process is connected to remote debug services, but not launched or attached to anything yet
|
||||
eStateAttaching, ///< Process is currently trying to attach
|
||||
eStateLaunching, ///< Process is in the process of launching
|
||||
eStateStopped, ///< Process or thread is stopped and can be examined.
|
||||
eStateRunning, ///< Process or thread is running and can't be examined.
|
||||
eStateStepping, ///< Process or thread is in the process of stepping and can not be examined.
|
||||
eStateCrashed, ///< Process or thread has crashed and can be examined.
|
||||
eStateDetached, ///< Process has been detached and can't be examined.
|
||||
eStateExited, ///< Process has exited and can't be examined.
|
||||
eStateSuspended ///< Process or thread is in a suspended state as far
|
||||
///< as the debugger is concerned while other processes
|
||||
///< or threads get the chance to run.
|
||||
} StateType;
|
||||
//----------------------------------------------------------------------
|
||||
// Process and Thread States
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum StateType
|
||||
{
|
||||
eStateInvalid = 0,
|
||||
eStateUnloaded, ///< Process is object is valid, but not currently loaded
|
||||
eStateConnected, ///< Process is connected to remote debug services, but not launched or attached to anything yet
|
||||
eStateAttaching, ///< Process is currently trying to attach
|
||||
eStateLaunching, ///< Process is in the process of launching
|
||||
eStateStopped, ///< Process or thread is stopped and can be examined.
|
||||
eStateRunning, ///< Process or thread is running and can't be examined.
|
||||
eStateStepping, ///< Process or thread is in the process of stepping and can not be examined.
|
||||
eStateCrashed, ///< Process or thread has crashed and can be examined.
|
||||
eStateDetached, ///< Process has been detached and can't be examined.
|
||||
eStateExited, ///< Process has exited and can't be examined.
|
||||
eStateSuspended ///< Process or thread is in a suspended state as far
|
||||
///< as the debugger is concerned while other processes
|
||||
///< or threads get the chance to run.
|
||||
} StateType;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Launch Flags
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum LaunchFlags
|
||||
{
|
||||
eLaunchFlagNone = 0u,
|
||||
eLaunchFlagDisableASLR = (1u << 0), ///< Disable Address Space Layout Randomization
|
||||
eLaunchFlagDisableSTDIO = (1u << 1), ///< Disable stdio for inferior process (e.g. for a GUI app)
|
||||
eLaunchFlagLaunchInTTY = (1u << 2) ///< Launch the process in a new TTY if supported by the host
|
||||
} LaunchFlags;
|
||||
//----------------------------------------------------------------------
|
||||
// Launch Flags
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum LaunchFlags
|
||||
{
|
||||
eLaunchFlagNone = 0u,
|
||||
eLaunchFlagDisableASLR = (1u << 0), ///< Disable Address Space Layout Randomization
|
||||
eLaunchFlagDisableSTDIO = (1u << 1), ///< Disable stdio for inferior process (e.g. for a GUI app)
|
||||
eLaunchFlagLaunchInTTY = (1u << 2) ///< Launch the process in a new TTY if supported by the host
|
||||
} LaunchFlags;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Thread Run Modes
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum RunMode {
|
||||
eOnlyThisThread,
|
||||
eAllThreads,
|
||||
eOnlyDuringStepping
|
||||
} RunMode;
|
||||
//----------------------------------------------------------------------
|
||||
// Thread Run Modes
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum RunMode {
|
||||
eOnlyThisThread,
|
||||
eAllThreads,
|
||||
eOnlyDuringStepping
|
||||
} RunMode;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Byte ordering definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ByteOrder
|
||||
{
|
||||
eByteOrderInvalid = 0,
|
||||
eByteOrderBig = 1,
|
||||
eByteOrderPDP = 2,
|
||||
eByteOrderLittle = 4
|
||||
} ByteOrder;
|
||||
//----------------------------------------------------------------------
|
||||
// Byte ordering definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ByteOrder
|
||||
{
|
||||
eByteOrderInvalid = 0,
|
||||
eByteOrderBig = 1,
|
||||
eByteOrderPDP = 2,
|
||||
eByteOrderLittle = 4
|
||||
} ByteOrder;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Register encoding definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum Encoding
|
||||
{
|
||||
eEncodingInvalid = 0,
|
||||
eEncodingUint, // unsigned integer
|
||||
eEncodingSint, // signed integer
|
||||
eEncodingIEEE754, // float
|
||||
eEncodingVector // vector registers
|
||||
} Encoding;
|
||||
//----------------------------------------------------------------------
|
||||
// Register encoding definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum Encoding
|
||||
{
|
||||
eEncodingInvalid = 0,
|
||||
eEncodingUint, // unsigned integer
|
||||
eEncodingSint, // signed integer
|
||||
eEncodingIEEE754, // float
|
||||
eEncodingVector // vector registers
|
||||
} Encoding;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Display format definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum Format
|
||||
{
|
||||
eFormatDefault = 0,
|
||||
eFormatInvalid = 0,
|
||||
eFormatBoolean,
|
||||
eFormatBinary,
|
||||
eFormatBytes,
|
||||
eFormatBytesWithASCII,
|
||||
eFormatChar,
|
||||
eFormatCharPrintable, // Only printable characters, space if not printable
|
||||
eFormatComplex, // Floating point complex type
|
||||
eFormatComplexFloat = eFormatComplex,
|
||||
eFormatCString, // NULL terminated C strings
|
||||
eFormatDecimal,
|
||||
eFormatEnum,
|
||||
eFormatHex,
|
||||
eFormatFloat,
|
||||
eFormatOctal,
|
||||
eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc...
|
||||
eFormatUnicode16,
|
||||
eFormatUnicode32,
|
||||
eFormatUnsigned,
|
||||
eFormatPointer,
|
||||
eFormatVectorOfChar,
|
||||
eFormatVectorOfSInt8,
|
||||
eFormatVectorOfUInt8,
|
||||
eFormatVectorOfSInt16,
|
||||
eFormatVectorOfUInt16,
|
||||
eFormatVectorOfSInt32,
|
||||
eFormatVectorOfUInt32,
|
||||
eFormatVectorOfSInt64,
|
||||
eFormatVectorOfUInt64,
|
||||
eFormatVectorOfFloat32,
|
||||
eFormatVectorOfFloat64,
|
||||
eFormatVectorOfUInt128,
|
||||
eFormatComplexInteger // Integer complex type
|
||||
//----------------------------------------------------------------------
|
||||
// Display format definitions
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum Format
|
||||
{
|
||||
eFormatDefault = 0,
|
||||
eFormatInvalid = 0,
|
||||
eFormatBoolean,
|
||||
eFormatBinary,
|
||||
eFormatBytes,
|
||||
eFormatBytesWithASCII,
|
||||
eFormatChar,
|
||||
eFormatCharPrintable, // Only printable characters, space if not printable
|
||||
eFormatComplex, // Floating point complex type
|
||||
eFormatComplexFloat = eFormatComplex,
|
||||
eFormatCString, // NULL terminated C strings
|
||||
eFormatDecimal,
|
||||
eFormatEnum,
|
||||
eFormatHex,
|
||||
eFormatFloat,
|
||||
eFormatOctal,
|
||||
eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc...
|
||||
eFormatUnicode16,
|
||||
eFormatUnicode32,
|
||||
eFormatUnsigned,
|
||||
eFormatPointer,
|
||||
eFormatVectorOfChar,
|
||||
eFormatVectorOfSInt8,
|
||||
eFormatVectorOfUInt8,
|
||||
eFormatVectorOfSInt16,
|
||||
eFormatVectorOfUInt16,
|
||||
eFormatVectorOfSInt32,
|
||||
eFormatVectorOfUInt32,
|
||||
eFormatVectorOfSInt64,
|
||||
eFormatVectorOfUInt64,
|
||||
eFormatVectorOfFloat32,
|
||||
eFormatVectorOfFloat64,
|
||||
eFormatVectorOfUInt128,
|
||||
eFormatComplexInteger // Integer complex type
|
||||
|
||||
} Format;
|
||||
} Format;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum DescriptionLevel
|
||||
{
|
||||
eDescriptionLevelBrief = 0,
|
||||
eDescriptionLevelFull,
|
||||
eDescriptionLevelVerbose,
|
||||
kNumDescriptionLevels
|
||||
} DescriptionLevel;
|
||||
//----------------------------------------------------------------------
|
||||
// Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum DescriptionLevel
|
||||
{
|
||||
eDescriptionLevelBrief = 0,
|
||||
eDescriptionLevelFull,
|
||||
eDescriptionLevelVerbose,
|
||||
kNumDescriptionLevels
|
||||
} DescriptionLevel;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Script interpreter types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ScriptLanguage
|
||||
{
|
||||
eScriptLanguageNone,
|
||||
eScriptLanguagePython,
|
||||
eScriptLanguageDefault = eScriptLanguagePython
|
||||
} ScriptLanguage;
|
||||
//----------------------------------------------------------------------
|
||||
// Script interpreter types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ScriptLanguage
|
||||
{
|
||||
eScriptLanguageNone,
|
||||
eScriptLanguagePython,
|
||||
eScriptLanguageDefault = eScriptLanguagePython
|
||||
} ScriptLanguage;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Register numbering types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum RegisterKind
|
||||
{
|
||||
eRegisterKindGCC = 0, // the register numbers seen in eh_frame
|
||||
eRegisterKindDWARF, // the register numbers seen DWARF
|
||||
eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target
|
||||
eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers?)
|
||||
eRegisterKindLLDB, // lldb's internal register numbers
|
||||
kNumRegisterKinds
|
||||
} RegisterKind;
|
||||
//----------------------------------------------------------------------
|
||||
// Register numbering types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum RegisterKind
|
||||
{
|
||||
eRegisterKindGCC = 0, // the register numbers seen in eh_frame
|
||||
eRegisterKindDWARF, // the register numbers seen DWARF
|
||||
eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target
|
||||
eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers?)
|
||||
eRegisterKindLLDB, // lldb's internal register numbers
|
||||
kNumRegisterKinds
|
||||
} RegisterKind;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Thread stop reasons
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum StopReason
|
||||
{
|
||||
eStopReasonInvalid = 0,
|
||||
eStopReasonNone,
|
||||
eStopReasonTrace,
|
||||
eStopReasonBreakpoint,
|
||||
eStopReasonWatchpoint,
|
||||
eStopReasonSignal,
|
||||
eStopReasonException,
|
||||
eStopReasonPlanComplete
|
||||
} StopReason;
|
||||
//----------------------------------------------------------------------
|
||||
// Thread stop reasons
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum StopReason
|
||||
{
|
||||
eStopReasonInvalid = 0,
|
||||
eStopReasonNone,
|
||||
eStopReasonTrace,
|
||||
eStopReasonBreakpoint,
|
||||
eStopReasonWatchpoint,
|
||||
eStopReasonSignal,
|
||||
eStopReasonException,
|
||||
eStopReasonPlanComplete
|
||||
} StopReason;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Command Return Status Types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ReturnStatus
|
||||
{
|
||||
eReturnStatusInvalid,
|
||||
eReturnStatusSuccessFinishNoResult,
|
||||
eReturnStatusSuccessFinishResult,
|
||||
eReturnStatusSuccessContinuingNoResult,
|
||||
eReturnStatusSuccessContinuingResult,
|
||||
eReturnStatusStarted,
|
||||
eReturnStatusFailed,
|
||||
eReturnStatusQuit
|
||||
} ReturnStatus;
|
||||
//----------------------------------------------------------------------
|
||||
// Command Return Status Types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ReturnStatus
|
||||
{
|
||||
eReturnStatusInvalid,
|
||||
eReturnStatusSuccessFinishNoResult,
|
||||
eReturnStatusSuccessFinishResult,
|
||||
eReturnStatusSuccessContinuingNoResult,
|
||||
eReturnStatusSuccessContinuingResult,
|
||||
eReturnStatusStarted,
|
||||
eReturnStatusFailed,
|
||||
eReturnStatusQuit
|
||||
} ReturnStatus;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Connection Status Types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ConnectionStatus
|
||||
{
|
||||
eConnectionStatusSuccess, // Success
|
||||
eConnectionStatusEndOfFile, // End-of-file encountered
|
||||
eConnectionStatusError, // Check GetError() for details
|
||||
eConnectionStatusTimedOut, // Request timed out
|
||||
eConnectionStatusNoConnection, // No connection
|
||||
eConnectionStatusLostConnection // Lost connection while connected to a valid connection
|
||||
} ConnectionStatus;
|
||||
//----------------------------------------------------------------------
|
||||
// Connection Status Types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum ConnectionStatus
|
||||
{
|
||||
eConnectionStatusSuccess, // Success
|
||||
eConnectionStatusEndOfFile, // End-of-file encountered
|
||||
eConnectionStatusError, // Check GetError() for details
|
||||
eConnectionStatusTimedOut, // Request timed out
|
||||
eConnectionStatusNoConnection, // No connection
|
||||
eConnectionStatusLostConnection // Lost connection while connected to a valid connection
|
||||
} ConnectionStatus;
|
||||
|
||||
typedef enum ErrorType
|
||||
{
|
||||
eErrorTypeInvalid,
|
||||
eErrorTypeGeneric, ///< Generic errors that can be any value.
|
||||
eErrorTypeMachKernel, ///< Mach kernel error codes.
|
||||
eErrorTypePOSIX ///< POSIX error codes.
|
||||
} ErrorType;
|
||||
typedef enum ErrorType
|
||||
{
|
||||
eErrorTypeInvalid,
|
||||
eErrorTypeGeneric, ///< Generic errors that can be any value.
|
||||
eErrorTypeMachKernel, ///< Mach kernel error codes.
|
||||
eErrorTypePOSIX ///< POSIX error codes.
|
||||
} ErrorType;
|
||||
|
||||
|
||||
typedef enum ValueType
|
||||
{
|
||||
eValueTypeInvalid = 0,
|
||||
eValueTypeVariableGlobal = 1, // globals variable
|
||||
eValueTypeVariableStatic = 2, // static variable
|
||||
eValueTypeVariableArgument = 3, // function argument variables
|
||||
eValueTypeVariableLocal = 4, // function local variables
|
||||
eValueTypeRegister = 5, // stack frame register value
|
||||
eValueTypeRegisterSet = 6, // A collection of stack frame register values
|
||||
eValueTypeConstResult = 7 // constant result variables
|
||||
} ValueType;
|
||||
typedef enum ValueType
|
||||
{
|
||||
eValueTypeInvalid = 0,
|
||||
eValueTypeVariableGlobal = 1, // globals variable
|
||||
eValueTypeVariableStatic = 2, // static variable
|
||||
eValueTypeVariableArgument = 3, // function argument variables
|
||||
eValueTypeVariableLocal = 4, // function local variables
|
||||
eValueTypeRegister = 5, // stack frame register value
|
||||
eValueTypeRegisterSet = 6, // A collection of stack frame register values
|
||||
eValueTypeConstResult = 7 // constant result variables
|
||||
} ValueType;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Token size/granularities for Input Readers
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
// Token size/granularities for Input Readers
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
typedef enum InputReaderGranularity
|
||||
{
|
||||
eInputReaderGranularityInvalid = 0,
|
||||
eInputReaderGranularityByte,
|
||||
eInputReaderGranularityWord,
|
||||
eInputReaderGranularityLine,
|
||||
eInputReaderGranularityAll
|
||||
} InputReaderGranularity;
|
||||
typedef enum InputReaderGranularity
|
||||
{
|
||||
eInputReaderGranularityInvalid = 0,
|
||||
eInputReaderGranularityByte,
|
||||
eInputReaderGranularityWord,
|
||||
eInputReaderGranularityLine,
|
||||
eInputReaderGranularityAll
|
||||
} InputReaderGranularity;
|
||||
|
||||
//------------------------------------------------------------------
|
||||
/// These mask bits allow a common interface for queries that can
|
||||
/// limit the amount of information that gets parsed to only the
|
||||
/// information that is requested. These bits also can indicate what
|
||||
/// actually did get resolved during query function calls.
|
||||
///
|
||||
/// Each definition corresponds to a one of the member variables
|
||||
/// in this class, and requests that that item be resolved, or
|
||||
/// indicates that the member did get resolved.
|
||||
//------------------------------------------------------------------
|
||||
typedef enum SymbolContextItem
|
||||
{
|
||||
eSymbolContextTarget = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results
|
||||
eSymbolContextModule = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results
|
||||
eSymbolContextCompUnit = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
|
||||
eSymbolContextFunction = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results
|
||||
eSymbolContextBlock = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
|
||||
eSymbolContextLineEntry = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
|
||||
eSymbolContextSymbol = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results
|
||||
eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1) ///< Indicates to try and lookup everything up during a query.
|
||||
} SymbolContextItem;
|
||||
//------------------------------------------------------------------
|
||||
/// These mask bits allow a common interface for queries that can
|
||||
/// limit the amount of information that gets parsed to only the
|
||||
/// information that is requested. These bits also can indicate what
|
||||
/// actually did get resolved during query function calls.
|
||||
///
|
||||
/// Each definition corresponds to a one of the member variables
|
||||
/// in this class, and requests that that item be resolved, or
|
||||
/// indicates that the member did get resolved.
|
||||
//------------------------------------------------------------------
|
||||
typedef enum SymbolContextItem
|
||||
{
|
||||
eSymbolContextTarget = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results
|
||||
eSymbolContextModule = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results
|
||||
eSymbolContextCompUnit = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
|
||||
eSymbolContextFunction = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results
|
||||
eSymbolContextBlock = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
|
||||
eSymbolContextLineEntry = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
|
||||
eSymbolContextSymbol = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results
|
||||
eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1) ///< Indicates to try and lookup everything up during a query.
|
||||
} SymbolContextItem;
|
||||
|
||||
typedef enum Permissions
|
||||
{
|
||||
ePermissionsWritable = (1 << 0),
|
||||
ePermissionsReadable = (1 << 1),
|
||||
ePermissionsExecutable = (1 << 2)
|
||||
} Permissions;
|
||||
typedef enum Permissions
|
||||
{
|
||||
ePermissionsWritable = (1 << 0),
|
||||
ePermissionsReadable = (1 << 1),
|
||||
ePermissionsExecutable = (1 << 2)
|
||||
} Permissions;
|
||||
|
||||
typedef enum InputReaderAction
|
||||
{
|
||||
eInputReaderActivate, // reader is newly pushed onto the reader stack
|
||||
eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off
|
||||
eInputReaderDeactivate, // another reader was pushed on the stack
|
||||
eInputReaderGotToken, // reader got one of its tokens (granularity)
|
||||
eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c)
|
||||
eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d)
|
||||
eInputReaderDone // reader was just popped off the stack and is done
|
||||
} InputReaderAction;
|
||||
typedef enum InputReaderAction
|
||||
{
|
||||
eInputReaderActivate, // reader is newly pushed onto the reader stack
|
||||
eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off
|
||||
eInputReaderDeactivate, // another reader was pushed on the stack
|
||||
eInputReaderGotToken, // reader got one of its tokens (granularity)
|
||||
eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c)
|
||||
eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d)
|
||||
eInputReaderDone // reader was just popped off the stack and is done
|
||||
} InputReaderAction;
|
||||
|
||||
typedef enum BreakpointEventType
|
||||
{
|
||||
eBreakpointEventTypeInvalidType = (1u << 0),
|
||||
eBreakpointEventTypeAdded = (1u << 1),
|
||||
eBreakpointEventTypeRemoved = (1u << 2),
|
||||
eBreakpointEventTypeLocationsAdded = (1u << 3),
|
||||
eBreakpointEventTypeLocationsRemoved = (1u << 4),
|
||||
eBreakpointEventTypeLocationsResolved = (1u << 5)
|
||||
} BreakpointEventType;
|
||||
typedef enum BreakpointEventType
|
||||
{
|
||||
eBreakpointEventTypeInvalidType = (1u << 0),
|
||||
eBreakpointEventTypeAdded = (1u << 1),
|
||||
eBreakpointEventTypeRemoved = (1u << 2),
|
||||
eBreakpointEventTypeLocationsAdded = (1u << 3),
|
||||
eBreakpointEventTypeLocationsRemoved = (1u << 4),
|
||||
eBreakpointEventTypeLocationsResolved = (1u << 5)
|
||||
} BreakpointEventType;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
/// Programming language type.
|
||||
///
|
||||
/// These enumerations use the same language enumerations as the DWARF
|
||||
/// specification for ease of use and consistency.
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum LanguageType
|
||||
{
|
||||
eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
|
||||
eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
|
||||
eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
|
||||
eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
|
||||
eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
|
||||
eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
|
||||
eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
|
||||
eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
|
||||
eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
|
||||
eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
|
||||
eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
|
||||
eLanguageTypeJava = 0x000b, ///< Java.
|
||||
eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
|
||||
eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
|
||||
eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
|
||||
eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
|
||||
eLanguageTypeObjC = 0x0010, ///< Objective-C.
|
||||
eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
|
||||
eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
|
||||
eLanguageTypeD = 0x0013, ///< D.
|
||||
eLanguageTypePython = 0x0014 ///< Python.
|
||||
} LanguageType;
|
||||
//----------------------------------------------------------------------
|
||||
/// Programming language type.
|
||||
///
|
||||
/// These enumerations use the same language enumerations as the DWARF
|
||||
/// specification for ease of use and consistency.
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum LanguageType
|
||||
{
|
||||
eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
|
||||
eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
|
||||
eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
|
||||
eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
|
||||
eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
|
||||
eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
|
||||
eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
|
||||
eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
|
||||
eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
|
||||
eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
|
||||
eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
|
||||
eLanguageTypeJava = 0x000b, ///< Java.
|
||||
eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
|
||||
eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
|
||||
eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
|
||||
eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
|
||||
eLanguageTypeObjC = 0x0010, ///< Objective-C.
|
||||
eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
|
||||
eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
|
||||
eLanguageTypeD = 0x0013, ///< D.
|
||||
eLanguageTypePython = 0x0014 ///< Python.
|
||||
} LanguageType;
|
||||
|
||||
|
||||
typedef enum AccessType
|
||||
{
|
||||
eAccessNone,
|
||||
eAccessPublic,
|
||||
eAccessPrivate,
|
||||
eAccessProtected,
|
||||
eAccessPackage
|
||||
} AccessType;
|
||||
typedef enum AccessType
|
||||
{
|
||||
eAccessNone,
|
||||
eAccessPublic,
|
||||
eAccessPrivate,
|
||||
eAccessProtected,
|
||||
eAccessPackage
|
||||
} AccessType;
|
||||
|
||||
typedef enum CommandArgumentType
|
||||
{
|
||||
eArgTypeAddress = 0,
|
||||
eArgTypeAliasName,
|
||||
eArgTypeAliasOptions,
|
||||
eArgTypeArchitecture,
|
||||
eArgTypeBoolean,
|
||||
eArgTypeBreakpointID,
|
||||
eArgTypeBreakpointIDRange,
|
||||
eArgTypeByteSize,
|
||||
eArgTypeClassName,
|
||||
eArgTypeCommandName,
|
||||
eArgTypeCount,
|
||||
eArgTypeEndAddress,
|
||||
eArgTypeExpression,
|
||||
eArgTypeExprFormat,
|
||||
eArgTypeFilename,
|
||||
eArgTypeFormat,
|
||||
eArgTypeFrameIndex,
|
||||
eArgTypeFullName,
|
||||
eArgTypeFunctionName,
|
||||
eArgTypeIndex,
|
||||
eArgTypeLineNum,
|
||||
eArgTypeLogCategory,
|
||||
eArgTypeLogChannel,
|
||||
eArgTypeMethod,
|
||||
eArgTypeName,
|
||||
eArgTypeNewPathPrefix,
|
||||
eArgTypeNumLines,
|
||||
eArgTypeNumberPerLine,
|
||||
eArgTypeOffset,
|
||||
eArgTypeOldPathPrefix,
|
||||
eArgTypeOneLiner,
|
||||
eArgTypePath,
|
||||
eArgTypePid,
|
||||
eArgTypePlugin,
|
||||
eArgTypeProcessName,
|
||||
eArgTypeQueueName,
|
||||
eArgTypeRegisterName,
|
||||
eArgTypeRegularExpression,
|
||||
eArgTypeRunArgs,
|
||||
eArgTypeRunMode,
|
||||
eArgTypeScriptLang,
|
||||
eArgTypeSearchWord,
|
||||
eArgTypeSelector,
|
||||
eArgTypeSettingIndex,
|
||||
eArgTypeSettingKey,
|
||||
eArgTypeSettingPrefix,
|
||||
eArgTypeSettingVariableName,
|
||||
eArgTypeShlibName,
|
||||
eArgTypeSourceFile,
|
||||
eArgTypeSortOrder,
|
||||
eArgTypeStartAddress,
|
||||
eArgTypeSymbol,
|
||||
eArgTypeThreadID,
|
||||
eArgTypeThreadIndex,
|
||||
eArgTypeThreadName,
|
||||
eArgTypeUnixSignal,
|
||||
eArgTypeVarName,
|
||||
eArgTypeValue,
|
||||
eArgTypeWidth,
|
||||
eArgTypeNone,
|
||||
eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
|
||||
} CommandArgumentType;
|
||||
typedef enum CommandArgumentType
|
||||
{
|
||||
eArgTypeAddress = 0,
|
||||
eArgTypeAliasName,
|
||||
eArgTypeAliasOptions,
|
||||
eArgTypeArchitecture,
|
||||
eArgTypeBoolean,
|
||||
eArgTypeBreakpointID,
|
||||
eArgTypeBreakpointIDRange,
|
||||
eArgTypeByteSize,
|
||||
eArgTypeClassName,
|
||||
eArgTypeCommandName,
|
||||
eArgTypeCount,
|
||||
eArgTypeEndAddress,
|
||||
eArgTypeExpression,
|
||||
eArgTypeExprFormat,
|
||||
eArgTypeFilename,
|
||||
eArgTypeFormat,
|
||||
eArgTypeFrameIndex,
|
||||
eArgTypeFullName,
|
||||
eArgTypeFunctionName,
|
||||
eArgTypeIndex,
|
||||
eArgTypeLineNum,
|
||||
eArgTypeLogCategory,
|
||||
eArgTypeLogChannel,
|
||||
eArgTypeMethod,
|
||||
eArgTypeName,
|
||||
eArgTypeNewPathPrefix,
|
||||
eArgTypeNumLines,
|
||||
eArgTypeNumberPerLine,
|
||||
eArgTypeOffset,
|
||||
eArgTypeOldPathPrefix,
|
||||
eArgTypeOneLiner,
|
||||
eArgTypePath,
|
||||
eArgTypePid,
|
||||
eArgTypePlugin,
|
||||
eArgTypeProcessName,
|
||||
eArgTypeQueueName,
|
||||
eArgTypeRegisterName,
|
||||
eArgTypeRegularExpression,
|
||||
eArgTypeRunArgs,
|
||||
eArgTypeRunMode,
|
||||
eArgTypeScriptLang,
|
||||
eArgTypeSearchWord,
|
||||
eArgTypeSelector,
|
||||
eArgTypeSettingIndex,
|
||||
eArgTypeSettingKey,
|
||||
eArgTypeSettingPrefix,
|
||||
eArgTypeSettingVariableName,
|
||||
eArgTypeShlibName,
|
||||
eArgTypeSourceFile,
|
||||
eArgTypeSortOrder,
|
||||
eArgTypeStartAddress,
|
||||
eArgTypeSymbol,
|
||||
eArgTypeThreadID,
|
||||
eArgTypeThreadIndex,
|
||||
eArgTypeThreadName,
|
||||
eArgTypeUnixSignal,
|
||||
eArgTypeVarName,
|
||||
eArgTypeValue,
|
||||
eArgTypeWidth,
|
||||
eArgTypeNone,
|
||||
eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
|
||||
} CommandArgumentType;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Symbol types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum SymbolType
|
||||
{
|
||||
eSymbolTypeAny = 0,
|
||||
eSymbolTypeInvalid = 0,
|
||||
eSymbolTypeAbsolute,
|
||||
eSymbolTypeExtern,
|
||||
eSymbolTypeCode,
|
||||
eSymbolTypeData,
|
||||
eSymbolTypeTrampoline,
|
||||
eSymbolTypeRuntime,
|
||||
eSymbolTypeException,
|
||||
eSymbolTypeSourceFile,
|
||||
eSymbolTypeHeaderFile,
|
||||
eSymbolTypeObjectFile,
|
||||
eSymbolTypeCommonBlock,
|
||||
eSymbolTypeBlock,
|
||||
eSymbolTypeLocal,
|
||||
eSymbolTypeParam,
|
||||
eSymbolTypeVariable,
|
||||
eSymbolTypeVariableType,
|
||||
eSymbolTypeLineEntry,
|
||||
eSymbolTypeLineHeader,
|
||||
eSymbolTypeScopeBegin,
|
||||
eSymbolTypeScopeEnd,
|
||||
eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
|
||||
eSymbolTypeCompiler,
|
||||
eSymbolTypeInstrumentation,
|
||||
eSymbolTypeUndefined
|
||||
} SymbolType;
|
||||
|
||||
typedef enum SectionType
|
||||
{
|
||||
eSectionTypeInvalid,
|
||||
eSectionTypeCode,
|
||||
eSectionTypeContainer, // The section contains child sections
|
||||
eSectionTypeData,
|
||||
eSectionTypeDataCString, // Inlined C string data
|
||||
eSectionTypeDataCStringPointers, // Pointers to C string data
|
||||
eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
|
||||
eSectionTypeData4,
|
||||
eSectionTypeData8,
|
||||
eSectionTypeData16,
|
||||
eSectionTypeDataPointers,
|
||||
eSectionTypeDebug,
|
||||
eSectionTypeZeroFill,
|
||||
eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
|
||||
eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
|
||||
eSectionTypeDWARFDebugAbbrev,
|
||||
eSectionTypeDWARFDebugAranges,
|
||||
eSectionTypeDWARFDebugFrame,
|
||||
eSectionTypeDWARFDebugInfo,
|
||||
eSectionTypeDWARFDebugLine,
|
||||
eSectionTypeDWARFDebugLoc,
|
||||
eSectionTypeDWARFDebugMacInfo,
|
||||
eSectionTypeDWARFDebugPubNames,
|
||||
eSectionTypeDWARFDebugPubTypes,
|
||||
eSectionTypeDWARFDebugRanges,
|
||||
eSectionTypeDWARFDebugStr,
|
||||
eSectionTypeEHFrame,
|
||||
eSectionTypeOther
|
||||
|
||||
} SectionType;
|
||||
|
||||
} // namespace lldb
|
||||
|
||||
|
|
|
@ -67,73 +67,6 @@ typedef enum Vote
|
|||
eVoteYes = 1
|
||||
} Vote;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Symbol types
|
||||
//----------------------------------------------------------------------
|
||||
typedef enum SymbolType
|
||||
{
|
||||
eSymbolTypeAny = 0,
|
||||
eSymbolTypeInvalid = 0,
|
||||
eSymbolTypeAbsolute,
|
||||
eSymbolTypeExtern,
|
||||
eSymbolTypeCode,
|
||||
eSymbolTypeData,
|
||||
eSymbolTypeTrampoline,
|
||||
eSymbolTypeRuntime,
|
||||
eSymbolTypeException,
|
||||
eSymbolTypeSourceFile,
|
||||
eSymbolTypeHeaderFile,
|
||||
eSymbolTypeObjectFile,
|
||||
eSymbolTypeCommonBlock,
|
||||
eSymbolTypeBlock,
|
||||
eSymbolTypeLocal,
|
||||
eSymbolTypeParam,
|
||||
eSymbolTypeVariable,
|
||||
eSymbolTypeVariableType,
|
||||
eSymbolTypeLineEntry,
|
||||
eSymbolTypeLineHeader,
|
||||
eSymbolTypeScopeBegin,
|
||||
eSymbolTypeScopeEnd,
|
||||
eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
|
||||
eSymbolTypeCompiler,
|
||||
eSymbolTypeInstrumentation,
|
||||
eSymbolTypeUndefined
|
||||
} SymbolType;
|
||||
|
||||
typedef enum SectionType
|
||||
{
|
||||
eSectionTypeInvalid,
|
||||
eSectionTypeCode,
|
||||
eSectionTypeContainer, // The section contains child sections
|
||||
eSectionTypeData,
|
||||
eSectionTypeDataCString, // Inlined C string data
|
||||
eSectionTypeDataCStringPointers, // Pointers to C string data
|
||||
eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
|
||||
eSectionTypeData4,
|
||||
eSectionTypeData8,
|
||||
eSectionTypeData16,
|
||||
eSectionTypeDataPointers,
|
||||
eSectionTypeDebug,
|
||||
eSectionTypeZeroFill,
|
||||
eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
|
||||
eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
|
||||
eSectionTypeDWARFDebugAbbrev,
|
||||
eSectionTypeDWARFDebugAranges,
|
||||
eSectionTypeDWARFDebugFrame,
|
||||
eSectionTypeDWARFDebugInfo,
|
||||
eSectionTypeDWARFDebugLine,
|
||||
eSectionTypeDWARFDebugLoc,
|
||||
eSectionTypeDWARFDebugMacInfo,
|
||||
eSectionTypeDWARFDebugPubNames,
|
||||
eSectionTypeDWARFDebugPubTypes,
|
||||
eSectionTypeDWARFDebugRanges,
|
||||
eSectionTypeDWARFDebugStr,
|
||||
eSectionTypeEHFrame,
|
||||
eSectionTypeOther
|
||||
|
||||
} SectionType;
|
||||
|
||||
|
||||
typedef enum ArchitectureType
|
||||
{
|
||||
eArchTypeInvalid,
|
||||
|
|
|
@ -70,7 +70,7 @@ const char *
|
|||
GetVoteAsCString (Vote vote);
|
||||
|
||||
const char *
|
||||
GetSectionTypeAsCString (SectionType sect_type);
|
||||
GetSectionTypeAsCString (lldb::SectionType sect_type);
|
||||
|
||||
bool
|
||||
NameMatches (const char *name, NameMatchType match_type, const char *match);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "lldb/API/SBStream.h"
|
||||
#include "lldb/Core/Address.h"
|
||||
#include "lldb/Core/Log.h"
|
||||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Host/Mutex.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
|
||||
|
@ -170,3 +171,31 @@ SBAddress::GetDescription (SBStream &description)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
SectionType
|
||||
SBAddress::GetSectionType ()
|
||||
{
|
||||
if (m_opaque_ap.get())
|
||||
{
|
||||
const Section *section = m_opaque_ap->GetSection();
|
||||
if (section)
|
||||
return section->GetType();
|
||||
}
|
||||
return eSectionTypeInvalid;
|
||||
}
|
||||
|
||||
|
||||
SBModule
|
||||
SBAddress::GetModule ()
|
||||
{
|
||||
SBModule sb_module;
|
||||
if (m_opaque_ap.get())
|
||||
{
|
||||
const Module *module = m_opaque_ap->GetModule();
|
||||
if (module)
|
||||
*sb_module = module->GetSP();
|
||||
}
|
||||
return sb_module;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -198,3 +198,11 @@ SBSymbol::GetPrologueByteSize ()
|
|||
return m_opaque_ptr->GetPrologueByteSize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SymbolType
|
||||
SBSymbol::GetType ()
|
||||
{
|
||||
if (m_opaque_ptr)
|
||||
return m_opaque_ptr->GetType();
|
||||
return eSymbolTypeInvalid;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ Module::~Module()
|
|||
|
||||
|
||||
ModuleSP
|
||||
Module::GetSP ()
|
||||
Module::GetSP () const
|
||||
{
|
||||
return ModuleList::GetModuleSP (this);
|
||||
}
|
||||
|
|
|
@ -168,7 +168,9 @@ public:
|
|||
const DWARFDebugRanges* DebugRanges() const;
|
||||
|
||||
const lldb_private::DataExtractor&
|
||||
GetCachedSectionData (uint32_t got_flag, lldb_private::SectionType sect_type, lldb_private::DataExtractor &data);
|
||||
GetCachedSectionData (uint32_t got_flag,
|
||||
lldb::SectionType sect_type,
|
||||
lldb_private::DataExtractor &data);
|
||||
|
||||
static bool
|
||||
SupportedVersion(uint16_t version);
|
||||
|
|
Loading…
Reference in New Issue