summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-08-06 14:35:08 -0400
committerDave Brolley <brolley@redhat.com>2009-08-06 14:35:08 -0400
commit6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1 (patch)
treee4ddccdf7613a7788ad74bbc18727d35abf133fe /dwflpp.cxx
parent3c96130fde2f114d0ecca13870ac91b00219cf6c (diff)
parentcab97f033153b93d1d26388a25a65052cf36fc8d (diff)
downloadsystemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.tar.gz
systemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.tar.xz
systemtap-steved-6dc27b9452aa2f52dfb3414c0ad8192ec65fb2d1.zip
Merge branch 'master' of git://sources.redhat.com/git/systemtap
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 6ede1d68..ff62265f 100644
--- a/dwflpp.cxx
+++ b/dwflpp.cxx
@@ -784,6 +784,7 @@ dwflpp::iterate_over_srcfile_lines (char const * srcfile,
enum line_t line_type,
void (* callback) (const dwarf_line_t& line,
void * arg),
+ const std::string& func_pattern,
void *data)
{
Dwarf_Line **srcsp = NULL;
@@ -811,7 +812,10 @@ dwflpp::iterate_over_srcfile_lines (char const * srcfile,
else if (line_type == RANGE) { /* correct lineno */
int start_lineno;
- function_line (&start_lineno);
+ if (name_has_wildcard(func_pattern)) /* PR10294: wider range like statement("*@foo.c") */
+ start_lineno = lineno;
+ else
+ function_line (&start_lineno);
lineno = lineno < start_lineno ? start_lineno : lineno;
if (lineno > lines[1]) { /* invalid line range */
stringstream advice;
@@ -849,7 +853,7 @@ dwflpp::iterate_over_srcfile_lines (char const * srcfile,
if (lineno != l || line_probed.second == false || nsrcs > 1)
continue;
dwarf_lineaddr (srcsp [0], &line_addr);
- if (dwarf_haspc (function, line_addr) != 1)
+ if (!function_name_matches(func_pattern) && dwarf_haspc (function, line_addr) != 1)
break;
}