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] Change gdbarch_return_value to take function type instead of return value type


On Oct 13 11:31, Corinna Vinschen wrote:
> Otherwise, thanks for approving the patch, I'll check it in in a few minutes.

No, I won't.  I found that my patch missed the calls of using_struct_return
in eval.c.  These calls only happen in case of a OP_OBJC_MSGCALL operation.

At line 841 in eval.c, in function evaluate_subexp_standard() I found this:

  /* If we found a method with symbol information, check to see
     if it returns a struct.  Otherwise assume it doesn't.  */

  if (method)
    {
      [...]
      struct_return = using_struct_return (value_type, using_gcc);
    }
  else if (expect_type != NULL)
    {
      struct_return = using_struct_return (check_typedef (expect_type), using_gcc);
    }

While the `if (method)' branch is simple, the `else if' branch can't be
solved easily.  evaluate_subexp_standard just gets the expected return type
as parameter.

Does anybody know how to get around this problem?  For now I can only see
one way, redefine gdbarch_return_value to get both, function type and return
value type.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.


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