| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- SymbolFileSymtab.cpp ------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "SymbolFileSymtab.h" |
| 11 | #include "lldb/Core/Module.h" |
| 12 | #include "lldb/Core/PluginManager.h" |
| 13 | #include "lldb/Core/RegularExpression.h" |
| 14 | #include "lldb/Core/Timer.h" |
| Jim Ingham | 37939763 | 2012-10-27 02:54:13 +0000 | [diff] [blame] | 15 | #include "lldb/Symbol/ClangExternalASTSourceCommon.h" |
| Greg Clayton | 1f74607 | 2012-08-29 21:13:06 +0000 | [diff] [blame] | 16 | #include "lldb/Symbol/CompileUnit.h" |
| 17 | #include "lldb/Symbol/Function.h" |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 18 | #include "lldb/Symbol/ObjectFile.h" |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 19 | #include "lldb/Symbol/ObjectFile.h" |
| 20 | #include "lldb/Symbol/Symbol.h" |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 21 | #include "lldb/Symbol/SymbolContext.h" |
| Greg Clayton | 1f74607 | 2012-08-29 21:13:06 +0000 | [diff] [blame] | 22 | #include "lldb/Symbol/Symtab.h" |
| 23 | #include "lldb/Symbol/TypeList.h" |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 24 | |
| 25 | using namespace lldb; |
| 26 | using namespace lldb_private; |
| 27 | |
| 28 | void |
| 29 | SymbolFileSymtab::Initialize() |
| 30 | { |
| 31 | PluginManager::RegisterPlugin (GetPluginNameStatic(), |
| 32 | GetPluginDescriptionStatic(), |
| 33 | CreateInstance); |
| 34 | } |
| 35 | |
| 36 | void |
| 37 | SymbolFileSymtab::Terminate() |
| 38 | { |
| 39 | PluginManager::UnregisterPlugin (CreateInstance); |
| 40 | } |
| 41 | |
| 42 | |
| Greg Clayton | 57abc5d | 2013-05-10 21:47:16 +0000 | [diff] [blame] | 43 | lldb_private::ConstString |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 44 | SymbolFileSymtab::GetPluginNameStatic() |
| 45 | { |
| Greg Clayton | 57abc5d | 2013-05-10 21:47:16 +0000 | [diff] [blame] | 46 | static ConstString g_name("symtab"); |
| 47 | return g_name; |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | const char * |
| 51 | SymbolFileSymtab::GetPluginDescriptionStatic() |
| 52 | { |
| 53 | return "Reads debug symbols from an object file's symbol table."; |
| 54 | } |
| 55 | |
| 56 | |
| 57 | SymbolFile* |
| 58 | SymbolFileSymtab::CreateInstance (ObjectFile* obj_file) |
| 59 | { |
| 60 | return new SymbolFileSymtab(obj_file); |
| 61 | } |
| 62 | |
| Greg Clayton | f02500c | 2013-06-18 22:51:05 +0000 | [diff] [blame] | 63 | size_t |
| 64 | SymbolFileSymtab::GetTypes (SymbolContextScope *sc_scope, uint32_t type_mask, lldb_private::TypeList &type_list) |
| 65 | { |
| 66 | return 0; |
| 67 | } |
| 68 | |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 69 | SymbolFileSymtab::SymbolFileSymtab(ObjectFile* obj_file) : |
| 70 | SymbolFile(obj_file), |
| 71 | m_source_indexes(), |
| 72 | m_func_indexes(), |
| 73 | m_code_indexes(), |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 74 | m_objc_class_name_to_index () |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 75 | { |
| 76 | } |
| 77 | |
| 78 | SymbolFileSymtab::~SymbolFileSymtab() |
| 79 | { |
| 80 | } |
| 81 | |
| Sean Callanan | 09ab4b7 | 2011-11-30 22:11:59 +0000 | [diff] [blame] | 82 | ClangASTContext & |
| 83 | SymbolFileSymtab::GetClangASTContext () |
| 84 | { |
| 85 | ClangASTContext &ast = m_obj_file->GetModule()->GetClangASTContext(); |
| 86 | |
| 87 | return ast; |
| 88 | } |
| 89 | |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 90 | uint32_t |
| Sean Callanan | bfaf54d | 2011-12-03 04:38:43 +0000 | [diff] [blame] | 91 | SymbolFileSymtab::CalculateAbilities () |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 92 | { |
| 93 | uint32_t abilities = 0; |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 94 | if (m_obj_file) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 95 | { |
| Greg Clayton | 3046e66 | 2013-07-10 01:23:25 +0000 | [diff] [blame] | 96 | const Symtab *symtab = m_obj_file->GetSymtab(); |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 97 | if (symtab) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 98 | { |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 99 | //---------------------------------------------------------------------- |
| 100 | // The snippet of code below will get the indexes the module symbol |
| 101 | // table entries that are code, data, or function related (debug info), |
| 102 | // sort them by value (address) and dump the sorted symbols. |
| 103 | //---------------------------------------------------------------------- |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 104 | if (symtab->AppendSymbolIndexesWithType(eSymbolTypeSourceFile, m_source_indexes)) |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 105 | { |
| 106 | abilities |= CompileUnits; |
| 107 | } |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 108 | |
| 109 | if (symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, Symtab::eDebugYes, Symtab::eVisibilityAny, m_func_indexes)) |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 110 | { |
| 111 | symtab->SortSymbolIndexesByValue(m_func_indexes, true); |
| 112 | abilities |= Functions; |
| 113 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 114 | |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 115 | if (symtab->AppendSymbolIndexesWithType(eSymbolTypeCode, Symtab::eDebugNo, Symtab::eVisibilityAny, m_code_indexes)) |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 116 | { |
| 117 | symtab->SortSymbolIndexesByValue(m_code_indexes, true); |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 118 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 119 | |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 120 | if (symtab->AppendSymbolIndexesWithType(eSymbolTypeData, m_data_indexes)) |
| Greg Clayton | 5861d3e | 2011-06-19 04:02:02 +0000 | [diff] [blame] | 121 | { |
| 122 | symtab->SortSymbolIndexesByValue(m_data_indexes, true); |
| 123 | abilities |= GlobalVariables; |
| 124 | } |
| Sean Callanan | 09ab4b7 | 2011-11-30 22:11:59 +0000 | [diff] [blame] | 125 | |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 126 | lldb_private::Symtab::IndexCollection objc_class_indexes; |
| 127 | if (symtab->AppendSymbolIndexesWithType (eSymbolTypeObjCClass, objc_class_indexes)) |
| Sean Callanan | 09ab4b7 | 2011-11-30 22:11:59 +0000 | [diff] [blame] | 128 | { |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 129 | symtab->AppendSymbolNamesToMap (objc_class_indexes, |
| 130 | true, |
| 131 | true, |
| 132 | m_objc_class_name_to_index); |
| 133 | m_objc_class_name_to_index.Sort(); |
| Sean Callanan | 09ab4b7 | 2011-11-30 22:11:59 +0000 | [diff] [blame] | 134 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 135 | } |
| 136 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 137 | return abilities; |
| 138 | } |
| 139 | |
| 140 | uint32_t |
| 141 | SymbolFileSymtab::GetNumCompileUnits() |
| 142 | { |
| 143 | // If we don't have any source file symbols we will just have one compile unit for |
| 144 | // the entire object file |
| 145 | if (m_source_indexes.empty()) |
| Jim Ingham | 969795f | 2011-09-21 01:17:13 +0000 | [diff] [blame] | 146 | return 0; |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 147 | |
| Bruce Mitchener | aaa0ba3 | 2014-07-08 18:05:41 +0000 | [diff] [blame] | 148 | // If we have any source file symbols we will logically organize the object symbols |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 149 | // using these. |
| 150 | return m_source_indexes.size(); |
| 151 | } |
| 152 | |
| 153 | CompUnitSP |
| 154 | SymbolFileSymtab::ParseCompileUnitAtIndex(uint32_t idx) |
| 155 | { |
| 156 | CompUnitSP cu_sp; |
| 157 | |
| 158 | // If we don't have any source file symbols we will just have one compile unit for |
| 159 | // the entire object file |
| Greg Clayton | 9efa076 | 2012-04-26 16:53:42 +0000 | [diff] [blame] | 160 | if (idx < m_source_indexes.size()) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 161 | { |
| Greg Clayton | 3046e66 | 2013-07-10 01:23:25 +0000 | [diff] [blame] | 162 | const Symbol *cu_symbol = m_obj_file->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 163 | if (cu_symbol) |
| Greg Clayton | e72dfb3 | 2012-02-24 01:59:29 +0000 | [diff] [blame] | 164 | cu_sp.reset(new CompileUnit (m_obj_file->GetModule(), NULL, cu_symbol->GetMangled().GetName().AsCString(), 0, eLanguageTypeUnknown)); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 165 | } |
| 166 | return cu_sp; |
| 167 | } |
| 168 | |
| Greg Clayton | 1f74607 | 2012-08-29 21:13:06 +0000 | [diff] [blame] | 169 | lldb::LanguageType |
| 170 | SymbolFileSymtab::ParseCompileUnitLanguage (const SymbolContext& sc) |
| 171 | { |
| 172 | return eLanguageTypeUnknown; |
| 173 | } |
| 174 | |
| 175 | |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 176 | size_t |
| 177 | SymbolFileSymtab::ParseCompileUnitFunctions (const SymbolContext &sc) |
| 178 | { |
| 179 | size_t num_added = 0; |
| 180 | // We must at least have a valid compile unit |
| 181 | assert (sc.comp_unit != NULL); |
| Greg Clayton | 3046e66 | 2013-07-10 01:23:25 +0000 | [diff] [blame] | 182 | const Symtab *symtab = m_obj_file->GetSymtab(); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 183 | const Symbol *curr_symbol = NULL; |
| 184 | const Symbol *next_symbol = NULL; |
| 185 | // const char *prefix = m_obj_file->SymbolPrefix(); |
| 186 | // if (prefix == NULL) |
| 187 | // prefix == ""; |
| 188 | // |
| 189 | // const uint32_t prefix_len = strlen(prefix); |
| 190 | |
| 191 | // If we don't have any source file symbols we will just have one compile unit for |
| 192 | // the entire object file |
| 193 | if (m_source_indexes.empty()) |
| 194 | { |
| 195 | // The only time we will have a user ID of zero is when we don't have |
| 196 | // and source file symbols and we declare one compile unit for the |
| 197 | // entire object file |
| 198 | if (!m_func_indexes.empty()) |
| 199 | { |
| 200 | |
| 201 | } |
| 202 | |
| 203 | if (!m_code_indexes.empty()) |
| 204 | { |
| 205 | // StreamFile s(stdout); |
| 206 | // symtab->Dump(&s, m_code_indexes); |
| 207 | |
| 208 | uint32_t idx = 0; // Index into the indexes |
| 209 | const uint32_t num_indexes = m_code_indexes.size(); |
| 210 | for (idx = 0; idx < num_indexes; ++idx) |
| 211 | { |
| 212 | uint32_t symbol_idx = m_code_indexes[idx]; |
| 213 | curr_symbol = symtab->SymbolAtIndex(symbol_idx); |
| 214 | if (curr_symbol) |
| 215 | { |
| 216 | // Union of all ranges in the function DIE (if the function is discontiguous) |
| Greg Clayton | e761213 | 2012-03-07 21:03:09 +0000 | [diff] [blame] | 217 | AddressRange func_range(curr_symbol->GetAddress(), 0); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 218 | if (func_range.GetBaseAddress().IsSectionOffset()) |
| 219 | { |
| 220 | uint32_t symbol_size = curr_symbol->GetByteSize(); |
| 221 | if (symbol_size != 0 && !curr_symbol->GetSizeIsSibling()) |
| 222 | func_range.SetByteSize(symbol_size); |
| 223 | else if (idx + 1 < num_indexes) |
| 224 | { |
| 225 | next_symbol = symtab->SymbolAtIndex(m_code_indexes[idx + 1]); |
| 226 | if (next_symbol) |
| 227 | { |
| Greg Clayton | e761213 | 2012-03-07 21:03:09 +0000 | [diff] [blame] | 228 | func_range.SetByteSize(next_symbol->GetAddress().GetOffset() - curr_symbol->GetAddress().GetOffset()); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 229 | } |
| 230 | } |
| 231 | |
| 232 | FunctionSP func_sp(new Function(sc.comp_unit, |
| 233 | symbol_idx, // UserID is the DIE offset |
| 234 | LLDB_INVALID_UID, // We don't have any type info for this function |
| 235 | curr_symbol->GetMangled(), // Linker/mangled name |
| 236 | NULL, // no return type for a code symbol... |
| 237 | func_range)); // first address range |
| 238 | |
| 239 | if (func_sp.get() != NULL) |
| 240 | { |
| 241 | sc.comp_unit->AddFunction(func_sp); |
| 242 | ++num_added; |
| 243 | } |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | } |
| 249 | } |
| 250 | else |
| 251 | { |
| 252 | // We assume we |
| 253 | } |
| 254 | return num_added; |
| 255 | } |
| 256 | |
| 257 | bool |
| 258 | SymbolFileSymtab::ParseCompileUnitLineTable (const SymbolContext &sc) |
| 259 | { |
| 260 | return false; |
| 261 | } |
| 262 | |
| 263 | bool |
| 264 | SymbolFileSymtab::ParseCompileUnitSupportFiles (const SymbolContext& sc, FileSpecList &support_files) |
| 265 | { |
| 266 | return false; |
| 267 | } |
| 268 | |
| Sean Callanan | f0c5aeb | 2015-04-20 16:31:29 +0000 | [diff] [blame^] | 269 | bool |
| 270 | SymbolFileSymtab::ParseImportedModules (const SymbolContext &sc, std::vector<ConstString> &imported_modules) |
| 271 | { |
| 272 | return false; |
| 273 | } |
| 274 | |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 275 | size_t |
| 276 | SymbolFileSymtab::ParseFunctionBlocks (const SymbolContext &sc) |
| 277 | { |
| 278 | return 0; |
| 279 | } |
| 280 | |
| 281 | |
| 282 | size_t |
| 283 | SymbolFileSymtab::ParseTypes (const SymbolContext &sc) |
| 284 | { |
| 285 | return 0; |
| 286 | } |
| 287 | |
| 288 | |
| 289 | size_t |
| 290 | SymbolFileSymtab::ParseVariablesForContext (const SymbolContext& sc) |
| 291 | { |
| 292 | return 0; |
| 293 | } |
| 294 | |
| 295 | Type* |
| 296 | SymbolFileSymtab::ResolveTypeUID(lldb::user_id_t type_uid) |
| 297 | { |
| 298 | return NULL; |
| 299 | } |
| 300 | |
| Greg Clayton | 57ee306 | 2013-07-11 22:46:58 +0000 | [diff] [blame] | 301 | bool |
| 302 | SymbolFileSymtab::ResolveClangOpaqueTypeDefinition (lldb_private::ClangASTType& clang_opaque_type) |
| Greg Clayton | 1be10fc | 2010-09-29 01:12:09 +0000 | [diff] [blame] | 303 | { |
| Greg Clayton | 57ee306 | 2013-07-11 22:46:58 +0000 | [diff] [blame] | 304 | return false; |
| Greg Clayton | 1be10fc | 2010-09-29 01:12:09 +0000 | [diff] [blame] | 305 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 306 | |
| Greg Clayton | 526e5af | 2010-11-13 03:52:47 +0000 | [diff] [blame] | 307 | ClangNamespaceDecl |
| Sean Callanan | 213fdb8 | 2011-10-13 01:49:10 +0000 | [diff] [blame] | 308 | SymbolFileSymtab::FindNamespace (const SymbolContext& sc, const ConstString &name, const ClangNamespaceDecl *namespace_decl) |
| Greg Clayton | 96d7d74 | 2010-11-10 23:42:09 +0000 | [diff] [blame] | 309 | { |
| Greg Clayton | 526e5af | 2010-11-13 03:52:47 +0000 | [diff] [blame] | 310 | return ClangNamespaceDecl(); |
| Greg Clayton | 96d7d74 | 2010-11-10 23:42:09 +0000 | [diff] [blame] | 311 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 312 | |
| 313 | uint32_t |
| 314 | SymbolFileSymtab::ResolveSymbolContext (const Address& so_addr, uint32_t resolve_scope, SymbolContext& sc) |
| 315 | { |
| Greg Clayton | 3046e66 | 2013-07-10 01:23:25 +0000 | [diff] [blame] | 316 | if (m_obj_file->GetSymtab() == NULL) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 317 | return 0; |
| 318 | |
| 319 | uint32_t resolved_flags = 0; |
| 320 | if (resolve_scope & eSymbolContextSymbol) |
| 321 | { |
| Greg Clayton | 3046e66 | 2013-07-10 01:23:25 +0000 | [diff] [blame] | 322 | sc.symbol = m_obj_file->GetSymtab()->FindSymbolContainingFileAddress(so_addr.GetFileAddress()); |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 323 | if (sc.symbol) |
| 324 | resolved_flags |= eSymbolContextSymbol; |
| 325 | } |
| 326 | return resolved_flags; |
| 327 | } |
| 328 | |
| 329 | uint32_t |
| 330 | SymbolFileSymtab::ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list) |
| 331 | { |
| 332 | return 0; |
| 333 | } |
| 334 | |
| 335 | uint32_t |
| Sean Callanan | 213fdb8 | 2011-10-13 01:49:10 +0000 | [diff] [blame] | 336 | SymbolFileSymtab::FindGlobalVariables(const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 337 | { |
| 338 | return 0; |
| 339 | } |
| 340 | |
| 341 | uint32_t |
| 342 | SymbolFileSymtab::FindGlobalVariables(const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables) |
| 343 | { |
| 344 | return 0; |
| 345 | } |
| 346 | |
| 347 | uint32_t |
| Sean Callanan | 9df05fb | 2012-02-10 22:52:19 +0000 | [diff] [blame] | 348 | SymbolFileSymtab::FindFunctions(const ConstString &name, const ClangNamespaceDecl *namespace_decl, uint32_t name_type_mask, bool include_inlines, bool append, SymbolContextList& sc_list) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 349 | { |
| 350 | Timer scoped_timer (__PRETTY_FUNCTION__, |
| 351 | "SymbolFileSymtab::FindFunctions (name = '%s')", |
| 352 | name.GetCString()); |
| Greg Clayton | 931180e | 2011-01-27 06:44:37 +0000 | [diff] [blame] | 353 | // If we ever support finding STABS or COFF debug info symbols, |
| 354 | // we will need to add support here. We are not trying to find symbols |
| 355 | // here, just "lldb_private::Function" objects that come from complete |
| 356 | // debug information. Any symbol queries should go through the symbol |
| 357 | // table itself in the module's object file. |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 358 | return 0; |
| 359 | } |
| 360 | |
| 361 | uint32_t |
| Sean Callanan | 9df05fb | 2012-02-10 22:52:19 +0000 | [diff] [blame] | 362 | SymbolFileSymtab::FindFunctions(const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list) |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 363 | { |
| 364 | Timer scoped_timer (__PRETTY_FUNCTION__, |
| 365 | "SymbolFileSymtab::FindFunctions (regex = '%s')", |
| 366 | regex.GetText()); |
| Greg Clayton | 931180e | 2011-01-27 06:44:37 +0000 | [diff] [blame] | 367 | // If we ever support finding STABS or COFF debug info symbols, |
| 368 | // we will need to add support here. We are not trying to find symbols |
| 369 | // here, just "lldb_private::Function" objects that come from complete |
| 370 | // debug information. Any symbol queries should go through the symbol |
| 371 | // table itself in the module's object file. |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 372 | return 0; |
| 373 | } |
| 374 | |
| Greg Clayton | b0b9fe6 | 2010-08-03 00:35:52 +0000 | [diff] [blame] | 375 | uint32_t |
| Greg Clayton | 1075aca | 2011-12-03 20:02:42 +0000 | [diff] [blame] | 376 | SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, |
| 377 | const lldb_private::ConstString &name, |
| 378 | const ClangNamespaceDecl *namespace_decl, |
| 379 | bool append, |
| 380 | uint32_t max_matches, |
| 381 | lldb_private::TypeList& types) |
| Greg Clayton | b0b9fe6 | 2010-08-03 00:35:52 +0000 | [diff] [blame] | 382 | { |
| Greg Clayton | b0b9fe6 | 2010-08-03 00:35:52 +0000 | [diff] [blame] | 383 | return 0; |
| 384 | } |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 385 | |
| 386 | //------------------------------------------------------------------ |
| 387 | // PluginInterface protocol |
| 388 | //------------------------------------------------------------------ |
| Greg Clayton | 57abc5d | 2013-05-10 21:47:16 +0000 | [diff] [blame] | 389 | lldb_private::ConstString |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 390 | SymbolFileSymtab::GetPluginName() |
| 391 | { |
| Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 392 | return GetPluginNameStatic(); |
| 393 | } |
| 394 | |
| 395 | uint32_t |
| 396 | SymbolFileSymtab::GetPluginVersion() |
| 397 | { |
| 398 | return 1; |
| 399 | } |