summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-03-31 11:54:26 -0400
committerStan Cox <scox@redhat.com>2009-03-31 11:54:26 -0400
commitc5746f91b1ba8f374b4230e16cb33e1b9206ca2b (patch)
tree7d185a70bc61ab0fb211b0c14b7cbc53f8244474 /tapsets.cxx
parent2397bb1aae49121d35cbd9f3863b4f6df202201f (diff)
downloadsystemtap-steved-c5746f91b1ba8f374b4230e16cb33e1b9206ca2b.tar.gz
systemtap-steved-c5746f91b1ba8f374b4230e16cb33e1b9206ca2b.tar.xz
systemtap-steved-c5746f91b1ba8f374b4230e16cb33e1b9206ca2b.zip
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.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx15
1 files changed, 14 insertions, 1 deletions
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;
}