2011-10-17 Joost van der Sluis <joost@cnoc.nl>
* gdbtypes.h: Added TYPE_SAFE_NAME macro to get the name of a type or "<unnamed type"> when there is no name assigned. * gnu-v3-abi.c (gnuv3_rtti_type): Use TYPE_SAFE_NAME macro to avoid a sigint when no name is assigned.
This commit is contained in:
parent
21ae7a4d84
commit
0a07729b43
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2011-10-17 Joost van der Sluis <joost@cnoc.nl>
|
||||
|
||||
* gdbtypes.h: Added TYPE_SAFE_NAME macro to get the name of a
|
||||
type or "<unnamed type"> when there is no name assigned.
|
||||
* gnu-v3-abi.c (gnuv3_rtti_type): Use TYPE_SAFE_NAME macro to
|
||||
avoid a sigint when no name is assigned.
|
||||
|
||||
2011-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Revert:
|
||||
|
|
|
@ -1204,6 +1204,11 @@ extern void allocate_gnat_aux_type (struct type *);
|
|||
|| TYPE_NFN_FIELDS (thistype) == 0) \
|
||||
&& (TYPE_STUB (thistype) || !TYPE_STUB_SUPPORTED (thistype)))
|
||||
|
||||
/* A helper macro that returns the name of a type or "unnamed type" if the type
|
||||
has no name. */
|
||||
#define TYPE_SAFE_NAME(type) \
|
||||
(TYPE_NAME (type) ? TYPE_NAME (type) : _("<unnamed type>"))
|
||||
|
||||
/* A helper macro that returns the name of an error type. If the type
|
||||
has a name, it is used; otherwise, a default is used. */
|
||||
#define TYPE_ERROR_NAME(type) \
|
||||
|
|
|
@ -319,7 +319,7 @@ gnuv3_rtti_type (struct value *value,
|
|||
|| strncmp (vtable_symbol_name, "vtable for ", 11))
|
||||
{
|
||||
warning (_("can't find linker symbol for virtual table for `%s' value"),
|
||||
TYPE_NAME (values_type));
|
||||
TYPE_SAFE_NAME (values_type));
|
||||
if (vtable_symbol_name)
|
||||
warning (_(" found `%s' instead"), vtable_symbol_name);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue