Re: [rfc] [01/05] Get rid of current_gdbarch in gdbarch.{c,h,sh}

Markus Deuling
2007-11-07T14:58:06Z

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.

This patch just changes the name of current_gdbarch to gdbarch. For gdbarch_alloc current_gdbarch
is a local variable invisible to the rest. Its not the global current_gdbarch what this patch changes.

For me its a bit confusing to have a global current_gdbarch and a local one.