diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-05-12 02:20:38 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-05-12 02:20:38 +0000 |
commit | 4a1970e4a429204b221938e52804b9a2a5ec1001 (patch) | |
tree | b4f26a59a53183d09a033c88a489259470d12820 /gdb/gdbtypes.c | |
parent | b2e75d78994bf7899fdb51387a9d95950f09ad9a (diff) | |
download | binutils-gdb-4a1970e4a429204b221938e52804b9a2a5ec1001.tar.gz |
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.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 1b3b1b9b42d..732c92818bf 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -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. */ |