diff options
author | Stan Cox <scox@redhat.com> | 2009-03-27 12:51:22 -0400 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-03-27 12:51:22 -0400 |
commit | 467bea43a67ddb35d805aa4108fd48970003dba3 (patch) | |
tree | adef476aa97132189c8a639db7749533986dd8df | |
parent | 27aba29a01fa06488a7bd86d8bb327f3f692e218 (diff) | |
download | systemtap-steved-467bea43a67ddb35d805aa4108fd48970003dba3.tar.gz systemtap-steved-467bea43a67ddb35d805aa4108fd48970003dba3.tar.xz systemtap-steved-467bea43a67ddb35d805aa4108fd48970003dba3.zip |
Don't do beginning of statement check for .mark probes
* tapsets.cxx (dwarf_query): Add has_mark.
(query_cu): Use for beginning of statement check.
(dwarf_builder::build): Set has_mark.
-rw-r--r-- | tapsets.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 82c61525..95ec0e3a 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2850,6 +2850,8 @@ struct dwarf_query : public base_query bool has_absolute; + bool has_mark; + enum dbinfo_reqt dbinfo_reqt; enum dbinfo_reqt assess_dbinfo_reqt(); @@ -3101,6 +3103,7 @@ dwarf_query::dwarf_query(systemtap_session & sess, has_return = has_null_param(params, TOK_RETURN); has_maxactive = get_number_param(params, TOK_MAXACTIVE, maxactive_val); has_absolute = has_null_param(params, TOK_ABSOLUTE); + has_mark = false; if (has_function_str) spec_type = parse_function_spec(function_str_val); @@ -4045,9 +4048,9 @@ query_cu (Dwarf_Die * cudie, void * arg) } // Verify that a raw address matches the beginning of a // statement. This is a somewhat lame check that the address - // is at the start of an assembly instruction. - // Avoid for now since this thwarts a probe on a statement in a macro - if (0 && q->has_statement_num) + // is at the start of an assembly instruction. Mark probes are in the + // middle of a macro and thus not strictly at a statement beginning. + if (q->has_statement_num && ! q->has_mark) { Dwarf_Addr queryaddr = q->statement_num_val; dwarf_line_t address_line(dwarf_getsrc_die(cudie, queryaddr)); @@ -5797,6 +5800,7 @@ dwarf_builder::build(systemtap_session & sess, location->components[1]->arg->tok = sv_tok; ((literal_map_t&)parameters)[TOK_STATEMENT] = location->components[1]->arg; dwarf_query q(sess, base, location, *dw, parameters, finished_results); + q.has_mark = true; dw->query_modules(&q); } return; |