X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fm2-valprint.c;h=fa767cdbceca7c2f530e806ef5364938c3f1bca8;hb=c0b0a14290e1909a6cc3febb443560c3e95562c2;hp=f43a2d2afe84fb893b63b1cbc2e940eede773e34;hpb=e8b24d9ff5b9419fc079f5fe975fac6f499f8bfb;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/m2-valprint.c b/gdb/m2-valprint.c index f43a2d2afe..fa767cdbce 100644 --- a/gdb/m2-valprint.c +++ b/gdb/m2-valprint.c @@ -1,6 +1,6 @@ /* Support for printing Modula 2 values for GDB, the GNU debugger. - Copyright (C) 1986-2016 Free Software Foundation, Inc. + Copyright (C) 1986-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "c-lang.h" #include "m2-lang.h" #include "target.h" +#include "cli/cli-style.h" static int print_unpacked_pointer (struct type *type, CORE_ADDR address, CORE_ADDR addr, @@ -92,7 +93,8 @@ m2_print_long_set (struct type *type, const gdb_byte *valaddr, } else { - fprintf_filtered (stream, " %s }", _("")); + fprintf_styled (stream, metadata_style.style (), + " %s }", _("")); return; } @@ -313,7 +315,6 @@ m2_val_print (struct type *type, int embedded_offset, struct value *original_value, const struct value_print_options *options) { - struct gdbarch *gdbarch = get_type_arch (type); unsigned len; struct type *elttype; CORE_ADDR addr; @@ -398,7 +399,7 @@ m2_val_print (struct type *type, int embedded_offset, m2_print_unbounded_array (type, valaddr, embedded_offset, address, stream, recurse, options); else - cp_print_value_fields (type, type, valaddr, embedded_offset, + cp_print_value_fields (type, type, embedded_offset, address, stream, recurse, original_value, options, NULL, 0); break; @@ -408,8 +409,8 @@ m2_val_print (struct type *type, int embedded_offset, elttype = check_typedef (elttype); if (TYPE_STUB (elttype)) { - fprintf_filtered (stream, _("")); - gdb_flush (stream); + fprintf_styled (stream, metadata_style.style (), + _("")); break; } else @@ -425,7 +426,8 @@ m2_val_print (struct type *type, int embedded_offset, maybe_bad_bstring: if (i < 0) { - fputs_filtered (_(""), stream); + fputs_styled (_(""), metadata_style.style (), + stream); goto done; } @@ -500,5 +502,4 @@ m2_val_print (struct type *type, int embedded_offset, &m2_decorations); break; } - gdb_flush (stream); }