This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [01/12] Get rid of current_gdbarch in aix-thread.c
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Markus Deuling <deuling at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, uweigand at de dot ibm dot com
- Date: Fri, 03 Aug 2007 16:25:50 +0300
- Subject: Re: [rfc] [01/12] Get rid of current_gdbarch in aix-thread.c
- References: <46B31B17.6070204@de.ibm.com> <utzrgbx8p.fsf@gnu.org> <46B3271B.1010203@de.ibm.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 03 Aug 2007 15:01:15 +0200
> From: Markus Deuling <deuling@de.ibm.com>
> CC: gdb-patches@sourceware.org, uweigand@de.ibm.com
>
> >> * aix-thread.c (supply_gprs64, supply_fprs, supply_sprs64)
> >> (supply_sprs32, fetch_regs_user_thread, fetch_regs_kernel_thread)
> >> (fill_gprs64, fill_gprs32, fill_fprs, fill_sprs64, fill_sprs32)
> >> (store_regs_user_thread, store_regs_kernel_thread): Use FRAME or
> >> REGCACHE to recognize current architecture.
> >
> > What are FRAME and REGCACHE here? They are not variables nor macros
> > seen in the patches.
> >
>
> sorry for being unprecise. What I meant is for example REGCACHE parameter here:
>
> static void
> supply_gprs64 (struct regcache *regcache, uint64_t *vals)
> {
> struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
> int regno;
>
> So current_gdbarch can be replaced by get_regcache_arch (regcache).
In that case, I'd prefer to rephrase the log entry as follows:
Use get_regcache_arch or get_frame_arch to get at the current
architecture by regcache or by frame, respectively.