From: Eli Zaretskii <eliz@delorie.com>
To: kettenis@wins.uva.nl
Cc: gdb@sources.redhat.com
Subject: Re: [RFC] Unified watchpoints for x86 platforms
Date: Thu, 15 Feb 2001 13:26:00 -0000 [thread overview]
Message-ID: <200102152126.QAA15597@indy.delorie.com> (raw)
In-Reply-To: <200102151833.f1FIXeq00241@delius.kettenis.local>
> Date: Thu, 15 Feb 2001 19:33:40 +0100
> From: Mark Kettenis <kettenis@wins.uva.nl>
>
> So please use the names I suggest above.
Will do.
> I think they're much clearer.
Yes, I prefer them as well.
> > Why not have simply long I386_GET_DR(int regnum) and I386_SET_DR(int
> > regnum, long value) and let the system-dependent decide how to map the
> > debug register number ([0..7], as used in the Intel documentation)
> > into whatever is needed?
>
> Why bother the target end to do that? They will all do the same, and
> the code I'll write knows exactly when it needs what register.
>
> It would make the implementation on Linux easier :-).
Could you please explain in a few words why? Even if I don't change
the interface, I think it is important for me to know about such
subtle aspects.
What I see in i386v-nat.c is that each of these macros maps directly
into a ptrace call with appropriate arguments. For example, here's
how DR7 (the debug control register) is set:
ptrace (6, pid, offsetof (struct user, u_debugreg[DR_CONTROL]),
debug_control_mirror);
and here's how DR6, the debug status register, is fetched:
status = ptrace (3, pid, offsetof (struct user, u_debugreg[DR_STATUS]), 0);
Even ia64-linux-nat.c does something very similar, even though it is
not one of the potential customers of what I'm about to write.
next prev parent reply other threads:[~2001-02-15 13:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200009070855.EAA00749@albacore>
[not found] ` <200009071500.LAA07756@indy.delorie.com>
[not found] ` <200009081529.e88FTjx15960@debye.wins.uva.nl>
2001-02-10 7:34 ` Eli Zaretskii
2001-02-10 10:19 ` H . J . Lu
2001-02-10 11:28 ` Eli Zaretskii
2001-02-15 3:48 ` Eli Zaretskii
2001-02-15 8:17 ` Mark Kettenis
2001-02-15 9:32 ` Eli Zaretskii
2001-02-15 10:33 ` Mark Kettenis
2001-02-15 13:26 ` Eli Zaretskii [this message]
2001-02-15 10:41 ` Kevin Buettner
2001-02-15 13:26 ` Eli Zaretskii
2001-02-15 14:46 ` J.T. Conklin
2001-02-15 16:11 ` Kevin Buettner
2001-02-15 23:29 ` Eli Zaretskii
2001-02-24 10:14 ` Eli Zaretskii
2001-02-27 3:28 ` Mark Kettenis
2001-02-27 10:57 ` Eli Zaretskii
2001-03-21 15:59 ` [RFA] " Eli Zaretskii
2001-02-15 23:30 ` [RFC] " Eli Zaretskii
[not found] ` <eliz@delorie.com>
2001-02-16 0:45 ` Kevin Buettner
2001-02-16 10:52 ` J.T. Conklin
2001-02-16 0:00 ` Mark Kettenis
2001-02-15 9:08 ` H . J . Lu
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=200102152126.QAA15597@indy.delorie.com \
--to=eliz@delorie.com \
--cc=gdb@sources.redhat.com \
--cc=kettenis@wins.uva.nl \
/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