diff options
Diffstat (limited to 'gdb/gnu-v2-abi.c')
-rw-r--r-- | gdb/gnu-v2-abi.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index 7b511ea..9246788 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -1,6 +1,6 @@ /* Abstraction of GNU v2 abi. - Copyright (C) 2001-2024 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Free Software Foundation, Inc. Contributed by Daniel Berlin <dberlin@redhat.com> @@ -186,7 +186,6 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc) struct type *known_type; struct type *rtti_type; CORE_ADDR vtbl; - struct bound_minimal_symbol minsym; char *p; const char *linkage_name; struct type *btype; @@ -239,7 +238,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc) vtbl = value_as_address (value_field (v, known_type_vptr_fieldno)); /* Try to find a symbol that is the vtable. */ - minsym=lookup_minimal_symbol_by_pc(vtbl); + bound_minimal_symbol minsym = lookup_minimal_symbol_by_pc (vtbl); if (minsym.minsym==NULL || (linkage_name=minsym.minsym->linkage_name ())==NULL || !is_vtable_name (linkage_name)) @@ -266,15 +265,9 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc) if (top && ((*top) >0)) { if (rtti_type->length () > known_type->length ()) - { - if (full) - *full=0; - } + *full = 0; else - { - if (full) - *full=1; - } + *full = 1; } } else @@ -412,9 +405,7 @@ init_gnuv2_ops (void) gnu_v2_abi_ops.baseclass_offset = gnuv2_baseclass_offset; } -void _initialize_gnu_v2_abi (); -void -_initialize_gnu_v2_abi () +INIT_GDB_FILE (gnu_v2_abi) { init_gnuv2_ops (); register_cp_abi (&gnu_v2_abi_ops); |