This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/ppc] Use frame_align(); delete hack


On Sep 24,  7:07pm, Andrew Cagney wrote:


In the process it delets that global variable struct return hack. Struct returns involving dummy functions are instead handled by the dummy frame code.

Where/how does this happen?
In hand_function_call(), near the end:

    /* NOTE: cagney/2002-09-10: Only when the stack has been correctly
       aligned (using frame_align()) do we can trust STRUCT_ADDR and
       fetch the return value direct from the stack.  This lack of
       trust comes about because legacy targets have a nasty habit of
       silently, and local to PUSH_ARGUMENTS(), moving STRUCT_ADDR.
       For such targets, just hope that value_being_returned() can
       find the adjusted value.  */
    if (struct_return && gdbarch_frame_align_p (current_gdbarch))
      {
        struct value *retval = value_at (value_type, struct_addr, NULL);
        do_cleanups (retbuf_cleanup);
        return retval;
      }
    else
      {
	struct value *retval = value_being_returned (value_type, retbuf,
						     struct_return);
	do_cleanups (retbuf_cleanup);
	return retval;
      }
  }
Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]