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]: 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


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