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] [0/8] Get rid of current_gdbarch


Daniel Jacobowitz wrote:
> On Tue, Oct 09, 2007 at 08:22:45PM +0200, Ulrich Weigand wrote:
> > At this point, there's no need to involve get_current_frame.  The
> > routine operates on the current regcache, and should simply consult
> > its architecture.
> 
> As a more general note, replacing one global state with another is of
> limited value.  It's not completely useless, but let's avoid it when
> we can :-)

Well, in some cases you have to have some global state ...  At this
point, which is the implementation of the "return" command, you have
no other context -- the command by design operates on the "current"
register set ...  (That still doesn't mean it should refer to
current_gdbarch at this point, that makes a lot more assumptions.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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