This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/25] gdb/mips: Use default gdbarch methods where possible
* Kevin Buettner <kevinb@redhat.com> [2019-03-27 15:31:40 -0700]:
> On Wed, 27 Mar 2019 21:34:03 +0000
> Andrew Burgess <andrew.burgess@embecosm.com> wrote:
>
> > -static CORE_ADDR
> > -mips_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
> > -{
> > - return frame_unwind_register_signed
> > - (next_frame, gdbarch_num_regs (gdbarch) + MIPS_SP_REGNUM);
> > -}
>
> I don't think this one is equivalent to the default method since it's
> using frame_unwind_register_signed (instead of _unsigned).
>
> > -/* Assuming THIS_FRAME is a dummy, return the frame ID of that
> > - dummy frame. The frame ID's base needs to match the TOS value
> > - saved by save_dummy_frame_tos(), and the PC match the dummy frame's
> > - breakpoint. */
> > -
> > -static struct frame_id
> > -mips_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
> > -{
> > - return frame_id_build
> > - (get_frame_register_signed (this_frame,
> > - gdbarch_num_regs (gdbarch)
> > - + MIPS_SP_REGNUM),
> > - get_frame_pc (this_frame));
> > -}
> > -
>
> I'm not confident that this one is equivalent either due to calling
> get_frame_register_signed. However, I don't really know because I
> haven't traced the calls to see whether a signed or unsigned version
> ultimately gets called.
I agree with your concerns. I think this patch only should be dropped
from this series.
Thanks,
Andrew