diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-10-04 22:32:31 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-10-04 22:32:31 +0000 |
commit | 40bc484cc36df02f9fe0177a129cef7ab82b8ec3 (patch) | |
tree | a8d2e4caf8bd5b6772fec41c4604cb4dca485481 /gdb/infcall.c | |
parent | f17618eaf3b901702ad17e3168019a0047a4dda4 (diff) | |
download | gdb-40bc484cc36df02f9fe0177a129cef7ab82b8ec3.zip gdb-40bc484cc36df02f9fe0177a129cef7ab82b8ec3.tar.gz gdb-40bc484cc36df02f9fe0177a129cef7ab82b8ec3.tar.bz2 |
[Ada/funcalls] do not coerce fat pointers on the stack
When one of the parameter values in a subprogram calls is an array
whose value does not come from inferior memory, the debugger first
copies the array value in inferior memory. Up to now, the memory
used to hold that copy was taken from the stack (just below the SP),
but this is causing problems on SPARC v9.
So the immediate fix is to follow what C does with arrays and strings,
which is allocate memory on the heap.
gdb/ChangeLog:
* ada-lang.c: #include "value.h".
(ensure_lval): Delete advance declaration. Remove gdbarch and sp
arguments. Implement using value_allocate_space_in_inferior
instead of allocating memory from the stack.
(make_array_descriptor): Remove gdbarch and sp parameters. Update
calls to ensure_lval.
(ada_convert_actual): Remove gdbarch and sp parameters. Update
calls to make_array_descriptor and ensure_lval.
* ada-lang.h (ada_convert_actual): Update declaration.
* infcall.c (value_arg_coerce): Update call to ada_convert_actual.
Diffstat (limited to 'gdb/infcall.c')
-rw-r--r-- | gdb/infcall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c index 0c9a3af..7f60e56 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -143,7 +143,7 @@ value_arg_coerce (struct gdbarch *gdbarch, struct value *arg, /* Perform any Ada-specific coercion first. */ if (current_language->la_language == language_ada) - arg = ada_convert_actual (arg, type, gdbarch, sp); + arg = ada_convert_actual (arg, type); /* Force the value to the target if we will need its address. At this point, we could allocate arguments on the stack instead of |