diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-22 11:03:42 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-22 11:03:42 +0000 |
commit | c055b1010f3ff41e33e30b195f809e05d68af989 (patch) | |
tree | 3cfebc634595897da73d7b53614b948bae1431ed /gdb/infcmd.c | |
parent | 9eec4d1e39028b54f54638c90b2c628b958162fe (diff) | |
download | gdb-c055b1010f3ff41e33e30b195f809e05d68af989.zip gdb-c055b1010f3ff41e33e30b195f809e05d68af989.tar.gz gdb-c055b1010f3ff41e33e30b195f809e05d68af989.tar.bz2 |
doc/ChangeLog:
--------------
* gdb.texinfo (Set SH Calling convention): New @item.
(Show SH Calling convention): Ditto.
ChangeLog:
----------
* NEWS: Add information on calling convention and new SH CLI options.
* sh-tdep.c (sh_cc_gcc): New static string.
(sh_cc_renesas): Ditto.
(sh_cc_enum): New static string array.
(sh_active_calling_convention): New static string pointer denoting
active user chosen ABI.
(sh_is_renesas_calling_convention): New function to return function
specific ABI, or user choice if necessary.
(sh_use_struct_convention): Rename first argument and turn around its
meaning. Check for renesas ABI and return accordingly.
(sh_use_struct_convention_nofpu): New function.
(sh_next_flt_argreg): Get function type as third parameter. Check
for renesas ABI and choose floating registers accordingly.
(sh_push_dummy_call_fpu): Check for ABI and choose argument slot and
struct return slot accordingly.
(sh_push_dummy_call_nofpu): Ditto.
(sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here.
Evaluate ABI and give to sh_use_struct_convention_nofpu.
(sh_return_value_fpu): Evaluate ABI and give to
sh_use_struct_convention.
(show_sh_command): New function.
(set_sh_command): Ditto.
(_initialize_sh_tdep): Initialize `set/show sh calling-convention
CLI command.
* gdbarch.sh (return_value): Add func_type argument.
* gdbarch.c: Regenerate.
* gdbarch.h: Ditto.
* eval.c (evaluate_subexp_standard): Rename local variable value_type to
val_type so as not to collide with value_type function. Call
using_struct_return with additional function type argument.
* infcall.c (call_function_by_hand): Call using_struct_return and
gdbarch_return_value with additional function type argument.
* infcmd.c (print_return_value): Take addition func_type argument.
Call gdbarch_return_value with additional function type argument.
(finish_command_continuation): Call print_return_value with additional
function type argument.
(finish_command): Ditto.
* sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with
additional function type argument.
* stack.c (return_command): Call using_struct_return and
gdbarch_return_value with additional function type argument.
* value.c (using_struct_return): Take additional function type argument.
* value.h (using_struct_return): Accommodate declaration.
* alpha-tdep.c (alpha_return_value): Add func_type argument.
* amd64-tdep.c (amd64_return_value): Ditto.
* arm-tdep.c (arm_return_value): Ditto.
* avr-tdep.c (avr_return_value): Ditto.
* cris-tdep.c (cris_return_value): Ditto.
* frv-tdep.c (frv_return_value): Ditto.
* h8300-tdep.c (h8300_return_value): Ditto.
(h8300h_return_value): Ditto.
* hppa-tdep.c (hppa32_return_value): Ditto.
(hppa64_return_value): Ditto.
* i386-tdep.c (i386_return_value): Ditto.
* ia64-tdep.c (ia64_return_value): Ditto.
* iq2000-tdep.c (iq2000_return_value): Ditto.
* m32c-tdep.c (m32c_return_value): Ditto.
* m32r-tdep.c (m32r_return_value): Ditto.
* m68hc11-tdep.c (m68hc11_return_value): Ditto.
* m68k-tdep.c (m68k_return_value): Ditto.
(m68k_svr4_return_value): Ditto.
* m88k-tdep.c (m88k_return_value): Ditto.
* mep-tdep.c (mep_return_value): Ditto.
* mips-tdep.c (mips_eabi_return_value): Ditto.
(mips_n32n64_return_value): Ditto.
(mips_o32_return_value): Ditto.
(mips_o64_return_value): Ditto.
* mn10300-tdep.c (mn10300_return_value): Ditto.
* mt-tdep.c (mt_return_value): Ditto.
* ppc-linux-tdep.c (ppc_linux_return_value): Ditto.
* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto.
(ppc_sysv_abi_broken_return_value): Ditto.
(ppc64_sysv_abi_return_value): Ditto.
* ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
(ppc_sysv_abi_broken_return_value): Ditto.
(ppc64_sysv_abi_return_value): Ditto.
* ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
* rs6000-tdep.c (rs6000_return_value): Ditto.
* s390-tdep.c (s390_return_value): Ditto.
* score-tdep.c (score_return_value): Ditto.
* sh-tdep.c (sh_return_value_nofpu): Ditto.
(sh_return_value_fpu): Ditto.
* sh64-tdep.c (sh64_return_value): Ditto.
* sparc-tdep.c (sparc32_return_value): Ditto.
* sparc64-tdep.c (sparc64_return_value): Ditto.
* spu-tdep.c (spu_return_value): Ditto.
* v850-tdep.c (v850_return_value): Ditto.
* vax-tdep.c (vax_return_value): Ditto.
* xstormy16-tdep.c (xstormy16_return_value): Ditto.
* xtensa-tdep.c (xtensa_return_value): Ditto.
* gdbtypes.h (struct type): Add calling_convention member.
* dwarf2read.c (read_subroutine_type): Add calling convention read
from DW_AT_calling_convention attribute to function type.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 2c30b7e..22a4abb 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -69,7 +69,8 @@ void interrupt_target_command (char *args, int from_tty); static void nofp_registers_info (char *, int); -static void print_return_value (struct type *value_type); +static void print_return_value (struct type *func_type, + struct type *value_type); static void finish_command_continuation (struct continuation_arg *); @@ -1183,7 +1184,7 @@ advance_command (char *arg, int from_tty) /* Print the result of a function at the end of a 'finish' command. */ static void -print_return_value (struct type *value_type) +print_return_value (struct type *func_type, struct type *value_type) { struct gdbarch *gdbarch = current_gdbarch; struct cleanup *old_chain; @@ -1200,13 +1201,14 @@ print_return_value (struct type *value_type) inferior function call code. In fact, when inferior function calls are made async, this will likely be made the norm. */ - switch (gdbarch_return_value (gdbarch, value_type, NULL, NULL, NULL)) + switch (gdbarch_return_value (gdbarch, func_type, value_type, + NULL, NULL, NULL)) { case RETURN_VALUE_REGISTER_CONVENTION: case RETURN_VALUE_ABI_RETURNS_ADDRESS: case RETURN_VALUE_ABI_PRESERVES_ADDRESS: value = allocate_value (value_type); - gdbarch_return_value (gdbarch, value_type, stop_registers, + gdbarch_return_value (gdbarch, func_type, value_type, stop_registers, value_contents_raw (value), NULL); break; case RETURN_VALUE_STRUCT_CONVENTION: @@ -1270,7 +1272,7 @@ finish_command_continuation (struct continuation_arg *arg) _("finish_command: function has no target type")); if (TYPE_CODE (value_type) != TYPE_CODE_VOID) - print_return_value (value_type); + print_return_value (SYMBOL_TYPE (function), value_type); } do_exec_cleanups (cleanups); @@ -1384,7 +1386,7 @@ finish_command (char *arg, int from_tty) _("finish_command: function has no target type")); if (TYPE_CODE (value_type) != TYPE_CODE_VOID) - print_return_value (value_type); + print_return_value (SYMBOL_TYPE (function), value_type); } do_cleanups (old_chain); |