]> sourceware.org Git - systemtap.git/commit
PR10572: Allow duplicate function names in a CU
authorJosh Stone <jistone@redhat.com>
Thu, 3 Sep 2009 02:09:50 +0000 (19:09 -0700)
committerJosh Stone <jistone@redhat.com>
Thu, 3 Sep 2009 02:09:50 +0000 (19:09 -0700)
commitb74789646bfe59131327716357c8b7c1521fa14a
tree90647b22c781da3a38dc5be568ed846280b64193
parent7a1921492e38221e1552b7698f001fa70d0e0e8b
PR10572: Allow duplicate function names in a CU

We can't assume that a given function name will only appear once in a
CU.  In C++, two functions may have the same name in different classes
or namespaces, or even in the same scope with overloaded parameters.
Even in C, the compiler may generate multiple copies of a single
function with different optimizations.

We now use a multimap for function names, so we shouldn't miss any.

* dwflpp.h (cu_type_cache_t, mod_cu_type_cache_t): New typedef to keep a
  normal map for the global_alias_cache.
  (cu_function_cache_t): Use a multimap for function names.
* dwflpp.cxx (dwflpp::iterate_over_functions): Walk over the range of
  exactly-matching functions.
* tapsets.cxx (query_dwarf_func): Don't abort after seeing an exact
  match -- there could be more to come.
dwflpp.cxx
dwflpp.h
tapsets.cxx
This page took 0.028629 seconds and 5 git commands to generate.