This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Extra error message from update_watchpoint
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: palves at redhat dot com, gdb-patches at sourceware dot org
- Date: Wed, 30 Oct 2013 17:41:06 +0200
- Subject: Re: [PATCH] Extra error message from update_watchpoint
- Authentication-results: sourceware.org; auth=none
- References: <5260FD66 dot 7090506 at broadcom dot com> <52616D4B dot 3020209 at redhat dot com> <526FE5E9 dot 3000909 at broadcom dot com> <83ob68dmfb dot fsf at gnu dot org> <526FF27B dot 8090209 at broadcom dot com> <5270F23E dot 7010602 at broadcom dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 30 Oct 2013 11:49:18 +0000
> From: "Andrew Burgess" <aburgess@broadcom.com>
> cc: gdb-patches@sourceware.org
>
> OK, here are a few alternatives, feel free to pick your favourites:
>
> (1) The original:
> error (_("Software read/access watchpoints not supported."));
>
> (2) Pedro's original replacement:
> error (_("Hardware watchpoint support disabled. "
> "See set/show can-use-hw-watchpoints."));
>
> (3) The original + why we can't use H/W watchpoints (bit long):
> error (_("Software read/access watchpoints not supported, "
> "re-enable hardware watchpoints using "
> "\"set can-use-hw-watchpoints 1\""));
>
> (4) Same, but with a newline to keep it under 80 chars, not sure if
> multi-line errors are acceptable though.
> error (_("Software read/access watchpoints not supported.\n"
> "Enable hardware watchpoints using "
> "\"set can-use-hw-watchpoints 1\""));
>
> (5) Mention that H/W watchpoints are disabled, but not how to re-enable
> them, though given the user has done the disabling this might be enough
> to prompt them. This is single line, and just under 80 chars.
> error (_("Software read/access watchpoints not supported, "
> "hardware watchpoints disabled."));
>
>
> My favourite is (5) at the moment, but I'll take whatever makes everyone
> else happy :)
None of the above really explains to the user why GDB is going to
refuse to abide by her command.
A good message should say something like "Cannot do SOMETHING because
SOME-REASON."
But I don't want to be in the position of blocking a commit due to
something that is just MO, so feel free to ignore me.