2005-05-11 Daniel Jacobowitz <drow@mvista.com>

Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>

        * Makefile.in: Update dependencies for valops.c.
        * valops.c: Include "gdb_assert.h".
        (typecmp): Skip THIS parameter to methods.
        (find_method_list): Remove static_memfuncp argument,
        update callers.  Check for stub methods.
        (find_value_oload_method_list): Don't set *static_memfuncp.
        (find_overload_match): Don't check for stub methods.  Assert
        that methods are not stubbed.  Handle static methods.
        (value_find_oload_method_list): Remove static_memfuncp argument.
        * gdbtypes.c (check_stub_method): Do not add THIS pointer
        to the argument list for static stub methods.
        * value.h (value_find_oload_method_list): Update prototype.
This commit is contained in:
Daniel Jacobowitz
2002-05-12 02:20:38 +00:00
parent b2e75d7899
commit 4a1970e4a4
5 changed files with 77 additions and 53 deletions

View File

@ -1649,9 +1649,16 @@ check_stub_method (struct type *type, int method_id, int signature_id)
argtypes = (struct type **)
TYPE_ALLOC (type, (argcount + 2) * sizeof (struct type *));
p = argtypetext;
/* FIXME: This is wrong for static member functions. */
argtypes[0] = lookup_pointer_type (type);
argcount = 1;
/* Add THIS pointer for non-static methods. */
f = TYPE_FN_FIELDLIST1 (type, method_id);
if (TYPE_FN_FIELD_STATIC_P (f, signature_id))
argcount = 0;
else
{
argtypes[0] = lookup_pointer_type (type);
argcount = 1;
}
if (*p != ')') /* () means no args, skip while */
{
@ -1694,8 +1701,6 @@ check_stub_method (struct type *type, int method_id, int signature_id)
xfree (demangled_name);
f = TYPE_FN_FIELDLIST1 (type, method_id);
TYPE_FN_FIELD_PHYSNAME (f, signature_id) = mangled_name;
/* Now update the old "stub" type into a real type. */