* ada-tasks.c (add_task_entry): replace calls to
authorAidan Skinner <aidan@velvet.net>
Sat, 13 Jul 2002 12:25:16 +0000 (12:25 +0000)
committerAidan Skinner <aidan@velvet.net>
Sat, 13 Jul 2002 12:25:16 +0000 (12:25 +0000)
malloc() with xmalloc
* ada-tasks.c (init_task_list): replace calls to free with xfree()

* ada-lang.c (replace_operator_with_call, fill_in_ada_prototype,
ada_finish_decode_line_1, all_sals_for_line
ada_breakpoint_rewrite): replace calls to free() with xfree()

gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-tasks.c

index 861f270a96e30ecdf2fffa397976bddea73ff593..dda63f5a6a979de3017f30a677f1e25a165fef52 100644 (file)
@@ -1,3 +1,13 @@
+2002-07-13  Aidan Skinner <aidan@velvet.net>
+
+       * ada-tasks.c (add_task_entry): replace calls to
+       malloc() with xmalloc
+       * ada-tasks.c (init_task_list): replace calls to free with xfree()
+       
+       * ada-lang.c (replace_operator_with_call, fill_in_ada_prototype,
+       ada_finish_decode_line_1, all_sals_for_line
+       ada_breakpoint_rewrite): replace calls to free() with xfree()
+               
 2002-07-12  Kevin Buettner  <kevinb@redhat.com>
 
        From Nicholas Duffek (with minor changes by Martin Hunt, 
@@ -3965,7 +3975,7 @@ Fri May 17 14:26:19 2002  J"orn Rennecke <joern.rennecke@superh.com>
 2002-04-24  Pierre Muller  <ics.u-strasbg.fr>
 
        * hpread.c (hpread_psymtab_to_symtab_1,
-       hpread_psymtab_to_symtab): Replace fprintf (stderr,...)
+       hpread_psymtab_to_symtab): Replace fprintf tab_to_s...)
        with fprintf_unfiltered (gdb_stderr,...).
 
 2002-04-24  Pierre Muller  <ics.u-strasbg.fr>
index feb5a68bf37994c547a8115996f94849ba643d6e..83c32b1fa734c76b07bdc5cf6a45701ac03b7cfc 100644 (file)
@@ -2891,7 +2891,7 @@ replace_operator_with_call (expp, pc, nargs, oplen, sym, block)
   newexp->elts[pc + 5].symbol = sym;
 
   *expp = newexp;
-  free (exp);
+  xfree (exp);
 }  
 
 /* Type-class predicates */
@@ -4363,7 +4363,7 @@ fill_in_ada_prototype (func)
   if (nargs == 0)
     {
       static struct field dummy_field = {0, 0, 0, 0};
-      free (TYPE_FIELDS (ftype));
+      xfree (TYPE_FIELDS (ftype));
       TYPE_FIELDS (ftype) = &dummy_field;
     }
   else
@@ -4373,7 +4373,7 @@ fill_in_ada_prototype (func)
       memcpy ((char*) fields, 
              (char*) TYPE_FIELDS (ftype), 
              nargs * sizeof (struct field));
-      free (TYPE_FIELDS (ftype));
+      xfree (TYPE_FIELDS (ftype));
       TYPE_FIELDS (ftype) = fields;
     }
 }
@@ -4586,7 +4586,7 @@ ada_finish_decode_line_1 (spec, file_table, funfirstline, canonical)
   selected.sals = (struct symtab_and_line*) 
     xmalloc (sizeof (struct symtab_and_line) * selected.nelts);
   memset (selected.sals, 0, selected.nelts * sizeof (selected.sals[i]));
-  make_cleanup (free, selected.sals);
+  make_cleanup (xfree, selected.sals);
 
   i = 0;
   while (i < selected.nelts)
@@ -5065,14 +5065,14 @@ all_sals_for_line (filename, line_num, canonical)
       if (canonical != NULL) 
        {
          *canonical = (char**) xmalloc (result.nelts * sizeof (char**));
-         make_cleanup (free, *canonical);
+         make_cleanup (xfree, *canonical);
          for (k = 0; k < result.nelts; k += 1) 
            {
              (*canonical)[k] = 
                extended_canonical_line_spec (result.sals[k], func_names[k]);
              if ((*canonical)[k] == NULL)
                error ("Could not locate one or more breakpoints.");
-             make_cleanup (free, (*canonical)[k]);
+             make_cleanup (xfree, (*canonical)[k]);
            }
        }
     }
@@ -5328,7 +5328,7 @@ char* ada_breakpoint_rewrite (char* arg, int* break_on_exceptionp)
       arg = (char*) xmalloc (sizeof ("__gnat_raise_nodefer_with_msg if "
                                     "long_integer(e) = long_integer(&)")
                             + toklen + 1);
-      make_cleanup (free, arg);
+      make_cleanup (xfree, arg);
       if (toklen == 0)
        strcpy (arg, "__gnat_raise_nodefer_with_msg");
       else if (STREQN (tok, "unhandled", toklen))
@@ -5354,7 +5354,7 @@ char* ada_breakpoint_rewrite (char* arg, int* break_on_exceptionp)
       arg = (char*) 
        xmalloc (sizeof ("system__assertions__raise_assert_failure")
                 + strlen (tok) + 1);
-      make_cleanup (free, arg);
+      make_cleanup (xfree, arg);
       sprintf (arg, "system__assertions__raise_assert_failure%s", tok);
     }
   */
index 23dc105ea9debe418c14af7ceef9e4a7b8e5bb36..426fdff30643ce350e67feef6461685e5dd2943e 100644 (file)
@@ -164,7 +164,7 @@ static int add_task_entry (p_task_id, index)
   struct task_entry *pt;
 
   highest_task_num++;
-  new_task_entry = malloc (sizeof (struct task_entry));
+  new_task_entry = xmalloc (sizeof (struct task_entry));
   new_task_entry->task_num = highest_task_num;
   new_task_entry->task_id = p_task_id;
   new_task_entry->known_tasks_index = index;
@@ -236,7 +236,7 @@ void init_task_list ()
     {
       old_pt = pt;
       pt = pt->next_task;
-      free (old_pt);
+      xfree (old_pt);
     };
   task_list = NULL;
   highest_task_num = 0;
This page took 0.03082 seconds and 4 git commands to generate.