Re: [PATCH 4/8] gdb/s390: Fill gen_return_address hook.

Marcin Kościelnicki
2016-02-25T19:23:26Z

Ping.

On 07/02/16 15:02, Marcin KoÅ›cielnicki wrote:
> gdb/ChangeLog:
>
> * s390-linux-tdep.c (s390_gen_return_address): New function.
> (s390_gdbarch_init): Fill gen_return_address hook.
> ---
> Added missing comment.
>
> gdb/ChangeLog | 5 +++++
> gdb/s390-linux-tdep.c | 13 +++++++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 6260040..0cf8bfc 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,5 +1,10 @@
> 2016-02-07 Marcin KoÅ›cielnicki <koriakin@0x04.net>
>
> + * s390-linux-tdep.c (s390_gen_return_address): New function.
> + (s390_gdbarch_init): Fill gen_return_address hook.
> +
> +2016-02-07 Marcin KoÅ›cielnicki <koriakin@0x04.net>
> +
> * s390-linux-tdep.c (s390_ax_pseudo_register_collect): New function.
> (s390_ax_pseudo_register_push_stack): New function.
> (s390_gdbarch_init): Fill ax_pseudo_register_collect and
> 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;
> +}
> +
>
> /* A helper for s390_software_single_step, decides if an instruction
> is a partial-execution instruction that needs to be executed until
> @@ -7970,6 +7982,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
> s390_ax_pseudo_register_collect);
> set_gdbarch_ax_pseudo_register_push_stack
> (gdbarch, s390_ax_pseudo_register_push_stack);
> + set_gdbarch_gen_return_address (gdbarch, s390_gen_return_address);
> tdesc_use_registers (gdbarch, tdesc, tdesc_data);
> set_gdbarch_register_name (gdbarch, s390_register_name);
>
>