Re: [PATCH 2/2] Make "set debug frame 1" output print instead of .

Pedro Alves
2013-11-27T18:14:05Z

On 11/27/2013 05:52 PM, Pedro Alves wrote:
> struct value *
> frame_unwind_got_optimized (struct frame_info *frame, int regnum)
> {
> - struct gdbarch *gdbarch = frame_unwind_arch (frame);
> - struct type *reg_type = register_type (gdbarch, regnum);

Oh, wait. Given multi-arch, the arch of FRAME might be different
from the prev frame's arch, and therefore the type of register
REGNUM should be retrieved from the unwound arch.

> + struct value *val;
>
> - return allocate_optimized_out_value (reg_type);
> + val = value_of_register_lazy (frame, regnum);

This is using the type of REGNUM in FRAME. I'll fix this
in a moment...

> + set_value_lazy (val, 0);
> + set_value_optimized_out (val, 1);
> + return val;

--
Pedro Alves