]> sourceware.org Git - systemtap.git/commitdiff
Fix uninitialized line numbers in the function spec
authorJosh Stone <jistone@redhat.com>
Sat, 19 Sep 2009 02:59:43 +0000 (19:59 -0700)
committerJosh Stone <jistone@redhat.com>
Sat, 19 Sep 2009 02:59:43 +0000 (19:59 -0700)
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.

tapsets.cxx

index 79e3b6d9da458ec44f173460cdb4024834cc63aa..8dda3918a2bd801d342266041cec6673c0d6f13e 100644 (file)
@@ -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)
This page took 0.195049 seconds and 5 git commands to generate.