Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jie Zhang <jie.zhang@analog.com>
To: Guillaume MENANT <guillaume.menant@geensys.com>
Cc: gdb@sourceware.org
Subject: Re: Write watchpoints
Date: Thu, 06 Mar 2008 20:24:00 -0000	[thread overview]
Message-ID: <47D04329.7080600@analog.com> (raw)
In-Reply-To: <15867705.post@talk.nabble.com>

Guillaume MENANT wrote:
> I'm trying to implement watchpoints management in my software but it doesn't
> works. For a write watchpoint at 0x800000A4,  GDB sets it (Z2) and then the
> watchpoint triggers on my board (just before executing the asm instruction
> which modifies the 0x800000A4 address), so I send back the answer
> T05watch800000A4 to GDB before effectively writing to the 0x800000A4
> address. Then GDB reads the system registers (G), reads at the 0x800000A4
> address, unsets the watchpoint, reads at the 0x800000A4 address, re-sets the
> watchpoint (at the same address) and make a continue. Then the watchpoint
> triggers again immediately  because the instruction modifying the 0x800000A4
> address has not been executed before.
> 
> What is the problem with this GDB flow ? What can I do ?
> 
It seems that gdb expects the address of the next instruction to
watchpoint when watchpoint is triggered. Blackfin is similar to your
target: the watchpoint is triggered just when the address appears on the
address bus and before the write happens. We just do a single step and
send the address of the next instruction of the one which triggers the 
watchpoint to gdb.


Jie




      parent reply	other threads:[~2008-03-06 19:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06  7:09 Guillaume MENANT
2008-03-06  9:24 ` Vladimir Prus
2008-03-06 16:19   ` Daniel Jacobowitz
2008-03-06 16:45     ` Vladimir Prus
2008-03-06 16:52       ` Daniel Jacobowitz
2008-03-06 20:24 ` Jie Zhang [this message]

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=47D04329.7080600@analog.com \
    --to=jie.zhang@analog.com \
    --cc=gdb@sourceware.org \
    --cc=guillaume.menant@geensys.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