From 1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 18 Sep 2009 19:59:43 -0700 Subject: [PATCH] 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. --- tapsets.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tapsets.cxx b/tapsets.cxx index 79e3b6d9d..8dda3918a 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) -- 2.43.5