2002-02-03 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Pass a proper valaddr to cp_print_class_method. * valops.c (search_struct_method): If there is only one method and args is NULL, return that method.
This commit is contained in:
parent
493d28d51b
commit
acf5ed49a0
3 changed files with 35 additions and 15 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2002-02-03 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
|
* c-valprint.c (c_val_print): Pass a proper valaddr to
|
||||||
|
cp_print_class_method.
|
||||||
|
* valops.c (search_struct_method): If there is only one method
|
||||||
|
and args is NULL, return that method.
|
||||||
|
|
||||||
2002-02-03 Daniel Jacobowitz <drow@mvista.com>
|
2002-02-03 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
* gdbtypes.c (init_simd_type): Use TYPE_TAG_NAME instead of
|
* gdbtypes.c (init_simd_type): Use TYPE_TAG_NAME instead of
|
||||||
|
|
|
@ -441,8 +441,12 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_METHOD:
|
case TYPE_CODE_METHOD:
|
||||||
cp_print_class_method (valaddr + embedded_offset, lookup_pointer_type (type), stream);
|
{
|
||||||
|
struct value *v = value_at (type, address, NULL);
|
||||||
|
cp_print_class_method (VALUE_CONTENTS (value_addr (v)),
|
||||||
|
lookup_pointer_type (type), stream);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case TYPE_CODE_VOID:
|
case TYPE_CODE_VOID:
|
||||||
fprintf_filtered (stream, "void");
|
fprintf_filtered (stream, "void");
|
||||||
|
|
|
@ -2274,6 +2274,15 @@ search_struct_method (char *name, struct value **arg1p,
|
||||||
|
|
||||||
if (j > 0 && args == 0)
|
if (j > 0 && args == 0)
|
||||||
error ("cannot resolve overloaded method `%s': no arguments supplied", name);
|
error ("cannot resolve overloaded method `%s': no arguments supplied", name);
|
||||||
|
else if (j == 0 && args == 0)
|
||||||
|
{
|
||||||
|
if (TYPE_FN_FIELD_STUB (f, j))
|
||||||
|
check_stub_method (type, i, j);
|
||||||
|
v = value_fn_field (arg1p, f, j, type, offset);
|
||||||
|
if (v != NULL)
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
else
|
||||||
while (j >= 0)
|
while (j >= 0)
|
||||||
{
|
{
|
||||||
if (TYPE_FN_FIELD_STUB (f, j))
|
if (TYPE_FN_FIELD_STUB (f, j))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue