diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-09-01 13:46:27 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-09-01 13:46:27 -0400 |
commit | aa3c05113d831a4e5d58287f9f2f9d605bf8693e (patch) | |
tree | 850b215d67d0621fbfb575dc34aca3bf3bc1fa0a /elaborate.cxx | |
parent | 6f4c12753354d3e0f6b18d6290e1bf89c5084c5c (diff) | |
parent | 5e314609f46deb737967305f59356243cb65c310 (diff) | |
download | systemtap-steved-aa3c05113d831a4e5d58287f9f2f9d605bf8693e.tar.gz systemtap-steved-aa3c05113d831a4e5d58287f9f2f9d605bf8693e.tar.xz systemtap-steved-aa3c05113d831a4e5d58287f9f2f9d605bf8693e.zip |
Merge commit 'origin/master' into pr4225
* commit 'origin/master':
Fix memory access error in nfs.proc.read_setup, nfs.proc.write_setup and nfs.proc.commit_setup
Update NEWS regarding the systemtap client/server.
New man page for the systemtap client/server and related utilities.
Repopulate symbol/type info.
Pushed quiesce logic down into the task_finder layer.
Added bug 6841 fix utrace syscall test.
PR6731: improve listing mode to list variables
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 88133c31..7ecba049 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1170,6 +1170,7 @@ void add_global_var_display (systemtap_session& s) probe_point::component* c = new probe_point::component("end"); token* print_tok = new token; vector<derived_probe*> dps; + block *b = new block; pl->components.push_back (c); token* p_tok = new token; @@ -1206,17 +1207,7 @@ void add_global_var_display (systemtap_session& s) expr_statement* feb = new expr_statement; feb->value = pf; feb->tok = print_tok; - block *b = new block; b->statements.push_back(feb); - p->body = b; - - derive_probes (s, p, dps); - - // Repopulate the type info. Should semantic_pass_types do this? - ((class symbol*) - ((class print_format*) - ((class expr_statement*) - ((class block*)dps[0]->body)->statements[0])->value)->args[0])->type = g_sym->type; } else // Array { @@ -1283,44 +1274,28 @@ void add_global_var_display (systemtap_session& s) pf->components = print_format::string_to_components(pf->raw_components); expr_statement* feb = new expr_statement; feb->value = pf; - block *b = new block; fe->base = g_sym; fe->block = (statement*)feb; b->statements.push_back(fe); - p->body = b; - - derive_probes (s, p, dps); - - // Repopulate the type info. Should semantic_pass_types do this? - print_format* dpf = ((print_format*) - ((expr_statement*) - ((foreach_loop*) - ((block*)dps[0]->body)->statements[0])->block)->value); - for (int i=0; i < idx_count; i++) - { - // printf argument types - dpf->args[i]->type = l->index_types[i]; - // arrayindex indices types - ((struct arrayindex*)dpf->args[idx_count])->indexes[i]->type = l->index_types[i]; - dps[0]->locals.push_back(idx_v[i]); - } - // arrayindex type - dpf->args[idx_count]->type = l->type; } - symresolution_info sym (s); - sym.current_function = 0; - sym.current_probe = dps[0]; - dps[0]->body->visit (& sym); - // Add created probe + p->body = b; + derive_probes (s, p, dps); for (unsigned i = 0; i < dps.size(); i++) { derived_probe* dp = dps[i]; s.probes.push_back (dp); dp->join_group (s); } + // Repopulate symbol and type info + symresolution_info sym (s); + sym.current_function = 0; + sym.current_probe = dps[0]; + dps[0]->body->visit (& sym); + semantic_pass_types(s); + // Mark that variable is read vut.read.insert (l); } } |