public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Paul Koning <pkoning@equallogic.com>
To: msalter@redhat.com
Cc: gdb@sources.redhat.com
Subject: Re: watchpoint troubles
Date: Wed, 07 May 2003 18:53:00 -0000	[thread overview]
Message-ID: <16057.22019.173960.269354@pkoning.dev.equallogic.com> (raw)
In-Reply-To: <20030507183329.88D0B7885A@deneb.localdomain>

>>>>> "Mark" == Mark Salter <msalter@redhat.com> writes:

>>>>> Paul Koning writes:
 >> I'm having all sorts of watchpoint troubles with gdb 5.3 and a
 >> remote target.  These are things I'm running into as I'm working
 >> to improve the implementation of watchpoints in my remote stub.

 Mark> ...

 >> Without that flag, the first thing that gdb does after the
 >> watchpoint entry is to read the address being watched.  Needless
 >> to say, that causes a watchpoint recursion within the target stub.
 >> In the case where HAVE_NONSTEPPABLE_WATCHPOINT is defined, things
 >> work because the watchpoint is removed before the memory read
 >> request is made.

 >> Since gdb normally removes and reinserts watch/break points on
 >> every entry, I figured it's gdb's job to do things in the right
 >> order.  Bad assumption?  I can certainly hack up the stub to
 >> remove the watchpoints before acting on any memory access requests
 >> from gdb, but is that kind of hackery supposed to be done?

 Mark> This has come up before:

 Mark> http://sources.redhat.com/ml/gdb-patches/2001-03/msg00506.html

 Mark> I think the answer is that the stub should disable watchpoints
 Mark> anytime the target stops and reenable them when stepping or
 Mark> continuing.

Thanks.  

I just read that thread and the final message seems to say "gdb can be
fixed to remove the watchpoints before doing the memory read in the
case where HAVE_NONSTEPPABLE_WATCHPOINT is undefined.  Yes, I thought
so.

I may do that just to try it.  As I mentioned, what I *really* want is
for the case where HAVE_NONSTEPPABLE_WATCHPOINT *is* defined to work
correctly.  Right now it doesn't.

    paul

  reply	other threads:[~2003-05-07 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 17:59 Paul Koning
2003-05-07 18:33 ` Mark Salter
2003-05-07 18:53   ` Paul Koning [this message]
2003-05-07 19:38     ` Paul Koning
2003-05-07 21:45     ` Paul Koning

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=16057.22019.173960.269354@pkoning.dev.equallogic.com \
    --to=pkoning@equallogic.com \
    --cc=gdb@sources.redhat.com \
    --cc=msalter@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).