X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fcp-valprint.c;h=04be4dc83b7fdbc845a85274269f4c5f037a73d4;hb=37055cada860277ee53b61bb8fd57293fdfa840b;hp=c8472d94b24c49a6bce704b41692f1520474e536;hpb=268a13a5a3f7c6b9b6ffc5ac2d1b24eb41f3fbdc;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index c8472d94b2..04be4dc83b 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -36,6 +36,8 @@ #include "extension.h" #include "typeprint.h" #include "gdbsupport/byte-vector.h" +#include "gdbarch.h" +#include "cli/cli-style.h" static struct obstack dont_print_vb_obstack; static struct obstack dont_print_statmem_obstack; @@ -54,7 +56,7 @@ static void cp_print_value (struct type *, struct type *, /* GCC versions after 2.4.5 use this. */ -extern const char vtbl_ptr_name[] = "__vtbl_ptr_type"; +const char vtbl_ptr_name[] = "__vtbl_ptr_type"; /* Return truth value for assertion that TYPE is of the type "pointer to virtual function". */ @@ -169,7 +171,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, /* If there are no data fields, skip this part */ if (len == n_baseclasses || !len) - fprintf_filtered (stream, ""); + fprintf_styled (stream, metadata_style.style (), ""); else { size_t statmem_obstack_initial_size = 0; @@ -267,7 +269,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, byte order problems. */ if (TYPE_FIELD_IGNORE (type, i)) { - fputs_filtered ("", stream); + fputs_styled ("", + metadata_style.style (), stream); } else if (value_bits_synthetic_pointer (val, TYPE_FIELD_BITPOS (type, @@ -275,7 +278,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, TYPE_FIELD_BITSIZE (type, i))) { - fputs_filtered (_(""), stream); + fputs_styled (_(""), + metadata_style.style (), stream); } else { @@ -291,8 +295,8 @@ cp_print_value_fields (struct type *type, struct type *real_type, { if (TYPE_FIELD_IGNORE (type, i)) { - fputs_filtered ("", - stream); + fputs_styled ("", + metadata_style.style (), stream); } else if (field_is_static (&TYPE_FIELD (type, i))) { @@ -306,9 +310,9 @@ cp_print_value_fields (struct type *type, struct type *real_type, } catch (const gdb_exception_error &ex) { - fprintf_filtered (stream, - _(""), - ex.what ()); + fprintf_styled (stream, metadata_style.style (), + _(""), + ex.what ()); } } else if (i == vptr_fieldno && type == vptr_basetype)