This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]