This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/4] sh: Install return_with_first_hidden_param_p
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: <cltang at codesourcery dot com>
- Date: Wed, 18 Apr 2012 21:17:52 +0800
- Subject: [PATCH 3/4] sh: Install return_with_first_hidden_param_p
- References: <1334755073-26528-1-git-send-email-yao@codesourcery.com>
SH specific bits.
Regression tested on sh-linux-gnu. Two fails are fixed
-FAIL: gdb.cp/bs15503.exp: print (const char *) s.substr(0,4)
-FAIL: gdb.cp/bs15503.exp: print (const char *) (s=s.substr(0,4))
+PASS: gdb.cp/bs15503.exp: print (const char *) s.substr(0,4)
+PASS: gdb.cp/bs15503.exp: print (const char *) (s=s.substr(0,4))
gdb:
2012-04-16 Yao Qi <yao@codesourcery.com>
* sh-tdep.c (sh_return_with_first_hidden_param_p): New.
(sh_gdbarch_init): Install sh_return_with_first_hidden_param_p.
---
gdb/sh-tdep.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 7f15191..029958d 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -2915,6 +2915,17 @@ sh_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name,
return NULL;
}
+
+/* This is the implementation of gdbarch method
+ return_with_first_hidden_param_p. */
+
+static int
+sh_return_with_first_hidden_param_p (struct gdbarch *gdbarch,
+ struct type *type)
+{
+ return 0;
+}
+
static struct gdbarch *
@@ -3013,6 +3024,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
+ set_gdbarch_return_with_first_hidden_param_p (gdbarch,
+ sh_return_with_first_hidden_param_p);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
--
1.7.0.4