On Thu, 21 May 2026 22:50:33 -0400
Steven Rostedt <[email protected]> wrote:

> +static int handle_typecast(char *arg, struct fetch_insn **pcode,
> +                        struct fetch_insn *end,
> +                        struct traceprobe_parse_context *ctx)
> +{
> +     char *tmp;
> +     int ret;
> +
> +     /* Currently this only works for eprobes */
> +     if (!(ctx->flags & TPARG_FL_TEVENT)) {
> +             trace_probe_log_err(ctx->offset, TYPECAST_NOT_EVENT);
> +             return -EINVAL;
> +     }
> +
> +     tmp = strchr(arg, ')');
> +     if (!tmp) {
> +             trace_probe_log_err(ctx->offset + strlen(arg),
> +                                 DEREF_OPEN_BRACE);
> +             return -EINVAL;
> +     }
> +     *tmp = '\0';
> +     ret = query_btf_struct(arg + 1, ctx);
> +     *tmp = ')';

BTW, is there any reason to recover this? The @arg is copied
string, see traceprobe_parse_probe_arg_body().

Thanks,


-- 
Masami Hiramatsu (Google) <[email protected]>

Reply via email to