From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Duffek To: ac131313@cygnus.com Cc: gdb@sources.redhat.com Subject: Re: [multi-arch] The frame as the global parameter (long, important) Date: Mon, 26 Feb 2001 13:12:00 -0000 Message-id: <200102262120.f1QLKtd00557@rtl.cygnus.com> References: <3A970102.68681EB2@cygnus.com> X-SW-Source: 2001-02/msg00378.html On 23-Feb-2001, Andrew Cagney wrote: > o The frame have an architecture > attached to it. Yes, this seems like the right thing to do. > As an intermediate hack, current > architecture and current frame would > remain as globals. So eventually, current_gdbarch and selected_frame will be deprecated in favor of passing gdbarch and/or frame pointers as parameters? I wonder if that's really beneficial. Global variables should be used sparingly, but they're appropriate for values shared across large expanses of code, as current_gdbarch and selected_frame are. Keeping those values in global variables could make the code more maintainable rather than less. We'd need to add explicit context switches at frame boundary crossings, but that seems lees onerous to me than adding extra parameters to hundreds (thousands?) of function calls. Nick