13#include "lldb/Host/Config.h"
31#include "llvm/Config/llvm-config.h"
32#include "llvm/Support/MemoryBuffer.h"
65 return "Compact C Type Format Symbol Reader";
79 const SectionList *section_list = module_sp->GetSectionList();
90 if (
m_data.GetByteSize() == 0)
96 LLDB_LOG(log,
"Parsing Compact C Type format for {0}", module_desc.
GetData());
101 constexpr size_t ctf_header_size =
sizeof(
ctf_header_t);
102 if (!
m_data.ValidOffsetForDataOfSize(offset, ctf_header_size)) {
103 LLDB_LOG(log,
"CTF parsing failed: insufficient data for CTF header");
124 LLDB_LOG(log,
"CTF parsing failed: invalid magic: {0:x}",
130 LLDB_LOG(log,
"CTF parsing failed: unsupported version: {0}",
135 LLDB_LOG(log,
"Parsed valid CTF preamble: version {0}, flags {1:x}",
144 const std::size_t decompressed_size = ctf_header.
stroff + ctf_header.
strlen;
146 std::make_shared<DataBufferHeap>(decompressed_size, 0x0);
149 memset(&zstr, 0,
sizeof(zstr));
150 zstr.next_in = (Bytef *)
const_cast<uint8_t *
>(
m_data.GetDataStart() +
152 zstr.avail_in =
m_data.BytesLeft(offset);
154 (Bytef *)
const_cast<uint8_t *
>(decompressed_data->GetBytes());
155 zstr.avail_out = decompressed_size;
157 int rc = inflateInit(&zstr);
159 LLDB_LOG(log,
"CTF parsing failed: inflate initialization error: {0}",
164 rc = inflate(&zstr, Z_FINISH);
165 if (rc != Z_STREAM_END) {
166 LLDB_LOG(log,
"CTF parsing failed: inflate error: {0}", zError(rc));
170 rc = inflateEnd(&zstr);
172 LLDB_LOG(log,
"CTF parsing failed: inflate end error: {0}", zError(rc));
176 if (zstr.total_out != decompressed_size) {
178 "CTF parsing failed: decompressed size ({0}) doesn't match "
179 "expected size ([1})",
180 zstr.total_out, decompressed_size);
185 m_data.GetAddressByteSize());
190 "CTF parsing failed: data is compressed but no zlib inflate support");
198 "CTF parsing failed: invalid label section offset in header: {0}",
205 "CTF parsing failed: invalid object section offset in header: {0}",
213 "CTF parsing failed: invalid function section offset in header: {0}",
220 "CTF parsing failed: invalid type section offset in header: {0}",
227 "CTF parsing failed: invalid string section offset in header: {0}",
234 if (!
m_data.ValidOffset(str_end_offset - 1)) {
236 "CTF parsing failed: invalid string section length in header: {0}",
244 "CTF parsing failed: invalid parent label offset: {0} exceeds end "
245 "of string section ({1})",
246 ctf_header.
parlabel, str_end_offset);
252 "CTF parsing failed: invalid parent name offset: {0} exceeds end "
253 "of string section ({1})",
254 ctf_header.
parname, str_end_offset);
259 "Parsed valid CTF header: lbloff = {0}, objtoff = {1}, funcoff = "
260 "{2}, typeoff = {3}, stroff = {4}, strlen = {5}",
271 if (
auto err = type_system_or_err.takeError()) {
272 LLDB_LOG_ERROR(log, std::move(err),
"Unable to get type system: {0}");
276 auto ts = *type_system_or_err;
277 m_ast = llvm::dyn_cast_or_null<TypeSystemClang>(ts.get());
287 if (!
m_data.ValidOffset(offset))
289 const char *str =
m_data.GetCStr(&offset);
292 return llvm::StringRef(str);
298 return ((data)&0xff000000) >> 24;
304 return (data)&0x0000ffff;
310 return ((data)&0xf800) >> 11;
324 return clang::TagTypeKind::Struct;
326 return clang::TagTypeKind::Union;
329 return clang::TagTypeKind::Struct;
333llvm::Expected<TypeSP>
338 return llvm::make_error<llvm::StringError>(
339 llvm::formatv(
"unsupported integer type: no corresponding basic clang "
342 llvm::inconvertibleErrorCode());
348 bool compiler_type_is_signed =
false;
350 return llvm::make_error<llvm::StringError>(
352 "Found compiler type for '{0}' but it's not an integer type: {1}",
355 llvm::inconvertibleErrorCode());
359 if (compiler_type_is_signed != type_is_signed)
360 return llvm::make_error<llvm::StringError>(
361 llvm::formatv(
"Found integer compiler type for {0} but compiler type "
362 "is {1} and {0} is {2}",
364 compiler_type_is_signed ?
"signed" :
"unsigned",
365 type_is_signed ?
"signed" :
"unsigned"),
366 llvm::inconvertibleErrorCode());
376llvm::Expected<lldb::TypeSP>
380 return llvm::make_error<llvm::StringError>(
381 llvm::formatv(
"Could not find modified type: {0}", ctf_modifier.
type),
382 llvm::inconvertibleErrorCode());
386 switch (ctf_modifier.
kind) {
400 return llvm::make_error<llvm::StringError>(
401 llvm::formatv(
"ParseModifier called with unsupported kind: {0}",
403 llvm::inconvertibleErrorCode());
412llvm::Expected<lldb::TypeSP>
415 if (!underlying_type)
416 return llvm::make_error<llvm::StringError>(
417 llvm::formatv(
"Could not find typedef underlying type: {0}",
419 llvm::inconvertibleErrorCode());
422 clang::DeclContext *decl_ctx =
m_ast->GetTranslationUnitDecl();
424 ctf_typedef.
name.data(),
m_ast->CreateDeclContext(decl_ctx), 0);
432llvm::Expected<lldb::TypeSP>
436 return llvm::make_error<llvm::StringError>(
437 llvm::formatv(
"Could not find array element type: {0}", ctf_array.
type),
438 llvm::inconvertibleErrorCode());
440 auto element_size_or_err = element_type->
GetByteSize(
nullptr);
441 if (!element_size_or_err)
442 return element_size_or_err.takeError();
444 uint64_t size = ctf_array.
nelems * *element_size_or_err;
456llvm::Expected<lldb::TypeSP>
466 m_ast->AddEnumerationValueToEnumerationType(
467 enum_type, value_decl, value.
name.data(), value.
value, ctf_enum.
size);
476llvm::Expected<lldb::TypeSP>
478 std::vector<CompilerType> arg_types;
479 for (uint32_t arg : ctf_function.
args) {
481 arg_types.push_back(arg_type->GetFullCompilerType());
486 return llvm::make_error<llvm::StringError>(
487 llvm::formatv(
"Could not find function return type: {0}",
489 llvm::inconvertibleErrorCode());
493 clang::CallingConv::CC_C);
501llvm::Expected<lldb::TypeSP>
520 const CTFType *ctf_type = it->second;
521 assert(ctf_type &&
"m_compiler_types should only contain valid CTF types");
524 assert(llvm::isa<CTFRecord>(ctf_type));
533 "Cannot complete type {0} because field {1} is incomplete",
540 m_ast->StartTagDeclarationDefinition(compiler_type);
543 assert(field_type &&
"field must be complete");
544 const uint32_t field_size =
545 llvm::expectedToOptional(field_type->
GetByteSize(
nullptr)).value_or(0);
550 m_ast->CompleteTagDeclarationDefinition(compiler_type);
560llvm::Expected<lldb::TypeSP>
573 return llvm::make_error<llvm::StringError>(
574 "cannot create type for unparsed type", llvm::inconvertibleErrorCode());
576 switch (ctf_type->
kind) {
600 return llvm::make_error<llvm::StringError>(
601 llvm::formatv(
"unsupported type (uid = {0}, name = {1}, kind = {2})",
603 llvm::inconvertibleErrorCode());
605 llvm_unreachable(
"Unexpected CTF type kind");
608llvm::Expected<std::unique_ptr<CTFType>>
617 const uint32_t variable_length =
GetVLen(ctf_stype.
info);
618 const uint32_t type = ctf_stype.
GetType();
619 const uint32_t size = ctf_stype.
GetSize();
623 const uint32_t vdata =
m_data.GetU32(&offset);
626 return std::make_unique<CTFInteger>(uid, name,
bits, encoding);
629 return std::make_unique<CTFConst>(uid, type);
631 return std::make_unique<CTFPointer>(uid, type);
633 return std::make_unique<CTFRestrict>(uid, type);
635 return std::make_unique<CTFVolatile>(uid, type);
637 return std::make_unique<CTFTypedef>(uid, name, type);
639 const uint32_t type =
m_data.GetU32(&offset);
640 const uint32_t index =
m_data.GetU32(&offset);
641 const uint32_t nelems =
m_data.GetU32(&offset);
642 return std::make_unique<CTFArray>(uid, name, type, index, nelems);
645 std::vector<CTFEnum::Value> values;
646 for (uint32_t i = 0; i < variable_length; ++i) {
647 const uint32_t value_name =
m_data.GetU32(&offset);
648 const uint32_t value =
m_data.GetU32(&offset);
649 values.emplace_back(
ReadString(value_name), value);
651 return std::make_unique<CTFEnum>(uid, name, variable_length, size, values);
654 std::vector<uint32_t> args;
655 bool variadic =
false;
656 for (uint32_t i = 0; i < variable_length; ++i) {
657 const uint32_t arg_uid =
m_data.GetU32(&offset);
663 args.push_back(arg_uid);
667 if (variable_length % 2 == 1)
669 return std::make_unique<CTFFunction>(uid, name, variable_length, type, args,
674 std::vector<CTFRecord::Field> fields;
675 for (uint32_t i = 0; i < variable_length; ++i) {
676 const uint32_t field_name =
m_data.GetU32(&offset);
677 const uint32_t type =
m_data.GetU32(&offset);
678 uint64_t field_offset = 0;
680 field_offset =
m_data.GetU16(&offset);
683 const uint32_t offset_hi =
m_data.GetU32(&offset);
684 const uint32_t offset_lo =
m_data.GetU32(&offset);
685 field_offset = (((uint64_t)offset_hi) << 32) | ((uint64_t)offset_lo);
687 fields.emplace_back(
ReadString(field_name), type, field_offset);
689 return std::make_unique<CTFRecord>(
static_cast<CTFType::Kind>(kind), uid,
690 name, variable_length, size, fields);
693 return std::make_unique<CTFForward>(uid, name);
695 return std::make_unique<CTFType>(
static_cast<CTFType::Kind>(kind), uid,
699 offset += (variable_length *
sizeof(uint32_t));
703 return llvm::make_error<llvm::StringError>(
704 llvm::formatv(
"unsupported type (name = {0}, kind = {1}, vlength = {2})",
705 name, kind, variable_length),
706 llvm::inconvertibleErrorCode());
726 while (type_offset < type_offset_end) {
727 llvm::Expected<std::unique_ptr<CTFType>> type_or_error =
730 m_ctf_types[(*type_or_error)->uid] = std::move(*type_or_error);
733 "Failed to parse type {1} at offset {2}: {0}", type_uid,
748 CTFType *ctf_type = ctf_type_it->second.get();
749 if (!llvm::isa<CTFRecord>(ctf_type))
757 CTFType *ctf_type = t.second.get();
758 assert(ctf_type &&
"invalid type in m_ctf_types");
759 assert(llvm::isa<CTFRecord>(ctf_type) &&
"leaking non record type");
784 LLDB_LOG(log,
"Parsing CTF functions");
789 uint32_t symbol_idx = 0;
791 while (function_offset < function_offset_end) {
792 const uint32_t info =
m_data.GetU32(&function_offset);
793 const uint16_t kind =
GetKind(info);
794 const uint16_t variable_length =
GetVLen(info);
807 const uint32_t ret_uid =
m_data.GetU32(&function_offset);
808 const uint32_t num_args = variable_length;
810 std::vector<CompilerType> arg_types;
811 arg_types.reserve(num_args);
813 bool is_variadic =
false;
814 for (uint32_t i = 0; i < variable_length; i++) {
815 const uint32_t arg_uid =
m_data.GetU32(&function_offset);
837 arg_types, is_variadic, 0, clang::CallingConv::CC_C);
843 m_types[function_type_uid] = type_sp;
847 FunctionSP function_sp = std::make_shared<Function>(
848 &cu, func_uid, function_type_uid, symbol->
GetMangled(), type_sp.get(),
865 const ArchSpec &architecture = module_sp->GetArchitecture();
871 stream.
PutHex8(llvm::dwarf::DW_OP_addr);
875 std::make_shared<DataBufferHeap>(stream.
GetData(), stream.
GetSize());
895 Symtab *symtab = module_sp->GetSymtab();
900 LLDB_LOG(log,
"Parsing CTF objects");
905 uint32_t symbol_idx = 0;
907 while (object_offset < object_offset_end) {
908 const uint32_t type_uid =
m_data.GetU32(&object_offset);
914 ranges.
Append(symbol->GetFileAddress(), symbol->GetByteSize());
916 auto type_sp = std::make_shared<SymbolFileType>(*
this, type_uid);
922 m_variables.emplace_back(std::make_shared<Variable>(
923 variable_type_uid, symbol->GetName().AsCString(),
925 m_comp_unit_sp.get(), ranges, &decl, location, symbol->IsExternal(),
947 SymbolContextItem resolve_scope,
953 uint32_t resolved_flags = 0;
956 if (resolve_scope & eSymbolContextSymbol) {
960 resolved_flags |= eSymbolContextSymbol;
964 if (resolve_scope & eSymbolContextFunction) {
967 function_sp->GetAddressRanges(), [&](
const AddressRange range) {
968 return range.ContainsFileAddress(so_addr.GetFileAddress());
971 resolved_flags |= eSymbolContextFunction;
978 if (resolve_scope & eSymbolContextVariable) {
980 if (variable_sp->LocationIsValidForAddress(so_addr.
GetFileAddress())) {
987 return resolved_flags;
1007 auto type_it =
m_types.find(type_uid);
1009 return type_it->second.get();
1015 CTFType *ctf_type = ctf_type_it->second.get();
1016 assert(ctf_type &&
"m_ctf_types should only contain valid CTF types");
1017 assert(ctf_type->
uid == type_uid &&
1018 "CTF type UID doesn't match UID in m_ctf_types");
1022 llvm::Expected<TypeSP> type_or_error =
CreateType(ctf_type);
1023 if (!type_or_error) {
1025 "Failed to create type for {1}: {0}", ctf_type->
uid);
1029 TypeSP type_sp = *type_or_error;
1033 type_sp->Dump(&ss,
true);
1034 LLDB_LOGV(log,
"Adding type {0}: {1}", type_sp->GetID(),
1035 llvm::StringRef(ss.
GetString()).rtrim());
1040 return type_sp.get();
1051 if (type_sp && type_sp->GetName() == name) {
1053 if (results.
Done(match))
1066 if (matches == max_matches)
1068 if (type_sp && regex.
Execute(type_sp->GetName()))
1082 if (function_sp && function_sp->GetName() == name) {
1092 bool include_inlines,
1095 if (function_sp && regex.
Execute(function_sp->GetName())) {
1112 if (matches == max_matches)
1114 if (variable_sp && variable_sp->GetName() == name) {
1128 if (matches == max_matches)
1130 if (variable_sp && regex.
Execute(variable_sp->GetName())) {
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOG_ERROR(log, error,...)
#define LLDB_LOGV(log,...)
#define LLDB_PLUGIN_DEFINE(PluginName)
uint32_t GetKind(uint32_t data)
Return the type kind encoded in the given data.
static DWARFExpression CreateDWARFExpression(ModuleSP module_sp, const Symbol &symbol)
uint32_t GetVLen(uint32_t data)
Return the variable length encoded in the given data.
static clang::TagTypeKind TranslateRecordKind(CTFType::Kind type)
static uint32_t GetEncoding(uint32_t data)
Return the integer display representation encoded in the given data.
static uint32_t GetBits(uint32_t data)
Return the integral width in bits encoded in the given data.
static uint32_t GetBytes(uint32_t bits)
A section + offset based address range class.
A section + offset based address class.
lldb::addr_t GetFileAddress() const
Get the file address.
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
uint32_t GetDataByteSize() const
Architecture data byte width accessor.
lldb::ByteOrder GetByteOrder() const
Returns the byte order for the architecture specification.
A class that describes a compilation unit.
void AddFunction(lldb::FunctionSP &function_sp)
Add a function to this compile unit.
Represents a generic declaration context in a program.
Generic representation of a type in a programming language.
CompilerType AddConstModifier() const
Return a new CompilerType adds a const modifier to this type if this type is valid and the type syste...
ConstString GetDisplayTypeName() const
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
lldb::opaque_compiler_type_t GetOpaqueQualType() const
CompilerType AddVolatileModifier() const
Return a new CompilerType adds a volatile modifier to this type if this type is valid and the type sy...
CompilerType AddRestrictModifier() const
Return a new CompilerType adds a restrict modifier to this type if this type is valid and the type sy...
bool IsIntegerType(bool &is_signed) const
CompilerType CreateTypedef(const char *name, const CompilerDeclContext &decl_ctx, uint32_t payload) const
Create a typedef to this type using "name" as the name of the typedef this type is valid and the type...
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single ...
"lldb/Expression/DWARFExpression.h" Encapsulates a DWARF location expression and interprets it.
void SetRegisterKind(lldb::RegisterKind reg_kind)
Set the call-frame-info style register kind.
A class that describes the declaration location of a lldb object.
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
A class that encapsulates name lookup information.
ConstString GetLookupName() const
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
void Append(const Entry &entry)
bool Execute(llvm::StringRef string, llvm::SmallVectorImpl< llvm::StringRef > *matches=nullptr) const
Execute a regular expression match using the compiled regular expression that is already in this obje...
lldb::SectionSP FindSectionByType(lldb::SectionType sect_type, bool check_children, size_t start_idx=0) const
const char * GetData() const
const char * GetData() const
llvm::StringRef GetString() const
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
size_t size_t PutHex8(uint8_t uvalue)
Append an uint8_t value in the hexadecimal format to the stream.
@ eBinary
Get and put data as binary instead of as the default string mode.
size_t PutMaxHex64(uint64_t uvalue, size_t byte_size, lldb::ByteOrder byte_order=lldb::eByteOrderInvalid)
Defines a list of symbol context objects.
void Append(const SymbolContext &sc)
Append a new symbol context to the list.
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
CompileUnit * comp_unit
The CompileUnit for a given query.
Variable * variable
The global variable matching the given query.
Symbol * symbol
The Symbol for a given query.
void FindTypesByRegex(const lldb_private::RegularExpression ®ex, uint32_t max_matches, lldb_private::TypeMap &types)
Type * ResolveTypeUID(lldb::user_id_t type_uid) override
static constexpr uint16_t g_ctf_magic
llvm::Expected< lldb::TypeSP > CreateFunction(const CTFFunction &ctf_function)
void AddSymbols(Symtab &symtab) override
bool CompleteType(CompilerType &compiler_type) override
lldb::CompUnitSP m_comp_unit_sp
std::vector< lldb::FunctionSP > m_functions
static char ID
LLVM RTTI support.
llvm::Expected< lldb::TypeSP > CreateTypedef(const CTFTypedef &ctf_typedef)
size_t ParseFunctions(CompileUnit &comp_unit) override
static llvm::StringRef GetPluginDescriptionStatic()
llvm::DenseMap< lldb::opaque_compiler_type_t, const CTFType * > m_compiler_types
To complete types, we need a way to map (imcomplete) compiler types back to parsed CTF types.
void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
llvm::Expected< lldb::TypeSP > CreateArray(const CTFArray &ctf_array)
uint32_t CalculateAbilities() override
size_t ParseVariablesForContext(const SymbolContext &sc) override
static lldb_private::SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
lldb::offset_t m_body_offset
The start offset of the CTF body into m_data.
static constexpr uint16_t g_ctf_field_threshold
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
static llvm::StringRef GetPluginNameStatic()
size_t ParseObjects(CompileUnit &comp_unit)
llvm::Expected< lldb::TypeSP > CreateForward(const CTFForward &ctf_forward)
llvm::Expected< lldb::TypeSP > CreateEnum(const CTFEnum &ctf_enum)
void InitializeObject() override
Initialize the SymbolFile object.
void FindTypes(const lldb_private::TypeQuery &match, lldb_private::TypeResults &results) override
Find types using a type-matching object that contains all search parameters.
llvm::StringRef ReadString(lldb::offset_t offset) const
llvm::Expected< lldb::TypeSP > CreateRecord(const CTFRecord &ctf_record)
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
llvm::Expected< lldb::TypeSP > CreateInteger(const CTFInteger &ctf_integer)
static constexpr uint8_t g_ctf_version
llvm::DenseMap< lldb::user_id_t, lldb::TypeSP > m_types
Parsed LLDB types.
std::vector< lldb::VariableSP > m_variables
llvm::DenseMap< lldb::user_id_t, std::unique_ptr< CTFType > > m_ctf_types
Parsed CTF types.
llvm::Expected< lldb::TypeSP > CreateModifier(const CTFModifier &ctf_modifier)
llvm::Expected< lldb::TypeSP > CreateType(CTFType *ctf_type)
SymbolFileCTF(lldb::ObjectFileSP objfile_sp)
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
llvm::Expected< std::unique_ptr< CTFType > > ParseType(lldb::offset_t &offset, lldb::user_id_t uid)
std::optional< ctf_header_t > m_header
size_t ParseTypes(CompileUnit &cu) override
ObjectFile * GetObjectFile() override
virtual TypeList & GetTypeList()
lldb::ObjectFileSP m_objfile_sp
SymbolFileCommon(lldb::ObjectFileSP objfile_sp)
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
lldb::TypeSP MakeType(lldb::user_id_t uid, ConstString name, std::optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, Type::EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, Type::ResolveState compiler_type_resolve_state, uint32_t opaque_payload=0) override
This function is used to create types that belong to a SymbolFile.
Provides public interface for all SymbolFiles.
virtual std::recursive_mutex & GetModuleMutex() const
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
lldb::addr_t GetFileAddress() const
lldb::addr_t GetByteSize() const
ConstString GetName() const
Address GetAddress() const
Symbol * FindSymbolWithType(lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility, uint32_t &start_idx)
void Insert(const lldb::TypeSP &type)
A class that contains all state required for type lookups.
ConstString GetTypeBasename() const
Get the type basename to use when searching the type indexes in each SymbolFile object.
This class tracks the state and results of a TypeQuery.
bool InsertUnique(const lldb::TypeSP &type_sp)
When types that match a TypeQuery are found, this API is used to insert the matching types.
bool Done(const TypeQuery &query) const
Check if the type matching has found all of the matches that it needs.
bool AlreadySearched(lldb_private::SymbolFile *sym_file)
Check if a SymbolFile object has already been searched by this type match object.
static clang::FieldDecl * AddFieldToRecordType(const CompilerType &type, llvm::StringRef name, const CompilerType &field_type, lldb::AccessType access, uint32_t bitfield_bit_size)
static lldb::BasicType GetBasicTypeEnumeration(llvm::StringRef name)
static bool CompleteTagDeclarationDefinition(const CompilerType &type)
@ eEncodingIsUID
This type is the type whose UID is m_encoding_uid.
CompilerType GetFullCompilerType()
llvm::Expected< uint64_t > GetByteSize(ExecutionContextScope *exe_scope)
void AddVariable(const lldb::VariableSP &var_sp)
RangeVector< lldb::addr_t, lldb::addr_t > RangeList
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
static uint32_t bits(const uint32_t val, const uint32_t msbit, const uint32_t lsbit)
std::shared_ptr< lldb_private::Function > FunctionSP
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
@ eLanguageTypeC
Non-standardized C, such as K&R.
std::shared_ptr< lldb_private::Type > TypeSP
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::Variable > VariableSP
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::Section > SectionSP
std::shared_ptr< lldb_private::Module > ModuleSP
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
@ eValueTypeVariableGlobal
globals variable
@ eRegisterKindDWARF
the register numbers seen DWARF
std::vector< Value > values
std::vector< uint32_t > args
std::vector< Field > fields