aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-24 09:58:29 -0700
committerTom Tromey <tom@tromey.com>2019-03-06 16:04:31 -0700
commit0ccf4211fdec30fab46a5552ecfbe8e7ca98d50f (patch)
tree425680b03c2b849635e829c81a9ad18aa8785af7 /gdb/utils.c
parentfe7b42e5843ef82f97959e0e18122c164449a8ea (diff)
downloadgdb-0ccf4211fdec30fab46a5552ecfbe8e7ca98d50f.zip
gdb-0ccf4211fdec30fab46a5552ecfbe8e7ca98d50f.tar.gz
gdb-0ccf4211fdec30fab46a5552ecfbe8e7ca98d50f.tar.bz2
Remove free_current_contents
free_current_contents is no longer used, so this patch removes it. 2019-03-06 Tom Tromey <tom@tromey.com> * utils.h (free_current_contents): Don't declare. * utils.c (free_current_contents): Remove.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 6520f1d..258614a 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -127,35 +127,6 @@ show_pagination_enabled (struct ui_file *file, int from_tty,
}
-/* Cleanup utilities.
-
- These are not defined in cleanups.c (nor declared in cleanups.h)
- because while they use the "cleanup API" they are not part of the
- "cleanup API". */
-
-/* This function is useful for cleanups.
- Do
-
- foo = xmalloc (...);
- old_chain = make_cleanup (free_current_contents, &foo);
-
- to arrange to free the object thus allocated. */
-
-void
-free_current_contents (void *ptr)
-{
- void **location = (void **) ptr;
-
- if (location == NULL)
- internal_error (__FILE__, __LINE__,
- _("free_current_contents: NULL pointer"));
- if (*location != NULL)
- {
- xfree (*location);
- *location = NULL;
- }
-}
-
/* Print a warning message. The first argument STRING is the warning