summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-12-03 20:02:42 +0000
committerGreg Clayton <gclayton@apple.com>2011-12-03 20:02:42 +0000
commit1075acafeb56a47c34c7bcd0024a103340ff55d6 (patch)
tree2bb38f976317ca2062b15bea9f63907d8d9c9227 /lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
parentfb9968d6f11f7d8e85362f092445b95f94a55724 (diff)
downloadbcm5719-llvm-1075acafeb56a47c34c7bcd0024a103340ff55d6.tar.gz
bcm5719-llvm-1075acafeb56a47c34c7bcd0024a103340ff55d6.zip
Added the ability for clients to grab a set of symbol table indexes and then
add them to a fast lookup map. lldb_private::Symtab now export the following public typedefs: namespace lldb_private { class Symtab { typedef std::vector<uint32_t> IndexCollection; typedef UniqueCStringMap<uint32_t> NameToIndexMap; }; } Clients can then find symbols by name and or type and end up with a Symtab::IndexCollection that is filled with indexes. These indexes can then be put into a name to index lookup map and control if the mangled and demangled names get added to the map: bool add_demangled = true; bool add_mangled = true; Symtab::NameToIndexMap name_to_index; symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index). This can be repeated as many times as needed to get a lookup table that you are happy with, and then this can be sorted: name_to_index.Sort(); Now name lookups can be done using a subset of the symbols you extracted from the symbol table. This is currently being used to extract objective C types from object files when there is no debug info in SymbolFileSymtab. Cleaned up how the objective C types were being vended to be more efficient and fixed some errors in the regular expression that was being used. llvm-svn: 145777
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h')
-rw-r--r--lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
index a932f4dc97f..0ea06560d0f 100644
--- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
+++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
@@ -11,6 +11,7 @@
#define liblldb_SymbolFileSymtab_h_
#include "lldb/Symbol/SymbolFile.h"
+#include "lldb/Symbol/Symtab.h"
#include <vector>
class SymbolFileSymtab : public lldb_private::SymbolFile
@@ -119,22 +120,15 @@ public:
GetPluginVersion();
protected:
- std::vector<uint32_t> m_source_indexes;
- std::vector<uint32_t> m_func_indexes;
- std::vector<uint32_t> m_code_indexes;
- std::vector<uint32_t> m_data_indexes;
- std::vector<uint32_t> m_addr_indexes; // Anything that needs to go into an search by address
- std::vector<uint32_t> m_objc_class_indexes;
-
- lldb_private::LazyBool m_has_objc_symbols;
-
typedef std::map<lldb_private::ConstString, lldb::TypeSP> TypeMap;
-
- TypeMap m_objc_class_types;
- bool
- HasObjCSymbols ();
-
+ lldb_private::Symtab::IndexCollection m_source_indexes;
+ lldb_private::Symtab::IndexCollection m_func_indexes;
+ lldb_private::Symtab::IndexCollection m_code_indexes;
+ lldb_private::Symtab::IndexCollection m_data_indexes;
+ lldb_private::Symtab::NameToIndexMap m_objc_class_name_to_index;
+ TypeMap m_objc_class_types;
+
lldb_private::ClangASTContext &
GetClangASTContext ();
OpenPOWER on IntegriCloud