This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc]: Replace current_gdbarch in sentinel-frame.c
- 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: Fri, 15 Feb 2008 18:43:54 +0100 (CET)
- Subject: Re: [rfc]: Replace current_gdbarch in sentinel-frame.c
Markus Deuling wrote:
> @@ -54,7 +54,7 @@ sentinel_frame_prev_register (struct fra
> onto the corresponding hardware register. */
> *optimized = 0;
> *lvalp = lval_register;
> - *addrp = register_offset_hack (current_gdbarch, regnum);
> + *addrp = register_offset_hack (get_frame_arch (next_frame), regnum);
> *realnum = regnum;
This is not OK -- as the sentinel frame is always the innermost
frame, next_frame will always be NULL here.
You could use the gdbarch of the sentinel frame's regcache
(cache->regcache).
However, I think setting the "address" for register values is
no longer needed anymore, so the whole call to register_offset_hack
(and the function itself) can be removed.
Can you try whether simply setting *addrp = 0 works?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com