diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-08-03 00:35:52 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-08-03 00:35:52 +0000 |
| commit | b0b9fe610ac7d69064b944217c925483ee217d0a (patch) | |
| tree | 365a8561e3e74197266be4ccab284e5e125e7061 /lldb/source/Symbol/SymbolVendor.cpp | |
| parent | 4cf04d209b5b9eab0f0748afc1e0e72ae6510c2d (diff) | |
| download | bcm5719-llvm-b0b9fe610ac7d69064b944217c925483ee217d0a.tar.gz bcm5719-llvm-b0b9fe610ac7d69064b944217c925483ee217d0a.zip | |
Added support for objective C built-in types: id, Class, and SEL. This
involved watching for the objective C built-in types in DWARF and making sure
when we convert the DWARF types into clang types that we use the appropriate
ASTContext types.
Added a way to find and dump types in lldb (something equivalent to gdb's
"ptype" command):
image lookup --type <TYPENAME>
This only works for looking up types by name and won't work with variables.
It also currently dumps out verbose internal information. I will modify it
to dump more appropriate user level info in my next submission.
Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so
we can lookup types by name in one or more images.
Fixed "image lookup --address <ADDRESS>" to be able to correctly show all
symbol context information, but it will only show this extra information when
the new "--verbose" flag is used.
Updated to latest LLVM to get a few needed fixes.
llvm-svn: 110089
Diffstat (limited to 'lldb/source/Symbol/SymbolVendor.cpp')
| -rw-r--r-- | lldb/source/Symbol/SymbolVendor.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp index b4c4f83e56b..3d99ec54375 100644 --- a/lldb/source/Symbol/SymbolVendor.cpp +++ b/lldb/source/Symbol/SymbolVendor.cpp @@ -252,21 +252,16 @@ SymbolVendor::FindFunctions(const RegularExpression& regex, bool append, SymbolC } - -//uint32_t -//SymbolVendor::FindTypes(const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types) -//{ -// Mutex::Locker locker(m_mutex); -// if (m_sym_file_ap.get()) -// { -// lldb::user_id_t udt_uid = LLDB_INVALID_UID; -// if (encoding == Type::user_defined_type) -// udt_uid = UserDefType::GetUserDefTypeUID(udt_name); -// -// return m_sym_file_ap->FindTypes(sc, name, append, max_matches, encoding, udt_uid, types); -// } -// return 0; -//} +uint32_t +SymbolVendor::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types) +{ + Mutex::Locker locker(m_mutex); + if (m_sym_file_ap.get()) + return m_sym_file_ap->FindTypes(sc, name, append, max_matches, types); + if (!append) + types.Clear(); + return 0; +} // //uint32_t //SymbolVendor::FindTypes(const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types) |

