diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-10-14 10:26:03 +0800 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2009-10-14 10:26:03 +0800 |
commit | 8c41e846e74026844d4b3e43778e53160f7dc27c (patch) | |
tree | ba2daa7a5fef99d3275b1f47047fc5935fda32d5 /elaborate.cxx | |
parent | 6928ee0a21a1832c9845c125b0998d45b801af81 (diff) | |
parent | 1c1f1a255cd969934bb7ce1678f4a411337be6f9 (diff) | |
download | systemtap-steved-8c41e846e74026844d4b3e43778e53160f7dc27c.tar.gz systemtap-steved-8c41e846e74026844d4b3e43778e53160f7dc27c.tar.xz systemtap-steved-8c41e846e74026844d4b3e43778e53160f7dc27c.zip |
Merge branch 'master' of ssh://wenji@sources.redhat.com/git/systemtap
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 1d7f1e0b..2446e4f8 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1283,19 +1283,16 @@ void add_global_var_display (systemtap_session& s) if (tapset_global) continue; - print_format* pf = new print_format; - probe* p = new probe; - probe_point* pl = new probe_point; probe_point::component* c = new probe_point::component("end"); - token* print_tok = new token; + probe_point* pl = new probe_point; + pl->components.push_back (c); + vector<derived_probe*> dps; block *b = new block; - pl->components.push_back (c); + probe* p = new probe; p->tok = l->tok; p->locations.push_back (pl); - print_tok->type = tok_identifier; - print_tok->content = "printf"; // Create a symbol symbol* g_sym = new symbol; @@ -1304,13 +1301,12 @@ void add_global_var_display (systemtap_session& s) g_sym->type = l->type; g_sym->referent = l; - pf->print_to_stream = true; - pf->print_with_format = true; - pf->print_with_delim = false; - pf->print_with_newline = false; - pf->print_char = false; + token* print_tok = new token; + print_tok->type = tok_identifier; + print_tok->content = "printf"; + + print_format* pf = print_format::create(print_tok); pf->raw_components += l->name; - pf->tok = print_tok; if (l->index_types.size() == 0) // Scalar { @@ -1358,15 +1354,9 @@ void add_global_var_display (systemtap_session& s) be->right = new literal_number(0); /* Create printf @count=0x0 in else block */ - print_format* pf_0 = new print_format; - pf_0->print_to_stream = true; - pf_0->print_with_format = true; - pf_0->print_with_delim = false; - pf_0->print_with_newline = false; - pf_0->print_char = false; + print_format* pf_0 = print_format::create(print_tok); pf_0->raw_components += l->name; pf_0->raw_components += " @count=0x0\\n"; - pf_0->tok = print_tok; pf_0->components = print_format::string_to_components(pf_0->raw_components); expr_statement* feb_else = new expr_statement; feb_else->value = pf_0; |