From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] Use i386_use_watchpoints for go32v2, bds and windows native
Date: Mon, 09 Feb 2009 07:33:00 -0000 [thread overview]
Message-ID: <000401c98a88$afe4c2c0$0fae4840$@u-strasbg.fr> (raw)
In-Reply-To: <uprhss12h.fsf@gnu.org>
From Eli Zaretskii
> Envoyé : Monday, February 09, 2009 5:10 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Use i386_use_watchpoints for go32v2, bds and windows
> native
>
> > From: "Pierre Muller" <muller@ics.u-strasbg.fr>
> > Date: Mon, 9 Feb 2009 00:22:50 +0100
> >
> > The correction of this problem is easy, as it is already
> implemented
> > for linux.
> > The patch only adds
> > #define I386_WATCHPOINTS_IN_TARGET_VECTOR
> > to all config/i386/nm-*.h
> > that defines I386_USE_GENERIC_WATCHPOINTS
> > before including nm-i386.h
> > and add the corresponding call
> > to i386_use_watchpoints (target)
> > in the native file when the target vector gets
> > defined.
> >
> > I found only three places where this happens:
> > nm-go32.h with native go32-nat.c
> > nm-fbsd.h with native i386bsd-nat.c
> > and
> > nm-cygwin.h and nm-cygwin64.h with native windows-nat.c
>
> I don't necessarily object, but could you please explain what does
> each of these two changes do? That is, what does defining
> I386_WATCHPOINTS_IN_TARGET_VECTOR accomplish, and why we need to call
> i386_use_watchpoints?
The function i386_use_watchpoints
simply sets the target vector fields related to hardware watchpoints.
But this change alone is useless as the mechanism used to set
hardware watchpoints in gdb relies on macros
called target_insert_watchpoint or target_remove_watchpoint
(plus others), macros that are set in nm-i386.h
to call directly i386_insert_watchpoint/i386_remove_watchpoint,
unless the macro I386_WATCHPOINTS_IN_TARGET_VECTOR is also
defined when parsing that header.
If target_xxx_watchpoint are set by nm-i386.h header,
'target remote' or 'target extended-remote' do not
work as expected for remote hardware watchpoints because
instead of calling remove_insert_watchpoint and similar,
which generate the Z2 to Z4 packets, it still
calls the native i386_insert_watchpoint.
You might argue that this is not very useful for djgpp
native, but there are other points in favor of that patch:
- the patch removes completely the use of
this native definitions of target_xxxx_wqatchpoint
macros and are as such supported by the ARI list.
- the 'set debug target 1' command also is affected
by that patch.
Before the patch no watchpoint messages are printed out,
while they are after.
The above applies to all targets concerned by the patch.
By the way, should I split this into three independent
patches for each target or is it better if I leave it as
one single piece?
Pierre Muller
Pascal language support maintainer for GDB
next prev parent reply other threads:[~2009-02-09 7:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-08 23:22 Pierre Muller
2009-02-09 4:10 ` Eli Zaretskii
2009-02-09 7:33 ` Pierre Muller [this message]
2009-02-09 20:38 ` Eli Zaretskii
2009-02-13 11:06 ` [RFA-v2] " Pierre Muller
2009-02-14 19:22 ` Christopher Faylor
2009-02-20 10:56 ` [PING][RFA-v2] " Pierre Muller
2009-02-21 0:04 ` Mark Kettenis
2009-02-21 10:55 ` Pierre Muller
2009-02-09 11:07 ` [RFA] " Mark Kettenis
2009-02-09 12:34 ` Pierre Muller
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='000401c98a88$afe4c2c0$0fae4840$@u-strasbg.fr' \
--to=muller@ics.u-strasbg.fr \
--cc=eliz@gnu.org \
--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