diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-01-08 19:28:09 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-01-08 19:28:09 +0000 |
commit | a93c0eb6957e86a30b624c0fb097f9370ea56e9c (patch) | |
tree | 76f6e7f536cd5ca047d27674ab673b98520ac797 /gdb/infcall.c | |
parent | 88e2547f139cd37f679460bac0e3ab94feef2533 (diff) | |
download | gdb-a93c0eb6957e86a30b624c0fb097f9370ea56e9c.zip gdb-a93c0eb6957e86a30b624c0fb097f9370ea56e9c.tar.gz gdb-a93c0eb6957e86a30b624c0fb097f9370ea56e9c.tar.bz2 |
* ada-lang.c (ada_convert_actual): Renames convert_actual.
Make non-static.
(ada_convert_actuals): Delete.
* ada-lang.h (ada_convert_actual): Add declaration.
(ada_convert_actuals): Remove declaration.
* infcall.c: #include "ada-lang.h".
(value_arg_coerce): Add new parameter sp. Update function
documetnation. Add handling of Ada function call parameters.
* Makefile.in (infcall.o): Update dependencies.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r-- | gdb/infcall.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index 82130c6..9242c46 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -34,6 +34,7 @@ #include "gdb_string.h" #include "infcall.h" #include "dummy-frame.h" +#include "ada-lang.h" /* NOTE: cagney/2003-04-16: What's the future of this code? @@ -91,19 +92,25 @@ Unwinding of stack if a signal is received while in a call dummy is %s.\n"), /* Perform the standard coercions that are specified - for arguments to be passed to C functions. + for arguments to be passed to C or Ada functions. If PARAM_TYPE is non-NULL, it is the expected parameter type. - IS_PROTOTYPED is non-zero if the function declaration is prototyped. */ + IS_PROTOTYPED is non-zero if the function declaration is prototyped. + SP is the stack pointer were additional data can be pushed (updating + its value as needed). */ static struct value * value_arg_coerce (struct value *arg, struct type *param_type, - int is_prototyped) + int is_prototyped, CORE_ADDR *sp) { struct type *arg_type = check_typedef (value_type (arg)); struct type *type = param_type ? check_typedef (param_type) : arg_type; + /* Perform any Ada-specific coercion first. */ + if (current_language->la_language == language_ada) + arg = ada_convert_actual (arg, type, sp); + switch (TYPE_CODE (type)) { case TYPE_CODE_REF: @@ -577,7 +584,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) else param_type = NULL; - args[i] = value_arg_coerce (args[i], param_type, prototyped); + args[i] = value_arg_coerce (args[i], param_type, prototyped, &sp); if (param_type != NULL && language_pass_by_reference (param_type)) args[i] = value_addr (args[i]); |