diff options
author | qiyao <qiyao> | 2012-06-08 14:24:51 +0000 |
---|---|---|
committer | qiyao <qiyao> | 2012-06-08 14:24:51 +0000 |
commit | 092881b3e0d6e992d12f46f8fd251bbb868598ea (patch) | |
tree | 2faef897c11e385219946fef5cc0e5660417f375 /gdb/gdbarch.sh | |
parent | 56a901143f1fa4c62f904c540041bd0000678c01 (diff) | |
download | gdb-092881b3e0d6e992d12f46f8fd251bbb868598ea.tar.gz |
gdb/
* arch-utils.c (default_return_in_first_hidden_param_p): New.
* arch-utils.h: Declare.
* gdbarch.sh: Add return_in_first_hidden_param_p.
* gdbarch.c, gdbarch.h: Regenerated.
* infcall.c (call_function_by_hand): Call
gdbarch_return_in_first_hidden_param_p instead of
language_pass_by_reference.
* m68k-tdep.c (m68k_return_in_first_hidden_param_p): New.
(m68k_gdbarch_init): Install m68k_return_in_first_hidden_param_p.
* sh-tdep.c (sh_return_in_first_hidden_param_p): New.
(sh_gdbarch_init): Install sh_return_in_first_hidden_param_p.
* tic6x-tdep.c (tic6x_push_dummy_call): Remove local variable
`cplus_return_struct_by_reference'.
(tic6x_return_value): Handle language cplusplus.
(tic6x_return_in_first_hidden_param_p): New.
(tic6x_gdbarch_init): Install tic6x_return_in_first_hidden_param_p.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 23241384860..06294abc40e 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -515,6 +515,13 @@ M:CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf # for instance). M:enum return_value_convention:return_value:struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:function, valtype, regcache, readbuf, writebuf +# Return true if the return value of function is stored in the first hidden +# parameter. In theory, this feature should be language-dependent, specified +# by language and its ABI, such as C++. Unfortunately, compiler may +# implement it to a target-dependent feature. So that we need such hook here +# to be aware of this in GDB. +m:int:return_in_first_hidden_param_p:struct type *type:type::default_return_in_first_hidden_param_p::0 + m:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0 M:CORE_ADDR:skip_main_prologue:CORE_ADDR ip:ip f:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0 |