LLDB mainline
lldb_private::FormatEntity::Entry Struct Reference

#include <FormatEntity.h>

Classes

struct  Definition

Public Types

enum class  Type {
  Invalid , ParentNumber , ParentString , EscapeCode ,
  Root , String , Scope , Variable ,
  VariableSynthetic , ScriptVariable , ScriptVariableSynthetic , AddressLoad ,
  AddressFile , AddressLoadOrFile , ProcessID , ProcessFile ,
  ScriptProcess , ThreadID , ThreadProtocolID , ThreadIndexID ,
  ThreadName , ThreadQueue , ThreadStopReason , ThreadStopReasonRaw ,
  ThreadReturnValue , ThreadCompletedExpression , ScriptThread , ThreadInfo ,
  TargetArch , TargetFile , ScriptTarget , ModuleFile ,
  File , Lang , FrameIndex , FrameNoDebug ,
  FrameRegisterPC , FrameRegisterSP , FrameRegisterFP , FrameRegisterFlags ,
  FrameRegisterByName , FrameIsArtificial , FrameKind , ScriptFrame ,
  FunctionID , FunctionDidChange , FunctionInitialFunction , FunctionName ,
  FunctionNameWithArgs , FunctionNameNoArgs , FunctionMangledName , FunctionPrefix ,
  FunctionScope , FunctionBasename , FunctionNameQualifiers , FunctionTemplateArguments ,
  FunctionFormattedArguments , FunctionReturnLeft , FunctionReturnRight , FunctionQualifiers ,
  FunctionSuffix , FunctionAddrOffset , FunctionAddrOffsetConcrete , FunctionLineOffset ,
  FunctionPCOffset , FunctionInitial , FunctionChanged , FunctionIsOptimized ,
  FunctionIsInlined , LineEntryFile , LineEntryLineNumber , LineEntryColumn ,
  LineEntryStartAddress , LineEntryEndAddress , CurrentPCArrow , ProgressCount ,
  ProgressMessage , Separator
}

Public Member Functions

 Entry (Type t=Type::Invalid, const char *s=nullptr, const char *f=nullptr)
 Entry (llvm::StringRef s)
 Entry (char ch)
void AppendChar (char ch)
void AppendText (const llvm::StringRef &s)
void AppendText (const char *cstr)
void AppendEntry (const Entry &&entry)
void StartAlternative ()
void Clear ()
void Dump (Stream &s, int depth=0) const
bool operator== (const Entry &rhs) const
 operator bool () const
std::vector< Entry > & GetChildren ()

Static Public Member Functions

template<size_t N>
static constexpr Definition DefinitionWithChildren (const char *name, const FormatEntity::Entry::Type t, const Definition(&children)[N], bool keep_separator=false)
static const char * TypeToCString (Type t)

Public Attributes

std::string string
std::string printf_format
Type type = Type::Invalid
lldb::Format fmt = lldb::eFormatDefault
lldb::addr_t number = 0
bool deref = false
llvm::SmallVector< std::vector< Entry >, 1 > children_stack
 A stack of children entries, used by Scope entries to provide alterantive children.
size_t level = 0

Detailed Description

Definition at line 39 of file FormatEntity.h.

Member Enumeration Documentation

◆ Type

Enumerator
Invalid 
ParentNumber 
ParentString 
EscapeCode 
Root 
String 
Scope 
Variable 
VariableSynthetic 
ScriptVariable 
ScriptVariableSynthetic 
AddressLoad 
AddressFile 
AddressLoadOrFile 
ProcessID 
ProcessFile 
ScriptProcess 
ThreadID 
ThreadProtocolID 
ThreadIndexID 
ThreadName 
ThreadQueue 
ThreadStopReason 
ThreadStopReasonRaw 
ThreadReturnValue 
ThreadCompletedExpression 
ScriptThread 
ThreadInfo 
TargetArch 
TargetFile 
ScriptTarget 
ModuleFile 
File 
Lang 
FrameIndex 
FrameNoDebug 
FrameRegisterPC 
FrameRegisterSP 
FrameRegisterFP 
FrameRegisterFlags 
FrameRegisterByName 
FrameIsArtificial 
FrameKind 
ScriptFrame 
FunctionID 
FunctionDidChange 
FunctionInitialFunction 
FunctionName 
FunctionNameWithArgs 
FunctionNameNoArgs 
FunctionMangledName 
FunctionPrefix 
FunctionScope 
FunctionBasename 
FunctionNameQualifiers 
FunctionTemplateArguments 
FunctionFormattedArguments 
FunctionReturnLeft 
FunctionReturnRight 
FunctionQualifiers 
FunctionSuffix 
FunctionAddrOffset 
FunctionAddrOffsetConcrete 
FunctionLineOffset 
FunctionPCOffset 
FunctionInitial 
FunctionChanged 
FunctionIsOptimized 
FunctionIsInlined 
LineEntryFile 
LineEntryLineNumber 
LineEntryColumn 
LineEntryStartAddress 
LineEntryEndAddress 
CurrentPCArrow 
ProgressCount 
ProgressMessage 
Separator 

