GNU Binutils with patches for OS216
Révision | 70104a908773d7df0af48ca5c48856886bafea13 (tree) |
---|---|
l'heure | 2016-03-13 18:52:26 |
Auteur | Marcin Kościelnicki <koriakin@0x04...> |
Commiter | Marcin Kościelnicki |
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.
@@ -1,3 +1,8 @@ | ||
1 | +2016-03-13 Marcin Kościelnicki <koriakin@0x04.net> | |
2 | + | |
3 | + * s390-linux-tdep.c (s390_gen_return_address): New function. | |
4 | + (s390_gdbarch_init): Fill gen_return_address hook. | |
5 | + | |
1 | 6 | 2016-03-11 Andrew Burgess <andrew.burgess@embecosm.com> |
2 | 7 | |
3 | 8 | * symmisc.c (maintenance_info_line_tables): New function. |
@@ -639,6 +639,20 @@ s390_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, | ||
639 | 639 | return 0; |
640 | 640 | } |
641 | 641 | |
642 | +/* The "gen_return_address" gdbarch method. Since this is supposed to be | |
643 | + just a best-effort method, and we don't really have the means to run | |
644 | + the full unwinder here, just collect the link register. */ | |
645 | + | |
646 | +static void | |
647 | +s390_gen_return_address (struct gdbarch *gdbarch, | |
648 | + struct agent_expr *ax, struct axs_value *value, | |
649 | + CORE_ADDR scope) | |
650 | +{ | |
651 | + value->type = register_type (gdbarch, S390_R14_REGNUM); | |
652 | + value->kind = axs_lvalue_register; | |
653 | + value->u.reg = S390_R14_REGNUM; | |
654 | +} | |
655 | + | |
642 | 656 | |
643 | 657 | /* A helper for s390_software_single_step, decides if an instruction |
644 | 658 | 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) | ||
8002 | 8016 | s390_ax_pseudo_register_collect); |
8003 | 8017 | set_gdbarch_ax_pseudo_register_push_stack |
8004 | 8018 | (gdbarch, s390_ax_pseudo_register_push_stack); |
8019 | + set_gdbarch_gen_return_address (gdbarch, s390_gen_return_address); | |
8005 | 8020 | tdesc_use_registers (gdbarch, tdesc, tdesc_data); |
8006 | 8021 | set_gdbarch_register_name (gdbarch, s390_register_name); |
8007 | 8022 |