From a93c0eb6957e86a30b624c0fb097f9370ea56e9c Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 8 Jan 2008 19:28:09 +0000 Subject: * 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. --- gdb/ada-lang.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 2d1ce2f..49da2ec 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3835,9 +3835,9 @@ ensure_lval (struct value *val, CORE_ADDR *sp) allocating any necessary descriptors (fat pointers), or copies of values not residing in memory, updating it as needed. */ -static struct value * -convert_actual (struct value *actual, struct type *formal_type0, - CORE_ADDR *sp) +struct value * +ada_convert_actual (struct value *actual, struct type *formal_type0, + CORE_ADDR *sp) { struct type *actual_type = ada_check_typedef (value_type (actual)); struct type *formal_type = ada_check_typedef (formal_type0); @@ -3929,30 +3929,6 @@ make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp) else return descriptor; } - - -/* Assuming a dummy frame has been established on the target, perform any - conversions needed for calling function FUNC on the NARGS actual - parameters in ARGS, other than standard C conversions. Does - nothing if FUNC does not have Ada-style prototype data, or if NARGS - does not match the number of arguments expected. Use *SP as a - stack pointer for additional data that must be pushed, updating its - value as needed. */ - -void -ada_convert_actuals (struct value *func, int nargs, struct value *args[], - CORE_ADDR *sp) -{ - int i; - - if (TYPE_NFIELDS (value_type (func)) == 0 - || nargs != TYPE_NFIELDS (value_type (func))) - return; - - for (i = 0; i < nargs; i += 1) - args[i] = - convert_actual (args[i], TYPE_FIELD_TYPE (value_type (func), i), sp); -} /* Dummy definitions for an experimental caching module that is not * used in the public sources. */ -- cgit v1.1