This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook.
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 11 Mar 2016 12:20:05 +0100
- Subject: Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook.
- Authentication-results: sourceware.org; auth=none
- References: <1453637529-26972-5-git-send-email-koriakin at 0x04 dot net> <1454853751-18455-1-git-send-email-koriakin at 0x04 dot net>
On Sun, Feb 07 2016, Marcin KoÅcielnicki wrote:
> diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
> index 97bd564..0b91ed1 100644
> --- a/gdb/s390-linux-tdep.c
> +++ b/gdb/s390-linux-tdep.c
> @@ -627,6 +627,18 @@ s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
> return 0;
> }
>
> +/* The "gen_return_address" gdbarch method. */
> +
> +static void
> +s390_gen_return_address (struct gdbarch *gdbarch,
> + struct agent_expr *ax, struct axs_value *value,
> + CORE_ADDR scope)
> +{
> + value->type = register_type (gdbarch, S390_R14_REGNUM);
> + value->kind = axs_lvalue_register;
> + value->u.reg = S390_R14_REGNUM;
> +}
Under which circumstances is this supposed to work? And how reliable
does it need to be? The ABI only guarantees that r14 holds the return
address at function entry. Anywhere else it likely doesn't.
--
Andreas