This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [0/8] Get rid of current_gdbarch
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: deuling at de dot ibm dot com (Markus Deuling), gdb-patches at sourceware dot org (GDB Patches), brobecker at adacore dot com (Joel Brobecker), maxim at tensilica dot com (Maxim Grigoriev)
- Date: Tue, 9 Oct 2007 20:44:57 +0200 (CEST)
- Subject: 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