diff options
author | Aidan Skinner <aidan@velvet.net> | 2002-07-13 12:25:16 +0000 |
---|---|---|
committer | Aidan Skinner <aidan@velvet.net> | 2002-07-13 12:25:16 +0000 |
commit | aacb1f0a62ea93e80775f62c8c7206e444505e5d (patch) | |
tree | 9fe48c5f8accab98e03ce6fa53c0069c1aeb824b /gdb/ada-lang.c | |
parent | c11d79f2b1639b60477fcb1bffb801172c74afc8 (diff) | |
download | gdb-aacb1f0a62ea93e80775f62c8c7206e444505e5d.zip gdb-aacb1f0a62ea93e80775f62c8c7206e444505e5d.tar.gz gdb-aacb1f0a62ea93e80775f62c8c7206e444505e5d.tar.bz2 |
* 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()
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index feb5a68..83c32b1 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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); } */ |