This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [01/05] Get rid of current_gdbarch in gdbarch.{c,h,sh}
On Wed, Nov 07, 2007 at 03:56:10PM +0100, Markus Deuling wrote:
> Daniel Jacobowitz schrieb:
> > On Wed, Nov 07, 2007 at 12:11:00PM +0100, Markus Deuling wrote:
> >> architecture. This ensures that the new architectures initial
> >> values are not influenced by the previous architecture. Once
> >> everything is parameterised with gdbarch, this will go away. */
> >> - struct gdbarch *current_gdbarch;
> >> + struct gdbarch *gdbarch;
> > Please read the comment above this variable :-)
>
> Hm,
> will gdbarch_alloc go away? I thought every target uses gdbarch_alloc to
> allocate a basic
> gdbarch structure and then it overwrites every necessary callback to fit to its
> architecture.
/* NOTE: The new architecture variable is named \`\`current_gdbarch''
so that macros such as TARGET_ARCHITECTURE, when expanded, refer to
the current local architecture and not the previous global
architecture. This ensures that the new architectures initial
values are not influenced by the previous architecture. Once
everything is parameterised with gdbarch, this will go away. */
struct gdbarch *current_gdbarch;
"this will go away" refers to "is named current_gdbarch".
--
Daniel Jacobowitz
CodeSourcery