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}
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Daniel Jacobowitz <drow at false dot org>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Wed, 07 Nov 2007 15:56:10 +0100
- Subject: Re: [rfc] [01/05] Get rid of current_gdbarch in gdbarch.{c,h,sh}
- References: <47319D44.2060802@de.ibm.com> <20071107125925.GB14179@caradoc.them.org>
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.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com