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


Daniel Jacobowitz schrieb:

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


What this patch does is transform


 if ((unsigned) regno >= gdbarch_num_regs (current_gdbarch))
   error (_("Invalid register number %d."), regno);


into


 if ((unsigned) regno >= gdbarch_num_regs (gdbarch))
   error (_("Invalid register number %d."), regno);


The gdbarch comes from regcache in {fetch,store}_register. Why is that wrong ?



-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com


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