Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Siva Velusamy" <siva.velusamy@gmail.com>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: gdb@sourceware.org
Subject: Re: rwatchpoint configuration
Date: Tue, 18 Dec 2007 07:22:00 -0000	[thread overview]
Message-ID: <e7dfeff00712172322t7a68c6eat8eb71c010a3b844b@mail.gmail.com> (raw)
In-Reply-To: <u8x3sk4wn.fsf@gnu.org>

>
> For now, you could try a workaround: put two watchpoints on the same
> expression: one an rwatch (the one you wanted), the other a write
> watchpoint whose `commands' say just "continue".  This should cause GDB
> to note the changed value when it is written into the variable(s), so
> when the rwatch triggers it will see the known value and stop.
>
> Please see if this works for you.  If it doesn't, please tell more
> details.
>

This will probably sound like an ugly hack, but I ended up just
commenting out the logic that checks to see if the value has changed
in the case of a read breakpoint. So I bypass this issue at compile
time.

Setting an rwatch and a watch will work, but it wastes an additional
watchpoint resource (which is scarce on MicroBlaze). Plus gdb is being
used via Eclipse in this particular environment which would
necessitate changes in a bunch of other places to seamlessly do this.

My interaction with gdb code has been limited to minor target specific
bugfixes, so I probably do not understand all the ramifications to
propose a good solution. However, it seems to me that it should be
possible to make this check conditional at runtime based on some field
in current_target..say
current_target->target_supports_true_read_watchpoints.

-Siva


  reply	other threads:[~2007-12-18  7:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18  0:43 Siva Velusamy
2007-12-18  0:48 ` Daniel Jacobowitz
2007-12-18  0:53   ` Siva Velusamy
2007-12-18  0:59   ` Siva Velusamy
2007-12-18  2:27     ` Daniel Jacobowitz
2007-12-18  4:16     ` Eli Zaretskii
2007-12-18  4:23     ` Eli Zaretskii
2007-12-18  7:22       ` Siva Velusamy [this message]
2007-12-18  4:19   ` Eli Zaretskii

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=e7dfeff00712172322t7a68c6eat8eb71c010a3b844b@mail.gmail.com \
    --to=siva.velusamy@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb@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