Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: Remote watchpoint support for FRV
Date: Fri, 05 Oct 2007 13:48:00 -0000	[thread overview]
Message-ID: <200710051347.l95DlrFe018076@d12av02.megacenter.de.ibm.com> (raw)

Hello,

the tm-frv.h header file overrides a number of watchpoint related
target macros, in particular:

#define STOPPED_BY_WATCHPOINT(W) \
   ((W).kind == TARGET_WAITKIND_STOPPED \
   && (W).value.sig == TARGET_SIGNAL_TRAP \
   && frv_have_stopped_data_address())

Note that FRV is a remote-only target, so this will affect and
modifiy the behaviour of the remote.c watchpoint handling.

Apparently the intent is to use the standard remote protocol
mechanisms to *set* watchpoints, but change the way to test
whether a watchpoint was hit.  Usually, remote.c would rely
on the remote stub to detect this condition and report it
via a "watch" stop reason in the stop reply packet.

However, due to the tm-frv.h override, for FRV targets GDB
will actually perform the check on the host side (by reading
control registers via the normal register access protocol).


To get rid of the TM header file, I can see two options:

- Simply remove support for this way of handling remote 
  watchpoints.  Existing FRV remote stubs will need to be
  changed to use the standard "watch" stop reason code.

- If we think we cannot break existing FRV stubs, I'd
  suggest to add new gdbarch callbacks that will be used
  by the remote target to allow architecture-specific
  overrides of the remote watchpoint mechanism, e.g.:
    
     gdbarch_remote_stopped_by_watchpoint
     gdbarch_remote_stopped_data_address
     gdbarch_remote_check_watch_resources


Any opinions on this?  The first option would obviously be
the easiest to implement in GDB, but I'm not sure what extent
FRV remote stubs are currently in use ...

Bye,
Ulrich

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


             reply	other threads:[~2007-10-05 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 13:48 Ulrich Weigand [this message]
2007-10-05 13:56 ` Daniel Jacobowitz
2007-10-14 20:13   ` Ulrich Weigand
2007-10-24 19:34     ` Daniel Jacobowitz
2007-10-24 21:06       ` [commit] " 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=200710051347.l95DlrFe018076@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.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