26 return "Itanium ABI runtime";
45 llvm::StringRef symbol_name =
49 ": static-type = '%s' has vtable symbol '%s'\n",
54 llvm::StringRef class_name = symbol_name;
58 std::string lookup_name(
"::");
59 lookup_name.append(class_name.data(), class_name.size());
62 bool any_found =
false;
72 ": static-type = '%s' has dynamic type: uid={0x%" PRIx64
73 "}, type-name='%s'\n",
76 type_sp->GetName().GetCString());
104 class_type_or_name =
GetTypeInfo(in_value, vtable_info);
106 if (!class_type_or_name)
128 const uint32_t addr_byte_size =
m_process->GetAddressByteSize();
130 vtable_load_addr - 2 * addr_byte_size;
133 if (offset_to_top_location >= vtable_load_addr)
137 Address(offset_to_top_location), addr_byte_size, INT64_MIN,
error);
139 if (offset_to_top == INT64_MIN)
145 if (!
m_process->GetTarget().ResolveLoadAddress(dynamic_addr,
153 std::vector<const char *> &names,
bool catch_bp,
bool throw_bp,
154 bool for_expressions) {
162 static const char *g_catch_name =
"__cxa_begin_catch";
163 static const char *g_throw_name1 =
"__cxa_throw";
164 static const char *g_throw_name2 =
"__cxa_rethrow";
165 static const char *g_exception_throw_name =
"__cxa_allocate_exception";
168 names.push_back(g_catch_name);
171 names.push_back(g_throw_name1);
172 names.push_back(g_throw_name2);
176 names.push_back(g_exception_throw_name);
193 if (!thread_sp->SafeToCallFunctions())
213 thread_sp->CalculateExecutionContext(exe_ctx);
229 m_process->GetTarget().GetFunctionCallerForLanguage(
234 func_call_ret = function_caller->
ExecuteFunction(exe_ctx,
nullptr, options,
235 diagnostics, results);
240 size_t ptr_size =
m_process->GetAddressByteSize();
245 if (!
error.Success()) {
258 return dyn_exception;
static llvm::raw_ostream & error(Stream &strm)
static const char * vtable_demangled_prefix
#define LLDB_LOGF(log,...)
A section + offset based address class.
lldb::addr_t GetLoadAddress(Target *target) const
Get the load address.
void SetRawAddress(lldb::addr_t addr)
bool IsSectionOffset() const
Check if an address is section offset.
llvm::Triple & GetTriple()
Architecture triple accessor.
CommonABIRuntime(Process *process)
void SetDynamicTypeInfo(const lldb_private::Address &vtable_addr, const TypeAndOrName &type_info)
lldb::TypeSP LookupTypeByName(llvm::StringRef type_name, lldb::ModuleSP preferred_module, bool &any_found) const
Find a type by its name, preferably in preferred_module.
TypeAndOrName GetDynamicTypeInfo(const lldb_private::Address &vtable_addr)
Generic representation of a type in a programming language.
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
const char * GetCString() const
Get the string value as a C string.
const char * AsCString(const char *value_if_empty) const
Get the string value as a C string.
void SetUnwindOnError(bool unwind=false)
void SetTryAllThreads(bool try_others=true)
void SetTimeout(const Timeout< std::micro > &timeout)
void SetStopOthers(bool stop_others=true)
void SetIgnoreBreakpoints(bool ignore=false)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void EmplaceBack(Args &&...args)
Inserts a new FileSpec into the FileSpecList constructed in-place with the given arguments.
Encapsulates a function that can be called.
lldb::ExpressionResults ExecuteFunction(ExecutionContext &exe_ctx, lldb::addr_t *args_addr_ptr, const EvaluateExpressionOptions &options, DiagnosticManager &diagnostic_manager, Value &results)
Run the function this FunctionCaller was created with.
void AppendExceptionBreakpointFilterModules(FileSpecList &list, const Target &target) override
ItaniumABIRuntime(Process *process)
llvm::StringRef GetName() const override
lldb::ValueObjectSP GetExceptionObjectForThread(lldb::ThreadSP thread_sp) override
bool GetDynamicTypeAndAddress(ValueObject &in_value, lldb::DynamicValueType use_dynamic, const LanguageRuntime::VTableInfo &vtable_info, TypeAndOrName &class_type_or_name, Address &dynamic_address) override
TypeAndOrName GetTypeInfo(ValueObject &in_value, const LanguageRuntime::VTableInfo &vtable_info)
void AppendExceptionBreakpointFunctions(std::vector< const char * > &names, bool catch_bp, bool throw_bp, bool for_expressions) override
bool IsVTableSymbol(Mangled &manged) const override
A class that handles mangled names.
ConstString GetDemangledName() const
Demangled name get accessor.
A collection class for Module objects.
void FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, SymbolContextList &sc_list) const
A plug-in interface definition class for debugging a process.
unsigned long long ULongLong(unsigned long long fail_value=0) const
static lldb::TypeSystemClangSP GetForTarget(Target &target, std::optional< IsolatedASTKind > ast_kind=DefaultAST, bool create_on_demand=true)
Returns the scratch TypeSystemClang for the given target.
Defines a list of symbol context objects.
bool GetContextAtIndex(size_t idx, SymbolContext &sc) const
Get accessor for a symbol context at index idx.
Defines a symbol context baton that can be handed other debug core functions.
Symbol * symbol
The Symbol for a given query.
lldb::ModuleSP CalculateSymbolContextModule() override
Address GetAddress() const
int64_t ReadSignedIntegerFromMemory(const Address &addr, size_t integer_byte_size, int64_t fail_value, Status &error, bool force_live_memory=false)
const ArchSpec & GetArchitecture() const
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
void SetName(ConstString type_name)
CompilerType GetCompilerType() const
void SetTypeSP(lldb::TypeSP type_sp)
static bool AreTypesSame(CompilerType type1, CompilerType type2, bool ignore_qualifiers=false)
virtual ConstString GetTypeName()
CompilerType GetCompilerType()
AddrAndType GetPointerValue()
static lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type, ValueObject *parent=nullptr)
const Scalar & GetScalar() const
See comment on m_scalar to understand what GetScalar returns.
#define LLDB_INVALID_ADDRESS
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.
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
@ eLanguageTypeC
Non-standardized C, such as K&R.
ExpressionResults
The results of expression evaluation.
std::shared_ptr< lldb_private::Type > TypeSP
std::shared_ptr< lldb_private::TypeSystemClang > TypeSystemClangSP
Symbol * symbol
Address of the vtable's virtual function table.