This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Forbid watchpoint on a constant value
- From: Tom Tromey <tromey at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Date: Tue, 15 Jun 2010 11:29:37 -0600
- Subject: Re: [PATCH] Forbid watchpoint on a constant value
- References: <20100521070500.GA30452@host0.dyn.jankratochvil.net> <201005211912.39680.sergiodj@redhat.com> <20100528231122.GO3019@adacore.com> <201006050150.08687.sergiodj@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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