This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/5] Explicit linespecs - breakpoint API
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Mon, 30 Jul 2012 18:13:34 +0200
- Subject: Re: [RFA 2/5] Explicit linespecs - breakpoint API
- References: <50120F50.50803@redhat.com>
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