This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC PATCH] Fix segmentation fault of listing kprocess.create
Hi -
On Fri, Nov 06, 2009 at 09:06:25AM +0800, Wenji Huang wrote:
> [...]
> The empty token is from my patch for 10820, sorry for the
> error. [...]
No problem.
> diff --git a/tapsets.cxx b/tapsets.cxx
> index d2c3334..17e315e 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;
You shouldn't need to synthesize this either really. Just copy the
pointer from q.base_loc->tok, if we don't have a vardecl or expression
handy.
- FChE