[Lldb-commits] [lldb] r131331 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Jim Ingham
jingham at apple.com
Fri May 13 17:40:38 PDT 2011
Author: jingham
Date: Fri May 13 19:40:37 2011
New Revision: 131331
URL: http://llvm.org/viewvc/llvm-project?rev=131331&view=rev
Log:
For the purposes of setting breakpoints treat methods defined in the class and methods defined in a category on the class as the same.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=131331&r1=131330&r2=131331&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri May 13 19:40:37 2011
@@ -809,6 +809,24 @@
// accelerator tables
size_t method_name_len = name_len - (method_name - name) - 1;
func_selectors.Insert (ConstString (method_name, method_name_len), die_info);
+
+ // Also see if this is a "category" on our class. If so strip off the category name,
+ // and add the class name without it to the basename table.
+
+ const char *first_paren = strnstr (name, "(", method_name - name);
+ if (first_paren)
+ {
+ const char *second_paren = strnstr (first_paren, ")", method_name - first_paren);
+ if (second_paren)
+ {
+ std::string buffer (name, first_paren - name);
+ buffer.append (second_paren + 1);
+ ConstString uncategoried_name (buffer.c_str());
+ func_basenames.Insert (uncategoried_name, die_info);
+ func_fullnames.Insert (uncategoried_name, die_info);
+
+ }
+ }
}
}
}
More information about the lldb-commits
mailing list