aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMarcin Kościelnicki <koriakin@0x04.net>2015-11-14 23:08:07 +0100
committerMarcin Kościelnicki <koriakin@0x04.net>2016-03-13 10:52:26 +0100
commit70104a908773d7df0af48ca5c48856886bafea13 (patch)
tree334477ddcbe317db1a1930e590de93e0077160d2 /gdb
parent724cd463c6a84b2c7f20d294f74f94352052e0c0 (diff)
downloadgdb-70104a908773d7df0af48ca5c48856886bafea13.zip
gdb-70104a908773d7df0af48ca5c48856886bafea13.tar.gz
gdb-70104a908773d7df0af48ca5c48856886bafea13.tar.bz2
gdb/s390: Fill gen_return_address hook.
gdb/ChangeLog: * s390-linux-tdep.c (s390_gen_return_address): New function. (s390_gdbarch_init): Fill gen_return_address hook.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-linux-tdep.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6eeb1e2..cb95a89 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-13 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-03-11 Andrew Burgess <andrew.burgess@embecosm.com>
* symmisc.c (maintenance_info_line_tables): New function.
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index 253d69c..fc57592 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -639,6 +639,20 @@ s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch,
return 0;
}
+/* The "gen_return_address" gdbarch method. Since this is supposed to be
+ just a best-effort method, and we don't really have the means to run
+ the full unwinder here, just collect the link register. */
+
+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
@@ -8002,6 +8016,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);