From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Cc: Thiago Jung Bauermann <bauerman@br.ibm.com>, uweigand@de.ibm.com
Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint
Date: Tue, 03 May 2011 09:58:00 -0000 [thread overview]
Message-ID: <201105031058.44489.pedro@codesourcery.com> (raw)
In-Reply-To: <E1QH8jn-0001Wm-64@fencepost.gnu.org>
On Tuesday 03 May 2011 07:05:35, Eli Zaretskii wrote:
> We should resolve this conflict in the most direct way: introduce a
> method, to be implemented by each target, that will answer these
> questions. It should accept the exact spec of the new watchpoint, and
> it should have access to the watchpoints and breakpoints already set,
> including their full specs. With that information in hand, a target
> can reliably produce a definitive response, at least in the vast
> majority of cases, when the corresponding resources are under GDB
> control.
Consider:
gdb core -> target_ops -> remote -> remote stub -> debug API (something that actually inserts/remove watchpoints, and hides resource accounting details)
Currently, the accounting is done between gdb core and the target_ops
implementation, using target methods.
Many debug support libraries (that abstract access to jtag,
for example), and debug APIs (like ptrace) don't expose programatic methods
to do resource accounting to be able to implement such new method either.
They may even do watchpoint merging themselves (e.g., overlapping watchpoints
consume only one registers, instead of two), making it impossibly to
implement the new method other than always returning "it fits".
With such targets, the only reliable way to know whether the watchpoint
resources haven't been exausted, is to actually try to insert the watchpoint.
But this should work for the simplest APIs, like those where the backend
manages a finite set of debug registers (like most i386 backends).
What if we tried to make GDB do that instead? (try inserting
watchpoint immediately, instead of trying to do any sort of
accounting.)
--
Pedro Alves
next prev parent reply other threads:[~2011-05-03 9:58 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 [this message]
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
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=201105031058.44489.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=bauerman@br.ibm.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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