aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-06-23 03:33:47 +0000
committerFred Fish <fnf@specifix.com>1992-06-23 03:33:47 +0000
commit0efe20a64246d8aca5e0f987063ba15181cd6290 (patch)
tree62242460f1cb13c3524a70dc8f4e94946c6e5d41 /gdb/valprint.c
parent475f9b6d66e4fbdd40cd595948ea58654b927bc7 (diff)
downloadgdb-0efe20a64246d8aca5e0f987063ba15181cd6290.zip
gdb-0efe20a64246d8aca5e0f987063ba15181cd6290.tar.gz
gdb-0efe20a64246d8aca5e0f987063ba15181cd6290.tar.bz2
* command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.
* dwarfread.c (enum_type): Fix misspelling in comment. * valprint.c (val_print_fields, cplus_val_print): Minor adjustment to printing of C++ class structures to more closely match format for printing C structures, with and without setting pretty print.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 80d843a..8f1262d 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -513,11 +513,14 @@ val_print_fields (type, valaddr, stream, format, recurse, pretty, dont_print)
fprintf_filtered (stream, ", ");
else if (n_baseclasses > 0)
{
- fprintf_filtered (stream, "\n");
- print_spaces_filtered (2 + 2 * recurse, stream);
- fputs_filtered ("members of ", stream);
- fputs_filtered (type_name_no_tag (type), stream);
- fputs_filtered (": ", stream);
+ if (pretty)
+ {
+ fprintf_filtered (stream, "\n");
+ print_spaces_filtered (2 + 2 * recurse, stream);
+ fputs_filtered ("members of ", stream);
+ fputs_filtered (type_name_no_tag (type), stream);
+ fputs_filtered (": ", stream);
+ }
}
fields_seen = 1;
@@ -627,9 +630,11 @@ cplus_val_print (type, valaddr, stream, format, recurse, pretty, dont_print)
error ("could not find virtual baseclass `%s'\n",
type_name_no_tag (TYPE_BASECLASS (type, i)));
- fprintf_filtered (stream, "\n");
if (pretty)
- print_spaces_filtered (2 + 2 * recurse, stream);
+ {
+ fprintf_filtered (stream, "\n");
+ print_spaces_filtered (2 * recurse, stream);
+ }
fputs_filtered ("<", stream);
fputs_filtered (type_name_no_tag (TYPE_BASECLASS (type, i)), stream);
fputs_filtered ("> = ", stream);
@@ -639,6 +644,8 @@ cplus_val_print (type, valaddr, stream, format, recurse, pretty, dont_print)
val_print_fields (TYPE_BASECLASS (type, i), baddr, stream, format,
recurse, pretty,
(struct type **)obstack_base (&dont_print_obstack));
+ fputs_filtered (", ", stream);
+
flush_it:
;
}