22 bool &any_found)
const {
33 TypeQueryOptions::e_exact_match |
34 TypeQueryOptions::e_strict_namespaces |
35 TypeQueryOptions::e_find_one);
36 if (preferred_module) {
37 preferred_module->FindTypes(query, results);
40 class_types.
Insert(type_sp);
45 if (class_types.
Empty()) {
47 m_process->GetTarget().GetImages().FindTypes(
nullptr, query, results);
49 class_types.
Insert(type_sp);
53 if (class_types.
Empty()) {
54 LLDB_LOG(log,
"Failed to find '{0}'", type_name);
59 if (class_types.
GetSize() == 1) {
71 "'{0}' has multiple matching dynamic "
74 for (
size_t i = 0; i < class_types.
GetSize(); i++) {
77 LLDB_LOG(log,
"[{0}]: uid={1:x}, type-name='{2}'", i, type_sp->GetID(),
83 for (
size_t i = 0; i < class_types.
GetSize(); i++) {
88 "'{0}' has multiple matching dynamic types, "
89 "picking this one: [{1}] uid={2:x}, type-name='{3}'\n",
90 type_name, i, type_sp->GetID(), type_sp->GetName());
97 "'{0}' has multiple matching dynamic types, didn't find a C++ match",
104 std::lock_guard<std::mutex> locker(
m_mutex);
114 std::lock_guard<std::mutex> locker(
m_mutex);
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
A section + offset based address class.
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.
DynamicTypeCache m_dynamic_type_map
TypeAndOrName GetDynamicTypeInfo(const lldb_private::Address &vtable_addr)
A uniqued constant string class.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A plug-in interface definition class for debugging a process.
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
void Insert(const lldb::TypeSP &type)
lldb::TypeSP GetTypeAtIndex(uint32_t idx) const
TypeIterable Types() const
A class that contains all state required for type lookups.
This class tracks the state and results of a TypeQuery.
lldb::TypeSP GetFirstType() const
static bool IsCXXClassType(const CompilerType &type)
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::Type > TypeSP
std::shared_ptr< lldb_private::Module > ModuleSP