This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V2 3/9] New commands `enable probe' and `disable probe'.


Hi Jose,

Thanks for the v2!  Looks great.  Just a minor nit.

On Friday, October 10 2014, Jose E. Marchesi wrote:

> diff --git a/gdb/probe.c b/gdb/probe.c
> index 69ca0aa..c548b27 100644
> --- a/gdb/probe.c
> +++ b/gdb/probe.c
> @@ -527,6 +527,24 @@ exists_probe_with_pops (VEC (bound_probe_s) *probes,
>    return 0;
>  }
>  
> +/* Helper function that parses a probe linespec of the form [PROVIDER
> +   [PROBE [OBJNAME]]] from the provided string STR.  */
> +
> +static void
> +parse_probe_linespec (const char *str, char **provider,
> +		      char **probe_name, char **objname)
> +{
> +  *probe_name = *objname = NULL;
> +  
> +  *provider = extract_arg_const (&str);
> +  if (*provider)

Ops, another implicit comparison :-).

> +    {
> +      *probe_name = extract_arg_const (&str);
> +      if (*probe_name)

Here too.

> +	*objname = extract_arg_const (&str);
> +    }
> +}
> +

Looks good to me otherwise.

-- 
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]