Re: [rfa:rs6000] Framefy rs6000 (and GNU/Linux PPC)

Kevin Buettner
2004-03-02T23:01:08Z

On Sun, 29 Feb 2004 20:18:11 -0500
Andrew Cagney <cagney@gnu.org> wrote:

> The attached updates the rs6000 so that (well for NetBSD, "elf" and
> GNU/Linux 32+64) it uses the frame unwinder. It doesn't yet enable
> dwarf2-cfi.
>
> Apart from the bug: Use right frame ID in step_over_function
> http://sources.redhat.com/ml/gdb-patches/2004-02/msg00882.html
> the conversion was highly mechanical..
>
> Tested on NetBSD/PPC (which gets less failures) and GNU/Linux 32x64-bit
> and 64-bit (which get the same results).

Mostly okay. Just a few nits...

> +static const struct frame_unwind *
> +ppc_linux_sigtramp_sniffer (struct frame_info *next_frame)
> +{
> + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame));
> + if (frame_pc_unwind (next_frame)
> + > frame_unwind_register_unsigned (next_frame, SP_REGNUM))
> + /* Assume anything that is vaguely on the stack is a signal
> + trampoline. */
> + return &ppc_linux_sigtramp_unwind;
> + else
> + return NULL;
> +}

The test in the code above should be augmented with a call to
ppc_linux_at_sigtramp_return_path(). We should not assume that
only signal trampolines will be found when pc > sp. There could
be other executable code above the stack.

> static void
> ppc_linux_init_abi (struct gdbarch_info info,
> struct gdbarch *gdbarch)
> @@ -1051,6 +1157,7 @@
> PowerOpen struct convention. */
> set_gdbarch_return_value (gdbarch, ppc_linux_return_value);
>
> +#if 0
> /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
> *_push_arguments(). The same remarks hold for the methods below. */
> set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation);
> @@ -1061,9 +1168,11 @@
> ppc_linux_frame_init_saved_regs);
> set_gdbarch_deprecated_init_extra_frame_info (gdbarch,
> ppc_linux_init_extra_frame_info);
> +#endif

Is there any reason to retain this #if 0'd code? If not, just delete it.

Kevin