From cdf6ed559ae01a88691849b1f5690cac15c8d3ae Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 9 Jun 2008 14:50:18 -0500 Subject: Fixed utrace probe '$syscall' handling. 2008-06-09 David Smith * tapsets.cxx (utrace_var_expanding_copy_visitor::visit_target_symbol): Calls 'syscall_nr' to get the value of '$syscall'. 2008-06-09 David Smith * x86_64/registers.stp (syscall_nr): Added syscall_nr function. * i686/registers.stp (syscall_nr): Ditto. --- tapsets.cxx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 1afe4267..8496e80a 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -5311,24 +5311,11 @@ utrace_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e) // Remember that we've seen a target variable. target_symbol_seen = true; - // We're going to substitute '_stp_arg(0)' for the '$syscall' - // reference. - - // First, synthesize the '0' argument. We can't use 'e->tok' as the - // token, since the token's type gets checked during pass 3. So, - // we'll synthesize a new token. - literal_number* arg = new literal_number(0); - token* arg_tok = new token; - arg_tok->type = tok_number; - arg_tok->location = e->tok->location; - arg_tok->content = e->tok->content; - arg->tok = arg_tok; - - // Synthesize a functioncall with our argument. + // We're going to substitute a synthesized 'syscall_nr' function + // call for the '$syscall' reference. functioncall* n = new functioncall; n->tok = e->tok; - n->function = "_stp_arg"; - n->args.push_back(arg); + n->function = "syscall_nr"; n->referent = 0; // NB: must not resolve yet, to ensure inclusion in session provide (this, n); -- cgit