From: Jim Blandy <jimb@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: Change PowerPC E500 raw regcache layout
Date: Wed, 04 Aug 2004 17:48:00 -0000 [thread overview]
Message-ID: <vt2oelqdcft.fsf@zenia.home> (raw)
In-Reply-To: <20040723162923.7d57d174@saguaro>
Kevin Buettner <kevinb@redhat.com> writes:
> Okay, except for the uses of ``gdb_assert (0)''. Please use
> internal_error() for these instead.
Committed, but I had forgotten this caveat. I've committed the below
as a separate patch. As penance, I fixed the one I'd introduced in
rs6000_store_return_value, too.
2004-08-04 Jim Blandy <jimb@redhat.com>
* ppc-linux-nat.c (fetch_register): Replace 'gdb_assert (0)' with
a call to 'internal_error', with a more helpful error message.
* rs6000-tdep.c (e500_pseudo_register_read,
e500_pseudo_register_write, rs6000_store_return_value): Same.
Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.51
diff -c -p -r1.51 ppc-linux-nat.c
*** gdb/ppc-linux-nat.c 4 Aug 2004 17:17:55 -0000 1.51
--- gdb/ppc-linux-nat.c 4 Aug 2004 17:32:37 -0000
*************** fetch_register (int tid, int regno)
*** 399,405 ****
regcache_raw_supply (current_regcache, regno, buf + padding);
}
else
! gdb_assert (0);
}
static void
--- 399,407 ----
regcache_raw_supply (current_regcache, regno, buf + padding);
}
else
! internal_error (__FILE__, __LINE__,
! "fetch_register: unexpected byte order: %d",
! gdbarch_byte_order (current_gdbarch));
}
static void
Index: gdb/rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.227
diff -c -p -r1.227 rs6000-tdep.c
*** gdb/rs6000-tdep.c 4 Aug 2004 17:17:55 -0000 1.227
--- gdb/rs6000-tdep.c 4 Aug 2004 17:32:39 -0000
*************** e500_pseudo_register_read (struct gdbarc
*** 1941,1948 ****
&& reg_nr < tdep->ppc_ev0_regnum + ppc_num_gprs)
e500_move_ev_register (regcache_raw_read, regcache, reg_nr, buffer);
else
! /* We should only be called on pseudo-registers. */
! gdb_assert (0);
}
static void
--- 1941,1950 ----
&& reg_nr < tdep->ppc_ev0_regnum + ppc_num_gprs)
e500_move_ev_register (regcache_raw_read, regcache, reg_nr, buffer);
else
! internal_error (__FILE__, __LINE__,
! "e500_pseudo_register_read: "
! "called on unexpected register '%s' (%d)",
! gdbarch_register_name (gdbarch, reg_nr), reg_nr);
}
static void
*************** e500_pseudo_register_write (struct gdbar
*** 1960,1967 ****
regcache_raw_write,
regcache, reg_nr, (void *) buffer);
else
! /* We should only be called on pseudo-registers. */
! gdb_assert (0);
}
/* The E500 needs a custom reggroup function: it has anonymous raw
--- 1962,1971 ----
regcache_raw_write,
regcache, reg_nr, (void *) buffer);
else
! internal_error (__FILE__, __LINE__,
! "e500_pseudo_register_read: "
! "called on unexpected register '%s' (%d)",
! gdbarch_register_name (gdbarch, reg_nr), reg_nr);
}
/* The E500 needs a custom reggroup function: it has anonymous raw
*************** rs6000_store_return_value (struct type *
*** 2095,2101 ****
&& TYPE_VECTOR (type))
regnum = tdep->ppc_vr0_regnum + 2;
else
! gdb_assert (0);
}
else
/* Everything else is returned in GPR3 and up. */
--- 2099,2107 ----
&& TYPE_VECTOR (type))
regnum = tdep->ppc_vr0_regnum + 2;
else
! internal_error (__FILE__, __LINE__,
! "rs6000_store_return_value: "
! "unexpected array return type");
}
else
/* Everything else is returned in GPR3 and up. */
prev parent reply other threads:[~2004-08-04 17:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-20 23:45 Jim Blandy
2004-07-23 23:29 ` Kevin Buettner
2004-08-04 17:48 ` Jim Blandy [this message]
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=vt2oelqdcft.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@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