From: Kevin Buettner <kevinb@redhat.com>
To: rda@sources.redhat.com
Subject: [PATCH] Disable registers CAUSE and BADADDR for linux/mips targets
Date: Thu, 23 Jan 2003 06:44:00 -0000 [thread overview]
Message-ID: <1030123064355.ZM29728@localhost.localdomain> (raw)
I've just committed the patch below. These non-writable registers
were causing quite a few testsuite failures. If someone provides a
compelling reason for making the registers available for user space
debugging, I'll look for a different solution. (I've also snuck in a
build related patch from Alex.)
2003-01-22 Kevin Buettner <kevinb@redhat.com>
* linux-target.c (struct peekuser_pokeuser_reginfo)
[MIPS64_LINUX_TARGET, MIPS_LINUX_TARGET]: Disable registers ``cause''
and ``bad'' since they are not writable via ptrace().
2003-01-19 Alexandre Oliva <aoliva@redhat.com>
* linux-target.c: Don't assume asm-mips/ is available, use just
asm instead.
Index: linux-target.c
===================================================================
RCS file: /cvs/src/src/rda/unix/linux-target.c,v
retrieving revision 1.3
diff -u -p -r1.3 linux-target.c
--- linux-target.c 18 Dec 2002 20:25:11 -0000 1.3
+++ linux-target.c 23 Jan 2003 06:38:59 -0000
@@ -30,7 +30,7 @@
#if !defined(_MIPSEL) && !defined(_MIPSEB)
#include <stdint.h>
#else
-#include <asm-mips/inst.h>
+#include <asm/inst.h>
#endif
#include <sys/ptrace.h>
@@ -473,8 +473,14 @@ static struct peekuser_pokeuser_reginfo
asm-mips/reg.h. Note, however, that the kernel header sandwiches
the status register (sr, above) in between ``bad'' and ``cause''. */
+#if 0
+ /* CAUSE and BADVADDR are readable via ptrace, but they're not writable. */
{ BADVADDR, 4, GREGS, 35 * 4, 4, PROTO_SIZE }, /* bad */
{ CAUSE, 4, GREGS, 36 * 4, 4, PROTO_SIZE }, /* cause */
+#else
+ { 0, 8, NOREGS, 0, 8, 8 }, /* bad */
+ { 0, 8, NOREGS, 0, 8, 8 }, /* cause */
+#endif
{ PC, 4, GREGS, 34 * 4, 4, PROTO_SIZE }, /* pc */
/* Linux/MIPS floating point is a bit of a mess. On the one hand,
@@ -587,8 +593,14 @@ static struct peekuser_pokeuser_reginfo
asm-mips/reg.h. Note, however, that the kernel header sandwiches
the status register (sr, above) in between ``bad'' and ``cause''. */
+#if 0
+ /* CAUSE and BADVADDR are readable via ptrace, but they're not writable. */
{ 66, 8, GREGS, 35 * 4, 8, 8 }, /* bad */
{ 65, 8, GREGS, 36 * 4, 8, 8 }, /* cause */
+#else
+ { 0, 8, NOREGS, 0, 8, 8 }, /* bad */
+ { 0, 8, NOREGS, 0, 8, 8 }, /* cause */
+#endif
{ 64, 8, GREGS, 34 * 4, 8, 8 }, /* pc */
/* Linux/MIPS floating point is a bit of a mess. On the one hand,
reply other threads:[~2003-01-23 6:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1030123064355.ZM29728@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=rda@sources.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).