From: Andrew Cagney Date: Sat, 22 Nov 2003 22:15:23 +0000 (+0000) Subject: 2003-11-22 Andrew Cagney X-Git-Tag: drow-cplus-merge-20031214~178 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6c95c1e9e0af719dbb236c885ba72ea370cce0ff;p=pf3gnuchains%2Fpf3gnuchains4x.git 2003-11-22 Andrew Cagney * hppa-tdep.c (hppa_value_returned_from_stack): Delete function. * config/pa/tm-hppa.h (hppa_value_returned_from_stack): Delete declaration. (DEPRECATED_VALUE_RETURNED_FROM_STACK): Delete macro. * infcall.c (call_function_by_hand): Delete #ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK code. * infcmd.c (print_return_value): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 368d960e4f..1af1a88e72 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ 2003-11-22 Andrew Cagney + * hppa-tdep.c (hppa_value_returned_from_stack): Delete function. + * config/pa/tm-hppa.h (hppa_value_returned_from_stack): Delete + declaration. + (DEPRECATED_VALUE_RETURNED_FROM_STACK): Delete macro. + * infcall.c (call_function_by_hand): Delete #ifdef + DEPRECATED_VALUE_RETURNED_FROM_STACK code. + * infcmd.c (print_return_value): Ditto. + * mips-tdep.c (skip_prologue_using_sal): New function. (mips32_skip_prologue, mips16_skip_prologue): Use skip_prologue_using_sal to get an upper bound on the search. diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 9d4b1346cc..b8c971c5dc 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -109,24 +109,6 @@ extern int hppa_instruction_nullified (void); #define INSTRUCTION_NULLIFIED hppa_instruction_nullified () #endif -/* elz: Return a large value, which is stored on the stack at addr. - This is defined only for the hppa, at this moment. The above macro - DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS is not called anymore, - because it assumes that on exit from a called function which - returns a large structure on the stack, the address of the ret - structure is still in register 28. Unfortunately this register is - usually overwritten by the called function itself, on hppa. This is - specified in the calling convention doc. As far as I know, the only - way to get the return value is to have the caller tell us where it - told the callee to put it, rather than have the callee tell us. */ -struct value *hppa_value_returned_from_stack (struct type *valtype, - CORE_ADDR addr); -/* FIXME: cagney/2003-09-27: This method should now be redundant. - Instead, when "struct return convention", the inferior function - call code always saves and uses the struct return's stack address. */ -#define DEPRECATED_VALUE_RETURNED_FROM_STACK(valtype,addr) \ - hppa_value_returned_from_stack (valtype, addr) - extern void hppa_frame_init_saved_regs (struct frame_info *); #define DEPRECATED_FRAME_INIT_SAVED_REGS(FI) \ hppa_frame_init_saved_regs (FI) diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index c168b5d61c..0d1d305042 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2060,30 +2060,6 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, #endif -/* elz: this function returns a value which is built looking at the given address. - It is called from call_function_by_hand, in case we need to return a - value which is larger than 64 bits, and it is stored in the stack rather than - in the registers r28 and r29 or fr4. - This function does the same stuff as value_being_returned in values.c, but - gets the value from the stack rather than from the buffer where all the - registers were saved when the function called completed. */ -/* FIXME: cagney/2003-09-27: This function is no longer needed. The - inferior function call code now directly handles the case described - above. */ -struct value * -hppa_value_returned_from_stack (struct type *valtype, CORE_ADDR addr) -{ - struct value *val; - - val = allocate_value (valtype); - CHECK_TYPEDEF (valtype); - target_read_memory (addr, VALUE_CONTENTS_RAW (val), TYPE_LENGTH (valtype)); - - return val; -} - - - /* elz: Used to lookup a symbol in the shared libraries. This function calls shl_findsym, indirectly through a call to __d_shl_get. __d_shl_get is in end.c, which is always diff --git a/gdb/infcall.c b/gdb/infcall.c index 7695c6ab67..0956f34382 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -1075,22 +1075,6 @@ the function call).", name); do_cleanups (inf_status_cleanup); /* Figure out the value returned by the function. */ - /* elz: I defined this new macro for the hppa architecture only. - this gives us a way to get the value returned by the function - from the stack, at the same address we told the function to put - it. We cannot assume on the pa that r28 still contains the - address of the returned structure. Usually this will be - overwritten by the callee. I don't know about other - architectures, so I defined this macro */ - /* FIXME: cagney/2003-09-27: This is no longer needed. The problem - is now handled directly be by the code below. */ -#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK - if (struct_return) - { - do_cleanups (retbuf_cleanup); - return DEPRECATED_VALUE_RETURNED_FROM_STACK (value_type, struct_addr); - } -#endif if (struct_return) { /* NOTE: cagney/2003-09-27: This assumes that PUSH_DUMMY_CALL diff --git a/gdb/infcmd.c b/gdb/infcmd.c index a7e0e157dc..2c8631eb3b 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -1086,13 +1086,7 @@ print_return_value (int structure_return, struct type *value_type) a more complicated case of what is already being done in in the inferior function call code. In fact, when inferior function calls are made async, this will likely be made the norm. */ -#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK -#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 1 -#else -#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 0 -#endif - else if (gdbarch_return_value_p (current_gdbarch) - || DEPRECATED_VALUE_RETURNED_FROM_STACK_P) + else if (gdbarch_return_value_p (current_gdbarch)) /* We cannot determine the contents of the structure because it is on the stack, and we don't know where, since we did not initiate the call, as opposed to the call_function_by_hand