From a44bddec71c72898c3e5b365657a9b65fdc7ad05 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 4 Aug 2004 17:45:30 +0000 Subject: [PATCH] * 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): Same. --- gdb/ChangeLog | 7 +++++++ gdb/ppc-linux-nat.c | 4 +++- gdb/rs6000-tdep.c | 16 +++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 43b87f94e34..cb9e7094e43 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2004-08-04 Jim Blandy + + * 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): Same. + 2004-08-04 Andrew Cagney * Makefile.in: Update dependencies. diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 02095e992f7..c98bb93f879 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -399,7 +399,9 @@ fetch_register (int tid, int regno) regcache_raw_supply (current_regcache, regno, buf + padding); } else - gdb_assert (0); + internal_error (__FILE__, __LINE__, + "fetch_register: unexpected byte order: %d", + gdbarch_byte_order (current_gdbarch)); } static void diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 52812d5ad24..fcd14635938 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1941,8 +1941,10 @@ e500_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, && 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); + internal_error (__FILE__, __LINE__, + "e500_pseudo_register_read: " + "called on unexpected register '%s' (%d)", + gdbarch_register_name (gdbarch, reg_nr), reg_nr); } static void @@ -1960,8 +1962,10 @@ e500_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, regcache_raw_write, regcache, reg_nr, (void *) buffer); else - /* We should only be called on pseudo-registers. */ - gdb_assert (0); + 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 @@ -2095,7 +2099,9 @@ rs6000_store_return_value (struct type *type, && TYPE_VECTOR (type)) regnum = tdep->ppc_vr0_regnum + 2; else - gdb_assert (0); + internal_error (__FILE__, __LINE__, + "rs6000_store_return_value: " + "unexpected array return type"); } else /* Everything else is returned in GPR3 and up. */ -- 2.30.2