Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: bauerman@br.ibm.com (Thiago Jung Bauermann)
Cc: gdb-patches@sourceware.org (gdb-patches ml)
Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
Date: Thu, 05 May 2011 11:04:00 -0000	[thread overview]
Message-ID: <201105051104.p45B4MjG001575@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <1304398546.2245.80.camel@hactar> from "Thiago Jung Bauermann" at May 03, 2011 01:55:46 AM

Thiago Jung Bauermann wrote:

> On the other hand, the current code is already broken in that regard,
> and creating several read and access watchpoints on today's GDB will
> confuse it and allow creating more hardware watchpoints (read, access or
> regular) than possible. Thus, this patch doesn't make the situation any
> worse. So now I just use b->type.
> 
> The real fix IMHO would be to make the -tdep code manage the creation
> and deletion of bp_locations, so that it could always make an informed
> decision about what can and cannot be done with the available hardware
> debug resources. But that's out of the scope of this patch series.

Yes, I'd agree with Eli and Pedro that this really ought to be fixed.
I also agree that this is independent of this patch (and in fact I'd
consider the patch a (small) step in the right direction anyway,
since it reduced the number of locations in the code where resource
accounting is done) ...

> 2011-05-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
> 
> 	* breakpoint.c (update_watchpoint): Change between software and
> 	hardware watchpoint for all kinds of watchpoints, not just
> 	read/write ones.  Determine b->exact value here instead of
> 	in watch_command_1.  Error out if there are not enough resources
> 	for a read or access hardware watchpoint.
> 	(watch_command_1): Remove logic of checking whether there are
> 	enough resources available, since update_watchpoint will do that
> 	work now.  Don't set b->exact here.  Catch exceptions thrown by
> 	update_watchpoint and delete the watchpoint.
> 	(can_use_hardware_watchpoint): Remove exact_watchpoints argument.
> 	Use target_exact_watchpoints instead.
> 	(delete_breakpoint): Notify observers only if deleted watchpoint
> 	has a breakpoint number assigned to it.

As Eli has withdrawn objections to the patch, this is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  parent reply	other threads:[~2011-05-05 11:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 20:55 [RFA] Implement support for PowerPC BookE masked watchpoints Thiago Jung Bauermann
2011-01-31 20:09 ` Thiago Jung Bauermann
2011-02-17 15:10 ` Ulrich Weigand
2011-04-18 21:22   ` [RFA 1/3] Change watchpoint's enable state in do_enable_breakpoint Thiago Jung Bauermann
2011-04-29 17:21     ` Ulrich Weigand
2011-05-04  0:11       ` Thiago Jung Bauermann
2011-04-18 21:22   ` [RFA 2/3] Demote to sw watchpoint only in update_watchpoint Thiago Jung Bauermann
2011-04-29 17:26     ` Ulrich Weigand
2011-05-03  4:56       ` Thiago Jung Bauermann
2011-05-03  6:05         ` Eli Zaretskii
2011-05-03  9:58           ` Pedro Alves
2011-05-03 16:57             ` Eli Zaretskii
2011-05-03 17:41               ` Pedro Alves
2011-05-03 18:03                 ` Eli Zaretskii
2011-05-03 18:12                   ` Pedro Alves
2011-05-03 20:30                     ` Eli Zaretskii
2011-05-04  0:03                       ` Thiago Jung Bauermann
2011-05-04  3:07                         ` Eli Zaretskii
2011-05-04 22:21                           ` Thiago Jung Bauermann
2011-05-05  3:09                             ` Eli Zaretskii
2011-05-05  8:15                             ` Pedro Alves
2011-05-05 10:28                               ` Eli Zaretskii
2011-05-05 15:27                                 ` Pedro Alves
2011-05-05 16:27                                   ` Eli Zaretskii
2011-05-05 11:10                               ` Ulrich Weigand
2011-05-05 15:21                                 ` Pedro Alves
2011-05-04 19:12           ` Thiago Jung Bauermann
2011-05-04 20:31             ` Eli Zaretskii
2011-05-04 22:22               ` Thiago Jung Bauermann
2011-05-05 11:04         ` Ulrich Weigand [this message]
2011-04-18 21:24   ` [RFA 3/3] Implement support for PowerPC BookE masked watchpoints Thiago Jung Bauermann
2011-04-29 17:46     ` Ulrich Weigand
2011-05-03  4:56       ` [needs doc review] " Thiago Jung Bauermann
2011-05-03  6:24         ` Eli Zaretskii
2011-05-05 21:57           ` Thiago Jung Bauermann
2011-05-06 10:28             ` Eli Zaretskii
2011-05-06 20:35               ` Thiago Jung Bauermann
2011-05-05 11:07         ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201105051104.p45B4MjG001575@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox