From 4be13c03169ded00a0a6b0e7e7ce8d008aaa51d0 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Fri, 6 Nov 2009 10:03:32 +0800 Subject: PR10820-cont': initialize the fields of empty token * tapsets.cxx (dwarf_derived_probe::saveargs): fill fields. --- tapsets.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index d2c33349..17e315e9 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2928,6 +2928,14 @@ dwarf_derived_probe::saveargs(dwarf_query& q, Dwarf_Die* scope_die, dwarf_var_ex /* trick from visit_target_symbol_context */ target_symbol *tsym = new target_symbol; token *t = new token; + /* We hypothesize accessing the argument + * The source_loc will be base_loc since no real one */ + t->content = "$"; + t->content += arg_name; + t->type = tok_identifier; + t->location.file = q.base_loc->tok->location.file; + t->location.column = q.base_loc->tok->location.column; + t->location.line = q.base_loc->tok->location.line; tsym->tok = t; tsym->base_name = "$"; tsym->base_name += arg_name; -- cgit