Definition at line 40 of file FormatEntity.h.

Constructor & Destructor Documentation

◆ Entry() [1/3]

FormatEntity::Entry::Entry ( Type t = Type::Invalid,
const char * s = nullptr,
const char * f = nullptr )

◆ Entry() [2/3]

FormatEntity::Entry::Entry ( llvm::StringRef s)

Definition at line 293 of file FormatEntity.cpp.

References children_stack, and string.

◆ Entry() [3/3]

FormatEntity::Entry::Entry ( char ch)

Definition at line 296 of file FormatEntity.cpp.

References children_stack, printf_format, and string.

Member Function Documentation

◆ AppendChar()

void FormatEntity::Entry::AppendChar ( char ch)

Definition at line 305 of file FormatEntity.cpp.

References GetChildren(), and String.

Referenced by ParseInternal().

◆ AppendEntry()

void FormatEntity::Entry::AppendEntry ( const Entry && entry)

Definition at line 325 of file FormatEntity.cpp.

References Entry(), and GetChildren().

Referenced by ParseInternal().

◆ AppendText() [1/2]

void FormatEntity::Entry::AppendText ( const char * cstr)

Definition at line 321 of file FormatEntity.cpp.

References AppendText().

◆ AppendText() [2/2]

void FormatEntity::Entry::AppendText ( const llvm::StringRef & s)

Definition at line 313 of file FormatEntity.cpp.

References GetChildren(), and String.

Referenced by AppendText(), and ParseInternal().

◆ Clear()

void lldb_private::FormatEntity::Entry::Clear ( )
inline

◆ DefinitionWithChildren()

template<size_t N>
constexpr Definition lldb_private::FormatEntity::Entry::DefinitionWithChildren ( const char * name,
const FormatEntity::Entry::Type t,
const Definition(&) children[N],
bool keep_separator = false )
inlinestaticconstexpr

Definition at line 158 of file FormatEntity.h.

◆ Dump()

◆ GetChildren()

std::vector< Entry > & FormatEntity::Entry::GetChildren ( )

Definition at line 300 of file FormatEntity.cpp.

References children_stack, and level.

Referenced by AppendChar(), AppendEntry(), and AppendText().

◆ operator bool()

lldb_private::FormatEntity::Entry::operator bool ( ) const
inline

Definition at line 211 of file FormatEntity.h.

References Invalid, and type.

◆ operator==()

bool lldb_private::FormatEntity::Entry::operator== ( const Entry & rhs) const
inline

Definition at line 195 of file FormatEntity.h.

References children_stack, deref, Entry(), fmt, printf_format, string, and type.

◆ StartAlternative()

void FormatEntity::Entry::StartAlternative ( )

Definition at line 330 of file FormatEntity.cpp.

References children_stack, level, Scope, and type.

Referenced by ParseInternal().

◆ TypeToCString()

Member Data Documentation

◆ children_stack

llvm::SmallVector<std::vector<Entry>, 1> lldb_private::FormatEntity::Entry::children_stack

A stack of children entries, used by Scope entries to provide alterantive children.

All other entries have a stack of size 1.

Definition at line 221 of file FormatEntity.h.

Referenced by Clear(), Dump(), Entry(), Entry(), Entry(), lldb_private::FormatEntity::Format(), GetChildren(), operator==(), and StartAlternative().

◆ deref

bool lldb_private::FormatEntity::Entry::deref = false

Definition at line 228 of file FormatEntity.h.

Referenced by Clear(), Dump(), DumpValue(), operator==(), and ParseInternal().

◆ fmt

lldb::Format lldb_private::FormatEntity::Entry::fmt = lldb::eFormatDefault

Definition at line 226 of file FormatEntity.h.

Referenced by Clear(), Dump(), DumpValue(), operator==(), and ParseInternal().

◆ level

size_t lldb_private::FormatEntity::Entry::level = 0

Definition at line 222 of file FormatEntity.h.

Referenced by Clear(), GetChildren(), and StartAlternative().

◆ number

lldb::addr_t lldb_private::FormatEntity::Entry::number = 0

◆ printf_format

std::string lldb_private::FormatEntity::Entry::printf_format

◆ string

std::string lldb_private::FormatEntity::Entry::string

◆ type


The documentation for this struct was generated from the following files: