From: Kevin Buettner <kevinb@redhat.com>
To: rda@sources.redhat.com
Subject: [commit] FRV register related updates
Date: Mon, 09 Apr 2007 22:40:00 -0000 [thread overview]
Message-ID: <20070409154003.00b1a773@ironwood.lan> (raw)
I've comitted the patch below. It updates NUM_REGS (which should've
been done quite a while back) and prevents an error when attempting to
read PSR on FRV.
unix/ChangeLog:
* linux-target.c (NUM_REGS)[FRV_LINUX_TARGET]: Update.
(frv_read_only_register): New function.
(reginfo)[FRV_LINUX_TARGET]: Mark as read-only.
Index: unix/linux-target.c
===================================================================
RCS file: /cvs/src/src/rda/unix/linux-target.c,v
retrieving revision 1.23
diff -u -p -r1.23 linux-target.c
--- unix/linux-target.c 3 Oct 2006 22:49:05 -0000 1.23
+++ unix/linux-target.c 9 Apr 2007 22:33:39 -0000
@@ -1252,7 +1252,7 @@ is_extended_reg (int regnum)
enum
{
- NUM_REGS = 149,
+ NUM_REGS = 166,
PC_REGNUM = 128,
sign_extend = 0
};
@@ -1263,6 +1263,8 @@ enum
static int frv_fdpic_loadmap_addresses (struct gdbserv *, int, int, void *,
const void *);
+static int frv_read_only_register (struct gdbserv *, int, int, void *,
+ const void *);
static struct peekuser_pokeuser_reginfo reginfo[] =
{
@@ -1398,7 +1400,8 @@ static struct peekuser_pokeuser_reginfo
{ PT_FR(63) * 4, 4, fpreg_offset_and_size (fr[63]), 4, 0 },
{ PT_PC * 4, 4, greg_offset_and_size (pc), 4, 0 },
- { PT_PSR * 4, 4, greg_offset_and_size (psr), 4, 0 },
+ /* The PSR is read-only. */
+ { PT_PSR * 4, 4, greg_offset_and_size (psr), 4, frv_read_only_register },
{ PT_CCR * 4, 4, greg_offset_and_size (ccr), 4, 0 },
{ PT_CCCR * 4, 4, greg_offset_and_size (cccr), 4, 0 },
@@ -1493,6 +1496,19 @@ frv_fdpic_loadmap_addresses (struct gdbs
return 0;
}
+int
+frv_read_only_register (struct gdbserv *serv, int pid, int regno,
+ void *read_buf, const void *write_buf)
+{
+ if (read_buf != NULL)
+ {
+ return ptrace_read_user (serv, pid, reginfo[regno].ptrace_offset,
+ reginfo[regno].ptrace_size, read_buf);
+ }
+ return 0;
+}
+
+
/* Breakpoint methods for the frv. These use the stock breakpoint
code.
reply other threads:[~2007-04-09 22:40 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=20070409154003.00b1a773@ironwood.lan \
--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).