Tue Apr 30 13:13:33 1991 Michael Tiemann (tiemann at cygint.cygnus.com)
* valprint.c (type_print_base): If the type being printed is a struct containing undefined types, print "<undefine type>" as the type instead of crashing. * values.c (value_headof): Get the vtable pointer taking TYPE_VPTR_BASETYPE into account. * symtab.c, symtab.h, dbxread.c: Fix various whitespace splotches.
This commit is contained in:
parent
98c1b9e79b
commit
aec4cb918e
@ -1,3 +1,12 @@
|
||||
Tue Apr 30 13:13:33 1991 Michael Tiemann (tiemann at cygint.cygnus.com)
|
||||
|
||||
* valprint.c (type_print_base): If the type being printed is a
|
||||
struct containing undefined types, print "<undefine type>"
|
||||
as the type instead of crashing.
|
||||
* values.c (value_headof): Get the vtable pointer taking
|
||||
TYPE_VPTR_BASETYPE into account.
|
||||
* symtab.c, symtab.h, dbxread.c: Fix various whitespace splotches.
|
||||
|
||||
Mon Apr 29 13:22:51 1991 Jim Kingdon (kingdon at cygint.cygnus.com)
|
||||
|
||||
* Move BROKEN_LARGE_ALLOCA from tm-sun386.h to xm-sun386.h.
|
||||
|
@ -1640,6 +1640,14 @@ type_print_base (type, stream, show, level)
|
||||
fprintf_filtered (stream, "virtual ");
|
||||
else if (TYPE_FN_FIELD_STATIC_P (f, j))
|
||||
fprintf_filtered (stream, "static ");
|
||||
if (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)) == 0)
|
||||
{
|
||||
/* Keep GDB from crashing here. */
|
||||
fprintf (stream, "<undefined type> %s;\n",
|
||||
TYPE_FN_FIELD_PHYSNAME (f, j));
|
||||
break;
|
||||
}
|
||||
else
|
||||
type_print (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f, j)), "", stream, 0);
|
||||
if (TYPE_FLAGS (TYPE_FN_FIELD_TYPE (f, j)) & TYPE_FLAG_STUB)
|
||||
{
|
||||
|
10
gdb/values.c
10
gdb/values.c
@ -50,7 +50,6 @@ struct value_history_chunk
|
||||
static struct value_history_chunk *value_history_chain;
|
||||
|
||||
static int value_history_count; /* Abs number of last entry stored */
|
||||
|
||||
|
||||
/* List of all value objects currently allocated
|
||||
(except for those released by calls to release_value)
|
||||
@ -930,7 +929,13 @@ value_headof (arg, btype, dtype)
|
||||
CORE_ADDR pc_for_sym;
|
||||
char *demangled_name;
|
||||
|
||||
vtbl = value_ind (value_field (value_ind (arg), TYPE_VPTR_FIELDNO (dtype)));
|
||||
btype = TYPE_VPTR_BASETYPE (dtype);
|
||||
check_stub_type (btype);
|
||||
if (btype != dtype)
|
||||
vtbl = value_cast (lookup_pointer_type (btype), arg);
|
||||
else
|
||||
vtbl = arg;
|
||||
vtbl = value_ind (value_field (value_ind (vtbl), TYPE_VPTR_FIELDNO (btype)));
|
||||
|
||||
/* Check that VTBL looks like it points to a virtual function table. */
|
||||
i = find_pc_misc_function (VALUE_ADDRESS (vtbl));
|
||||
@ -1021,7 +1026,6 @@ value_static_field (type, fieldname, fieldno)
|
||||
|
||||
if (fieldno < 0)
|
||||
{
|
||||
register struct type *t = type;
|
||||
/* Look for static field. */
|
||||
int i;
|
||||
for (i = TYPE_NFIELDS (type) - 1; i >= TYPE_N_BASECLASSES (type); i--)
|
||||
|
Loading…
x
Reference in New Issue
Block a user