summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-18 19:59:43 -0700
committerJosh Stone <jistone@redhat.com>2009-09-18 19:59:43 -0700
commit1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c (patch)
treee656ed96f7e007cfd8834afdcd5bd2c64f2b9375 /tapsets.cxx
parent8faa1fc5f98ccb87beb2e71c0ce087278a950dde (diff)
downloadsystemtap-steved-1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c.tar.gz
systemtap-steved-1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c.tar.xz
systemtap-steved-1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c.zip
Fix uninitialized line numbers in the function spec
The rewrite of parse_function_spec left the line numbers uninitialized when not used, but elsewhere was depending on that. Fix the uninit, and also don't depend on it. * tapsets.cxx (dwarf_query::parse_function_spec): Init line stuff. (query_cu): Branch on the spec_type, not the line contents.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 79e3b6d9..8dda3918 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -873,6 +873,9 @@ dwarf_query::handle_query_module()
void
dwarf_query::parse_function_spec(const string & spec)
{
+ line_type = ABSOLUTE;
+ line[0] = line[1] = 0;
+
size_t src_pos, line_pos, dash_pos, scope_pos, next_scope_pos;
// look for named scopes
@@ -1543,7 +1546,7 @@ query_cu (Dwarf_Die * cudie, void * arg)
if (q->has_label)
{
- if (q->line[0] == 0) // No line number specified
+ if (q->spec_type != function_file_and_line) // No line number specified
{
for (func_info_map_t::iterator i = q->filtered_functions.begin();
i != q->filtered_functions.end(); ++i)