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: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Cc: uweigand@de.ibm.coma, gdb-patches@sourceware.org
> Date: Wed, 04 May 2011 16:12:24 -0300
> 
> GDB doesn't have a command to create a hardware watchpoint or a software
> watchpoint. It will decide which will be created based on what it thinks
> can be done. Do you think this should be changed and there should be an
> hwatch command which would fail if an hw watchpoint is not possible? Or
> just that a watchpoint should never be converted between sw and hw after
> they are created?

It certainly is bad to have the demotion happen when you resume the
inferior.  Pedro's suggestion resolves this as well, because the
problem will be revealed at "watch foo" time.  If and when we
implement that, there will be no need for "hwatch", I think, as the
user will see the problem on the spot and can take corrective actions
in time.

> So the problem is still there. It's not better, but not worse either.
> The output is slightly different because of the better error handling
> this patch introduces. Thus, IMHO overhauling resources handling is not
> a prerequisite or even directly related to this patch (or the next one
> in the series). The acceptance or rejection of this patch is orthogonal
> to that.

Fair enough.  I withdraw my objections to the patch.

> Having said that, I agree that it's a shame that GDB can't keep track of
> debug hardware availability, something that one would expect to be among
> the basic tasks of a debugger. So if we can agree on how GDB should deal
> with the problem, I'm willing to work on it on a best effort basis
> (meaning that I wouldn't have much time to dedicate to this, but would
> eventually make progress).

Thank you.  I think Pedro's idea is already on the table, and no one
objected to it.  If it is feasible, I'd say let's do it that way.


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