This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [06/09] Get rid of current_gdbarch (trivial replacements)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches)
- Date: Mon, 5 Nov 2007 17:02:23 +0100 (CET)
- Subject: Re: [rfc] [06/09] Get rid of current_gdbarch (trivial replacements)
Markus Deuling wrote:
> * shnbsd-tdep.c (shnbsd_supply_gregset, shnbsd_collect_gregset): Use
> get_regcache_arch to get at the current architecture by regcache.
> * xstormy16-tdep.c (xstormy16_frame_prev_register): Use get_frame_arch
> to get at the current architecture by frame_info.
> * fbsd-nat.c (fbsd_make_corefile_notes): Use get_regcache_arch to get
> at the current architecture by regcache.
> * gnu-v3-abi.c (gnuv3_skip_trampoline): Use get_frame_arch to get at
> the current architecture by frame_info.
> (build_gdb_vtable_type): Replace current_gdbarch by gdbarch.
> * aix-thread.c (special_register_p): Add gdbarch as parameter.
> (fetch_regs_kernel_thread, store_regs_kernel_thread): Add gdbarch to
> caller of special_register_p.
This is OK, except that
> We use this function as the gdbarch per-architecture data
> initialization function. We assume that the gdbarch framework
> calls the per-architecture data initialization functions after it
> - sets current_gdbarch to the new architecture. */
> + sets gdbarch to the new architecture. */
after this change the comment no longer makes sense, as there is
no particular assumption about current_gdbarch left in the code.
You should simply remove the sentence starting with "We assume ...".
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com