diff options
author | Jim Ingham <jingham@apple.com> | 2011-05-14 00:40:37 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-05-14 00:40:37 +0000 |
commit | 67eb68d260c71126d10256d02017a71d4fa2e93c (patch) | |
tree | cce8fc9bd2c8f25a356a22b2fb07d1d0c8e6181e /lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | |
parent | df9db7ed92e8e5e5716aaf4625b14a3c8ca4fea9 (diff) | |
download | bcm5719-llvm-67eb68d260c71126d10256d02017a71d4fa2e93c.tar.gz bcm5719-llvm-67eb68d260c71126d10256d02017a71d4fa2e93c.zip |
For the purposes of setting breakpoints treat methods defined in the class and methods defined in a category on the class as the same.
llvm-svn: 131331
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index e2c92a6ba70..8e883d15eb2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -809,6 +809,24 @@ DWARFCompileUnit::Index // 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); + + } + } } } } |