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: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Oct 2013 17:09:01 +0000
- 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>
On 10/29/2013 04:44 PM, Andrew Burgess wrote:
> On 18/10/2013 6:18 PM, Pedro Alves wrote:
>> On 10/18/2013 10:20 AM, Andrew Burgess wrote:
>>> @@ -1946,8 +1946,13 @@ update_watchpoint (struct watchpoint *b, int reparse)
>>> }
>>> }
>>> else if (!b->base.ops->works_in_software_mode (&b->base))
>>> - error (_("Expression cannot be implemented with "
>>> - "read/access watchpoint."));
>>> + {
>>> + if (!can_use_hw_watchpoints)
>>> + error (_("Software read/access watchpoints not supported."));
>>
>> Hmm, is this really "not supported", or rather "explicitly disabled"?
>> I think I'd prefer:
>>
>> error (_("Hardware watchpoints support disabled. "
>> "See set/show can-use-hw-watchpoints."));
>>
>> which also hints towards the toggle. WDYT?
>
> I used that error message as it matches the one I already added in:
> https://sourceware.org/ml/gdb-patches/2013-10/msg00563.html
> but I don't really mind.
Whoops, I didn't really pay much attention to the string back then.
> Ideally you might want both bits of the error message, you've
> turned off H/W watchpoints so you need to be told that read/access
> watchpoints are not supported in S/W, but I agree, we should also
> let the user know that H/W watchpoints have been turned off and
> could be turned back on again. That seems like too much for one
> error message though... I'm happy to go with your suggestion.
>
> Updated patch changes both error messages to match, OK to apply?
OK.
Thanks!
--
Pedro Alves