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] Forbid watchpoint on a constant value


>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:

Sergio> 2010-06-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
Sergio> 	    Sergio Durigan Junior  <sergiodj@redhat.com>
Sergio> 	* breakpoint.c: Include parser-defs.h.
Sergio> 	(watchpoint_exp_is_const): New function.
Sergio> 	(watch_command_1): Call watchpoint_exp_is_const to check
Sergio> 	if the expression is constant.

Looks pretty good.

Sergio> +static int watchpoint_exp_is_const (const struct expression *exp);

I don't think you should need this forward declaration.

Sergio> +    gdb_test_no_output "set \$expr_breakpoint_number = \$bpnum"
Sergio> +    gdb_test_no_output "delete \$expr_breakpoint_number"

I don't see why you can't just use "delete \$bpnum" here.
More importantly, because these commands are repeated, they should be
given distinguishing names.

This patch is ok with those changes.  Thanks.

Tom


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