X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fc-typeprint.c;h=e0f1714da11591fe47a5a2dce0f3afdaa3c8aa87;hb=cd850b40cc84ff08c50b8b16a0968b3cd6b33664;hp=6690ca53bcdac5e656eff63c37a54d6be0b283b0;hpb=ac8c53cc67724f990003009fd37a3d7dc662fcb3;p=binutils-gdb.git diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 6690ca53bcd..e0f1714da11 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -205,13 +205,13 @@ c_print_typedef (struct type *type, { type = check_typedef (type); fprintf_filtered (stream, "typedef "); - type_print (type, "", stream, 0); + type_print (type, "", stream, -1); if (TYPE_NAME ((SYMBOL_TYPE (new_symbol))) == 0 || strcmp (TYPE_NAME ((SYMBOL_TYPE (new_symbol))), SYMBOL_LINKAGE_NAME (new_symbol)) != 0 || TYPE_CODE (SYMBOL_TYPE (new_symbol)) == TYPE_CODE_TYPEDEF) fprintf_filtered (stream, " %s", SYMBOL_PRINT_NAME (new_symbol)); - fprintf_filtered (stream, ";\n"); + fprintf_filtered (stream, ";"); } /* If TYPE is a derived type, then print out derivation information. @@ -1116,10 +1116,12 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, { if (TYPE_STUB (type)) fprintfi_filtered (level + 4, stream, - _("\n")); + _("%p[%p]\n"), + metadata_style.style ().ptr (), nullptr); else fprintfi_filtered (level + 4, stream, - _("\n")); + _("%p[%p]\n"), + metadata_style.style ().ptr (), nullptr); } /* Start off with no specific section type, so we can print @@ -1277,7 +1279,8 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, { /* Keep GDB from crashing here. */ fprintf_filtered (stream, - _(" %s;\n"), + _("%p[%p] %s;\n"), + metadata_style.style ().ptr (), nullptr, TYPE_FN_FIELD_PHYSNAME (f, j)); break; } @@ -1325,9 +1328,9 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream, &local_flags); } else - fprintf_filtered (stream, - _(""), - mangled_name); + fprintf_styled (stream, metadata_style.style (), + _(""), + mangled_name); } else { @@ -1465,7 +1468,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, if (type == NULL) { - fputs_filtered (_(""), stream); + fputs_styled (_(""), metadata_style.style (), stream); return; } @@ -1511,7 +1514,8 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, couldn't resolve TYPE_TARGET_TYPE. Not much we can do. */ gdb_assert (TYPE_NAME (type) == NULL); gdb_assert (TYPE_TARGET_TYPE (type) == NULL); - fprintf_filtered (stream, _("")); + fprintf_styled (stream, metadata_style.style (), + _("")); break; case TYPE_CODE_FUNC: @@ -1622,10 +1626,12 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, { if (TYPE_STUB (type)) fprintfi_filtered (level + 4, stream, - _("\n")); + _("%p[%p]\n"), + metadata_style.style ().ptr (), nullptr); else fprintfi_filtered (level + 4, stream, - _("\n")); + _("%p[%p]\n"), + metadata_style.style ().ptr (), nullptr); } len = TYPE_NFIELDS (type); for (i = 0; i < len; i++) @@ -1668,7 +1674,7 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, case TYPE_CODE_RANGE: /* This should not occur. */ - fprintf_filtered (stream, _("")); + fprintf_styled (stream, metadata_style.style (), _("")); break; case TYPE_CODE_NAMESPACE: @@ -1690,8 +1696,8 @@ c_type_print_base_1 (struct type *type, struct ui_file *stream, { /* At least for dump_symtab, it is important that this not be an error (). */ - fprintf_filtered (stream, _(""), - TYPE_CODE (type)); + fprintf_styled (stream, metadata_style.style (), + _(""), TYPE_CODE (type)); } break; }