[Lldb-commits] [lldb] r148435 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Greg Clayton
gclayton at apple.com
Wed Jan 18 15:40:49 PST 2012
Author: gclayton
Date: Wed Jan 18 17:40:49 2012
New Revision: 148435
URL: http://llvm.org/viewvc/llvm-project?rev=148435&view=rev
Log:
Be sure to use the one and only trusted source for chopping up
objective C class names when extracting the class name, selector and
name without category for objective C full class and instance method
names.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=148435&r1=148434&r2=148435&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Jan 18 17:40:49 2012
@@ -4897,20 +4897,15 @@
bool type_handled = false;
if (tag == DW_TAG_subprogram)
{
- if (ObjCLanguageRuntime::IsPossibleObjCMethodName (type_name_cstr))
+ ConstString class_name;
+
+ if (ObjCLanguageRuntime::ParseMethodName (type_name_cstr, &class_name, NULL, NULL))
{
- // We need to find the DW_TAG_class_type or
- // DW_TAG_struct_type by name so we can add this
- // as a member function of the class.
- const char *class_name_start = type_name_cstr + 2;
- const char *class_name_end = ::strchr (class_name_start, ' ');
SymbolContext empty_sc;
clang_type_t class_opaque_type = NULL;
- if (class_name_start < class_name_end)
+ if (class_name)
{
- ConstString class_name (class_name_start, class_name_end - class_name_start);
TypeList types;
-
TypeSP complete_objc_class_type_sp (FindCompleteObjCDefinitionTypeForDIE (NULL, class_name, true));
if (!complete_objc_class_type_sp)
complete_objc_class_type_sp = FindCompleteObjCDefinitionTypeForDIE (NULL, class_name, false);
More information about the lldb-commits
mailing list