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] [02/05] Get rid of current_gdbarch in hppa-linux-nat.c


On Wed, Nov 07, 2007 at 12:49:22PM +0100, Markus Deuling wrote:
> Sure it would. But what for do we have gdbarch_num_regs? I dont think its a 
> good idea
> to either use gdbarch_num_regs or ARRAY_SIZE(whatever) at will. This is 
> redundant and error-prone.
> Btw, there are two further uses of gdbarch_num_regs in that file.
> 
> For my opinion gdbarch should be used to describe an architecture.

That doesn't make any sense.  The error is there to make sure we don't
access memory outside the array.

-- 
Daniel Jacobowitz
CodeSourcery


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