From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: use ppc_gp0_regnum when appropriate
Date: Fri, 07 May 2004 01:19:00 -0000 [thread overview]
Message-ID: <vt2ekpx1hf0.fsf@zenia.home> (raw)
2004-05-06 Jim Blandy <jimb@redhat.com>
* aix-thread.c (fetch_regs_kernel_thread, fill_gprs64,
fill_gprs32, store_regs_kernel_thread): Use tdep->ppc_gp0_regnum
to recognize gpr regnums, instead of assuming that
tdep->ppc_fp0_regnum marks the end of the general-purpose
registers.
*** gdb/aix-thread.c 2004-05-06 14:18:00.000000000 -0500
--- gdb/aix-thread.c 2004-05-06 14:25:58.000000000 -0500
*************** fetch_regs_kernel_thread (int regno, pth
*** 1157,1163 ****
(long) tid, regno, arch64);
/* General-purpose registers. */
! if (regno == -1 || regno < tdep->ppc_fp0_regnum)
{
if (arch64)
{
--- 1157,1165 ----
(long) tid, regno, arch64);
/* General-purpose registers. */
! if (regno == -1
! || (tdep->ppc_gp0_regnum <= regno
! && regno < tdep->ppc_gp0_regnum + ppc_num_gprs))
{
if (arch64)
{
*************** fill_gprs64 (uint64_t *vals)
*** 1246,1254 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
! if (register_cached (regno))
! regcache_collect (regno, vals + regno);
}
static void
--- 1248,1256 ----
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < ppc_num_gprs; regno++)
! if (register_cached (tdep->ppc_gp0_regnum + regno))
! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
static void
*************** fill_gprs32 (uint32_t *vals)
*** 1257,1265 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < tdep->ppc_fp0_regnum; regno++)
! if (register_cached (regno))
! regcache_collect (regno, vals + regno);
}
/* Store the floating point registers into a double array. */
--- 1259,1267 ----
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
int regno;
! for (regno = 0; regno < ppc_num_gprs; regno++)
! if (register_cached (tdep->ppc_gp0_regnum + regno))
! regcache_collect (tdep->ppc_gp0_regnum + regno, vals + regno);
}
/* Store the floating point registers into a double array. */
*************** store_regs_kernel_thread (int regno, pth
*** 1456,1462 ****
(long) tid, regno);
/* General-purpose registers. */
! if (regno == -1 || regno < tdep->ppc_fp0_regnum)
{
if (arch64)
{
--- 1458,1466 ----
(long) tid, regno);
/* General-purpose registers. */
! if (regno == -1
! || (tdep->ppc_gp0_regnum <= regno
! && regno < tdep->ppc_gp0_regnum + ppc_num_fprs))
{
if (arch64)
{
next reply other threads:[~2004-05-07 1:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 1:19 Jim Blandy [this message]
2004-05-07 20:57 ` Kevin Buettner
2004-05-07 20:50 ` Jim Blandy
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=vt2ekpx1hf0.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=gdb-patches@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