diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 08c08c6..4a0b5a2 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "defs.h" +#include "dyn-string.h" #include "gdb_assert.h" #include <ctype.h> #include "gdb_string.h" @@ -238,6 +239,18 @@ make_cleanup_freeargv (char **arg) } static void +do_dyn_string_delete (void *arg) +{ + dyn_string_delete ((dyn_string_t) arg); +} + +struct cleanup * +make_cleanup_dyn_string_delete (dyn_string_t arg) +{ + return make_my_cleanup (&cleanup_chain, do_dyn_string_delete, arg); +} + +static void do_bfd_close_cleanup (void *arg) { bfd_close (arg); |