[multi-arch] The frame as the global parameter (long, important)
Nick Duffek
nsd@redhat.com
Mon Feb 26 13:12:00 GMT 2001
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
More information about the Gdb
mailing list