This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARI regression] in arm-tdep.c


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]