From c5746f91b1ba8f374b4230e16cb33e1b9206ca2b Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Tue, 31 Mar 2009 11:54:26 -0400 Subject: Customize .mark -l output. * tapsets.cxx (dwarf_builder::build): Add .mark name wildcard check. Customize -l handling. * testsuite/systemtap.base/static_uprobes.exp: Test .mark name wildcard. --- tapsets.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 690d7e28..50ee563a 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -5806,16 +5806,29 @@ dwarf_builder::build(systemtap_session & sess, probe_arg = *((__uint64_t*)((char*)pdata->d_buf + probe_scn_offset)); if (probe_scn_offset % (sizeof(__uint64_t)*2)) probe_scn_offset = (probe_scn_offset + sizeof(__uint64_t)*2) - (probe_scn_offset % (sizeof(__uint64_t)*2)); - if (strcmp (location->components[1]->arg->tok->content.c_str(), probe_name.c_str()) != 0) + if ((strcmp (location->components[1]->arg->tok->content.c_str(), + probe_name.c_str()) == 0) + || (dw->name_has_wildcard (location->components[1]->arg->tok->content.c_str()) + && dw->function_name_matches_pattern + (probe_name.c_str(), + location->components[1]->arg->tok->content.c_str()))) + ; + else continue; const token* sv_tok = location->components[1]->arg->tok; location->components[1]->functor = TOK_STATEMENT; location->components[1]->arg = new literal_number((int)probe_arg); 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); + if (sess.listing_mode) + { + finished_results.back()->locations[0]->components[1]->functor = TOK_MARK; + finished_results.back()->locations[0]->components[1]->arg = new literal_string (probe_name.c_str()); + } } return; } -- cgit