/* Abstraction of GNU v3 abi.
Contributed by Jim Blandy <jimb@redhat.com>
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
This file is part of GDB.
t = arch_type (arch, TYPE_CODE_STRUCT, offset * TARGET_CHAR_BIT, NULL);
TYPE_NFIELDS (t) = field - field_list;
TYPE_FIELDS (t) = field_list;
- TYPE_TAG_NAME (t) = "gdb_gnu_v3_abi_vtable";
+ TYPE_NAME (t) = "gdb_gnu_v3_abi_vtable";
INIT_CPLUS_SPECIFIC (t);
return make_type_with_address_space (t, TYPE_INSTANCE_FLAG_CODE_SPACE);
LONGEST offset_to_top;
const char *atsign;
- /* We only have RTTI for class objects. */
- if (TYPE_CODE (values_type) != TYPE_CODE_STRUCT)
+ /* We only have RTTI for dynamic class objects. */
+ if (TYPE_CODE (values_type) != TYPE_CODE_STRUCT
+ || !gnuv3_dynamic_class (values_type))
return NULL;
/* Determine architecture. */
if (gdbarch_vtable_function_descriptors (gdbarch))
vfn = value_addr (vfn);
- TRY
+ try
{
addr = value_as_address (vfn);
}
- CATCH (ex, RETURN_MASK_ERROR)
+ catch (const gdb_exception_error &ex)
{
- printf_filtered (_("<error: %s>"), ex.message);
+ printf_filtered (_("<error: %s>"), ex.what ());
got_error = 1;
}
- END_CATCH
if (!got_error)
print_function_pointer_address (opts, gdbarch, addr, gdb_stdout);
t = arch_type (arch, TYPE_CODE_STRUCT, offset * TARGET_CHAR_BIT, NULL);
TYPE_NFIELDS (t) = field - field_list;
TYPE_FIELDS (t) = field_list;
- TYPE_TAG_NAME (t) = "gdb_gnu_v3_type_info";
+ TYPE_NAME (t) = "gdb_gnu_v3_type_info";
INIT_CPLUS_SPECIFIC (t);
return t;
of the real function from the function descriptor before passing on
the address to other layers of GDB. */
func_addr = gdbarch_convert_from_func_ptr_addr (gdbarch, method_stop_pc,
- ¤t_target);
+ current_top_target ());
if (func_addr != 0)
method_stop_pc = func_addr;