This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ARI regression] in arm-tdep.c
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: jules at sourceware dot org, gdb-patches at sourceware dot org
- Date: Thu, 03 Sep 2009 17:01:32 +0100
- Subject: Re: [ARI regression] in arm-tdep.c
- References: <20090730230505.22710.qmail@sourceware.org> <001001ca2c6e$294c4750$7be4d5f0$@u-strasbg.fr>
On Thu, 2009-09-03 at 10:11 +0200, Pierre Muller wrote:
> Hi Jules,
>
> your patch from august 31
> add a new regression about use of abort() function
> See
> http://sourceware.org/gdb/current/ari/
>
> As stated:
> Do not use abort, instead use internal_error; GDB should never abort
>
> Below is a proposition of patch,
> but as I have no precise idea of what
> displaced_write_reg function does,
> it might be better if you commit a
> patch with a more adequate description of
> the problem, maybe something like
> "wrong write_pc argument value in displaced_write_reg fuinction"?
>
> Could you please take care of this?
>
> Pierre Muller
> GDB ARI maintainer.
>
>
> Index: arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.286
> diff -u -p -r1.286 arm-tdep.c
> --- arm-tdep.c 14 Aug 2009 00:32:31 -0000 1.286
> +++ arm-tdep.c 3 Sep 2009 08:01:10 -0000
> @@ -2769,7 +2769,8 @@ displaced_write_reg (struct regcache *re
> break;
>
> default:
> - abort ();
> + internal_error (__FILE__, __LINE__,
> + _("Error inside displaced_write_reg function"));
> }
>
> dsc->wrote_to_pc = 1;
OK, though I think "Invalid argument to displaced_write_reg" might be a
better error.
R.