* command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.
authorFred Fish <fnf@specifix.com>
Tue, 23 Jun 1992 03:33:47 +0000 (03:33 +0000)
committerFred Fish <fnf@specifix.com>
Tue, 23 Jun 1992 03:33:47 +0000 (03:33 +0000)
* 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.

gdb/ChangeLog
gdb/command.c
gdb/dwarfread.c
gdb/valprint.c

index 24f3deb192123a3c8f9b60fbd6df220fced0df14..0c8aa7c86c567d57e7c0ba5135e8b07a449f8ed0 100644 (file)
@@ -1,3 +1,12 @@
+Mon Jun 22 20:18:06 1992  Fred Fish  (fnf@cygnus.com)
+
+       * 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.
+
 Mon Jun 22 17:19:02 1992  Per Bothner  (bothner@cygnus.com)
 
        * infrun.c (wait_for_inferior):  Don't test for SIGEMT
index 3d910107dcf33a6b90cecbb08f2e7f36971adcb5..0d2cfe7382ceab7e5dc01c275c938c78eb647903 100644 (file)
@@ -165,7 +165,7 @@ add_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
   return c;
 }
 
-/* Like add_prefix_cmd butsets the abbrev_flag on the new command. */
+/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
    
 struct cmd_list_element *
 add_abbrev_prefix_cmd (name, class, fun, doc, prefixlist, prefixname,
index 32a9846f8ab6e24d322359b8b91d553c43374539..eb120bc3c66f3233373ee7e9c28dc334f2be90da 100644 (file)
@@ -1456,7 +1456,7 @@ enum_type (dip, objfile)
          add_symbol_to_list (sym, list_in_scope);
        }
       /* Now create the vector of fields, and record how big it is. This is
-        where we reverse the order, by pulling the members of the list in
+        where we reverse the order, by pulling the members off the list in
         reverse order from how they were inserted.  If we have no fields
         (this is apparently possible in C++) then skip building a field
         vector. */
index 80d843acf11684be51c8eb9c8cb68768d54970ad..8f1262d1316b2a3c995cce031a13f31b3aa4b0a5 100644 (file)
@@ -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:
       ;
     }