本文整理汇总了C++中SymbolVendor类的典型用法代码示例。如果您正苦于以下问题:C++ SymbolVendor类的具体用法?C++ SymbolVendor怎么用?C++ SymbolVendor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SymbolVendor类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TEST_F
TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestTypedefs)) {
FileSpec fspec(m_types_test_exe.c_str(), false);
ArchSpec aspec("i686-pc-windows");
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
SymbolVendor *plugin = module->GetSymbolVendor();
SymbolFilePDB *symfile =
static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
const llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
SymbolContext sc;
llvm::DenseSet<SymbolFile *> searched_files;
TypeMap results;
const char *TypedefsToCheck[] = {"ClassTypedef", "NSClassTypedef"};
for (auto Typedef : TypedefsToCheck) {
TypeMap results;
EXPECT_EQ(1u, symfile->FindTypes(sc, ConstString(Typedef), nullptr, false,
0, searched_files, results));
EXPECT_EQ(1u, results.GetSize());
lldb::TypeSP typedef_type = results.GetTypeAtIndex(0);
EXPECT_EQ(ConstString(Typedef), typedef_type->GetName());
CompilerType compiler_type = typedef_type->GetFullCompilerType();
ClangASTContext *clang_type_system =
llvm::dyn_cast_or_null<ClangASTContext>(compiler_type.GetTypeSystem());
EXPECT_TRUE(
clang_type_system->IsTypedefType(compiler_type.GetOpaqueQualType()));
std::string sizeof_var = "sizeof_";
sizeof_var.append(Typedef);
EXPECT_EQ(GetGlobalConstantInteger(session, sizeof_var.c_str()),
typedef_type->GetByteSize());
}
}
示例2: locker
void
Module::Dump(Stream *s)
{
Mutex::Locker locker (m_mutex);
//s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
s->Indent();
s->Printf("Module %s/%s%s%s%s\n",
m_file.GetDirectory().AsCString(),
m_file.GetFilename().AsCString(),
m_object_name ? "(" : "",
m_object_name ? m_object_name.GetCString() : "",
m_object_name ? ")" : "");
s->IndentMore();
ObjectFile *objfile = GetObjectFile ();
if (objfile)
objfile->Dump(s);
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
symbols->Dump(s);
s->IndentLess();
}
示例3:
static Symtab *GetUnifiedSymbolTable(const lldb::ModuleSP &module_sp) {
if (module_sp) {
SymbolVendor *symbols = module_sp->GetSymbolVendor();
if (symbols)
return symbols->GetSymtab();
}
return NULL;
}
示例4: GetSymbolVendor
TypeList*
Module::GetTypeList ()
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
return &symbols->GetTypeList();
return NULL;
}
示例5: GetSymbolVendor
uint32_t
Module::FindFunctions(const RegularExpression& regex, bool append, SymbolContextList& sc_list)
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
return symbols->FindFunctions(regex, append, sc_list);
return 0;
}
示例6: module_sp
lldb::SBType SBModule::GetTypeByID(lldb::user_id_t uid) {
ModuleSP module_sp(GetSP());
if (module_sp) {
SymbolVendor *vendor = module_sp->GetSymbolVendor();
if (vendor) {
Type *type_ptr = vendor->ResolveTypeUID(uid);
if (type_ptr)
return SBType(type_ptr->shared_from_this());
}
}
return SBType();
}
示例7: scoped_timer
uint32_t
Module::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
{
Timer scoped_timer(__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
if (sc.module_sp.get() == NULL || sc.module_sp.get() == this)
{
SymbolVendor *symbols = GetSymbolVendor ();
if (symbols)
return symbols->FindTypes(sc, name, append, max_matches, types);
}
return 0;
}
示例8: module_sp
lldb::SBTypeList SBCompileUnit::GetTypes(uint32_t type_mask) {
SBTypeList sb_type_list;
if (m_opaque_ptr) {
ModuleSP module_sp(m_opaque_ptr->GetModule());
if (module_sp) {
SymbolVendor *vendor = module_sp->GetSymbolVendor();
if (vendor) {
TypeList type_list;
vendor->GetTypes(m_opaque_ptr, type_mask, type_list);
sb_type_list.m_opaque_ap->Append(type_list);
}
}
}
return sb_type_list;
}