* win32-low.c (create_process): New.
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index b69ab2240eb386332db1481245f253727ff74a72..c19d678a7ce97c9267d7357d5c3f6a2611ed327e 100644 (file)
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "gdb_obstack.h"
@@ -167,7 +165,6 @@ cp_print_value_fields (struct type *type, struct type *real_type,
                       struct type **dont_print_vb,int dont_print_statmem)
 {
   int i, len, n_baseclasses;
-  struct obstack tmp_obstack;
   char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
   int fields_seen = 0;
 
@@ -197,12 +194,13 @@ cp_print_value_fields (struct type *type, struct type *real_type,
     fprintf_filtered (stream, "<No data fields>");
   else
     {
+      struct obstack tmp_obstack = dont_print_statmem_obstack;
+
       if (dont_print_statmem == 0)
        {
          /* If we're at top level, carve out a completely fresh
             chunk of the obstack and use that until this particular
             invocation returns.  */
-         tmp_obstack = dont_print_statmem_obstack;
          obstack_finish (&dont_print_statmem_obstack);
        }
 
@@ -426,9 +424,9 @@ cp_print_value (struct type *type, struct type *real_type,
                struct ui_file *stream, int format, int recurse,
                enum val_prettyprint pretty, struct type **dont_print_vb)
 {
-  struct obstack tmp_obstack;
   struct type **last_dont_print
     = (struct type **) obstack_next_free (&dont_print_vb_obstack);
+  struct obstack tmp_obstack = dont_print_vb_obstack;
   int i, n_baseclasses = TYPE_N_BASECLASSES (type);
   int thisoffset;
   struct type *thistype;
@@ -438,7 +436,6 @@ cp_print_value (struct type *type, struct type *real_type,
       /* If we're at top level, carve out a completely fresh
          chunk of the obstack and use that until this particular
          invocation returns.  */
-      tmp_obstack = dont_print_vb_obstack;
       /* Bump up the high-water mark.  Now alpha is omega.  */
       obstack_finish (&dont_print_vb_obstack);
     }
@@ -758,6 +755,7 @@ cp_print_hpacc_virtual_table_entries (struct type *type, int *vfuncs,
          /* pai: (temp) FIXME Maybe this should be DMGL_ANSI */
          vf_name = cplus_demangle (field_physname, DMGL_ARM);
          fprintf_filtered (stream, " %s", vf_name);
+         xfree (vf_name);
          if (--(*vfuncs) > 0)
            fputs_filtered (", ", stream);
        }
This page took 0.024214 seconds and 4 git commands to generate.