[RFA 2/5] Explicit linespecs - breakpoint API

Jan Kratochvil jan.kratochvil@redhat.com
Mon Jul 30 16:14:00 GMT 2012


On Fri, 27 Jul 2012 05:47:28 +0200, Keith Seitz wrote:
> --- a/gdb/linespec.h
> +++ b/gdb/linespec.h
> @@ -53,6 +53,27 @@ struct linespec_sals
>  typedef struct linespec_sals linespec_sals;
>  DEF_VEC_O (linespec_sals);
>  
> +/* A description of an explicit linespec.  */

It should explain what does 'explicit' mean and what does 'linespec' mean.

> +
> +struct explicit_linespec
> +{
> +  /* An expression, *expr  */
> +  const char *expression;

It should explain that this field is used if user specified '*' as the first
character of the expression, then remaining text is stored here and other
fields remain NULL.

Although it should all maybe be enum + union as suggested in the other mail.


> +
> +  /* The source filename  */

I find better the comment in 'struct linespec':
  /* The user-supplied source filename or NULL if none was specified.  */


> +  const char *source_filename;
> +
> +  /* The function name  */
> +  const char *function_name;

+User may specify both mangled or demangled form.


> +
> +  /* The name of a label  */
> +  const char *label_name;

C source label, it could be also asm label seen by GDB as minsym.

> +
> +  /* An offset  */

As pointed out by Eli 'offset' does not say much what does it mean.

> +  const char *offset;
> +};
> +typedef struct explicit_linespec explicit_linespec;


Thanks,
Jan



More information about the Gdb-patches mailing list