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
This commit is contained in:
Jim Ingham 2011-05-14 00:40:37 +00:00
parent df9db7ed92
commit 67eb68d260
1 changed files with 18 additions and 0 deletions

View File

@ -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);
}
}
}
}
}