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: [RFC] Add support for Morpho ms1 processor


> Date: Fri, 12 Aug 2005 13:49:46 -0700
> From: Kevin Buettner <kevinb@redhat.com>
> 
> > Please consider usin ARRAY_SIZE.  I'd also use gdb_assert() here
> > instead of the excplicit internal_error(), but that's a bit of a
> > personal preference I assume.  Please use invalid instead of illegal.
> 
> I'm okay with gdb_assert().  That allows us to condense the above bit of
> code to just:
> 
>   gdb_assert (regnum >= 0 && regnum < ARRAY_SIZE (register_names));
>   return register_names[regnum];
> 
> The other benefit to using gdb_assert() is that there's one less string
> for the i18n translators to worry about.

;-)

Mark


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