本文整理汇总了C++中SymbolVendor::GetSymbolFile方法的典型用法代码示例。如果您正苦于以下问题:C++ SymbolVendor::GetSymbolFile方法的具体用法?C++ SymbolVendor::GetSymbolFile怎么用?C++ SymbolVendor::GetSymbolFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymbolVendor
的用法示例。
在下文中一共展示了SymbolVendor::GetSymbolFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fspec
TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestResolveSymbolContextBasename)) {
// Test that attempting to call ResolveSymbolContext with only a basename
// finds all full paths
// with the same basename
FileSpec fspec(m_pdb_test_exe.c_str(), false);
ArchSpec aspec("i686-pc-windows");
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
SymbolVendor *plugin = module->GetSymbolVendor();
EXPECT_NE(nullptr, plugin);
SymbolFile *symfile = plugin->GetSymbolFile();
FileSpec header_spec("test-pdb.cpp", false);
SymbolContextList sc_list;
uint32_t result_count = symfile->ResolveSymbolContext(
header_spec, 0, false, lldb::eSymbolContextCompUnit, sc_list);
EXPECT_EQ(1u, result_count);
EXPECT_TRUE(ContainsCompileUnit(sc_list, header_spec));
}
示例2: fspec
TEST_F(SymbolFilePDBTests,
REQUIRES_DIA_SDK(TestLookupOfHeaderFileWithNoInlines)) {
// Test that when looking up a header file via ResolveSymbolContext (i.e. a
// file that was not by itself
// compiled, but only contributes to the combined code of other source files),
// that if check_inlines
// is false, no SymbolContexts are returned.
FileSpec fspec(m_pdb_test_exe.c_str(), false);
ArchSpec aspec("i686-pc-windows");
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
SymbolVendor *plugin = module->GetSymbolVendor();
EXPECT_NE(nullptr, plugin);
SymbolFile *symfile = plugin->GetSymbolFile();
FileSpec header_specs[] = {FileSpec("test-pdb.h", false),
FileSpec("test-pdb-nested.h", false)};
for (const auto &hspec : header_specs) {
SymbolContextList sc_list;
uint32_t result_count = symfile->ResolveSymbolContext(
hspec, 0, false, lldb::eSymbolContextCompUnit, sc_list);
EXPECT_EQ(0u, result_count);
}
}