From: Eli Zaretskii <eliz@is.elta.co.il>
To: Michael Snyder <msnyder@cygnus.com>
Cc: kettenis@wins.uva.nl, gdb-patches@sources.redhat.com
Subject: Re: [PATCH]: Make Linux use the new unified x86 watchpoint support
Date: Wed, 28 Mar 2001 01:30:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1010328111731.4337B-100000@is> (raw)
In-Reply-To: <3AC0F081.5923D16D@cygnus.com>
On Tue, 27 Mar 2001, Michael Snyder wrote:
> > How does GDB know if the target is local or remote? Can the Linux
> > implementation of I386_DR_LOW_* macros test that and avoid calling
> > ptrace in that case?
>
> If you say "run" it's native -- if you say "target remote /dev/tty0"
> it's remote. Or did you mean how can you tell programmatically?
Programmatically, yes.
> There is no clean way, other than to test "current_target", eg.
> if (strcmp (current_target.to_shortname, "remote") == 0)
> and that's obviously not the nicest approach.
It's not nice, but I386_DR_LOW_* macros (or the Linux-specific
functions they call) could make such a test and avoid ptrace, if that
is the source of trouble.
However, Mark seems to tell that his simpler band-aid also works.
In the longer run, we could make watchpoints work even in remote
debugging, provided that there's a facility in the remote protocol to
fiddle with debug registers (sorry, I don't know anything about the
remote protocol, so I might be saying something stupid). Just make
the Linux-specific implementations of I386_DR_LOW_* macros send the
right packet if the target's name is "remote".
> I've no idea, I just know that it suddenly stopped working
> with these changes. And I'm not talking about watchpoints
> working -- I'm talking about _anything_ working. There is a
> call to STOPPED_BY_WATCHPOINT in wait_for_inferior, and
> you can't even connect to the target without wait_for_inferior
> being called.
Actually, that call to STOPPED_BY_WATCHPOINT is IMHO totally bogus: no
one looks at the result it returns, and I have yet to see any
implementation of watchpoints that needs that call.
I'm guessing that this call goes back to the implementation for
Sparclite, which uses this call to produce a side effect (to be able
to step over the instruction which caused the watchpoint to trigger),
see config/sparc/tm-sparclite.h. Since this seems to be the only
platform which needs a side effect, and since we already have an
equivalent mechanism for doing the same, with the HAVE_*_WATCHPOINT
macros, I think this call can be removed.
next prev parent reply other threads:[~2001-03-28 1:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-21 18:47 Mark Kettenis
2001-03-26 18:14 ` Michael Snyder
2001-03-27 0:46 ` Mark Kettenis
2001-03-27 8:45 ` Michael Snyder
2001-04-17 17:26 ` Michael Snyder
2001-04-17 23:58 ` Mark Kettenis
2001-03-26 18:35 ` Michael Snyder
2001-03-26 22:57 ` Eli Zaretskii
2001-03-27 1:13 ` Mark Kettenis
2001-03-27 1:31 ` Eli Zaretskii
2001-03-27 2:09 ` Mark Kettenis
2001-03-27 2:20 ` Eli Zaretskii
2001-03-27 10:58 ` Mark Salter
2001-03-28 1:19 ` Eli Zaretskii
2001-03-28 5:10 ` Mark Salter
2001-03-28 5:39 ` Eli Zaretskii
2001-03-28 8:06 ` Mark Salter
2001-03-29 12:06 ` Eli Zaretskii
2001-03-29 12:03 ` Mark Salter
2001-03-27 8:55 ` Michael Snyder
2001-03-27 9:46 ` Eli Zaretskii
2001-03-27 9:55 ` Fernando Nasser
2001-03-27 11:59 ` Michael Snyder
2001-03-27 12:04 ` Fernando Nasser
2001-03-27 11:58 ` Michael Snyder
2001-03-28 1:31 ` Eli Zaretskii
2001-03-28 2:03 ` Mark Kettenis
2001-03-27 8:52 ` Michael Snyder
2001-03-27 15:51 ` Mark Kettenis
2001-03-27 10:03 ` Andrew Cagney
2001-03-27 8:48 ` Michael Snyder
2001-03-27 9:43 ` Eli Zaretskii
2001-03-27 11:57 ` Michael Snyder
2001-03-28 1:30 ` Eli Zaretskii [this message]
2001-03-28 11:53 ` Michael Snyder
2001-03-29 12:06 ` Eli Zaretskii
[not found] <Pine.SUN.3.91.1010329160617.4915G-100000@is>
2001-03-29 18:15 ` Mark Salter
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=Pine.SUN.3.91.1010328111731.4337B-100000@is \
--to=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@wins.uva.nl \
--cc=msnyder@cygnus.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