This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs
- From: Tom Tromey <tromey at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 24 May 2013 09:50:10 -0600
- Subject: Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs
- References: <yjt2k3n2d42c dot fsf at ruffy2 dot mtv dot corp dot google dot com>
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> +static void
Doug> +maintenance_expand_symtabs (char *args, int from_tty)
Doug> +{
Doug> + struct program_space *pspace;
Doug> + struct objfile *objfile;
Doug> + struct cleanup *cleanups;
Doug> + char **argv;
Doug> + char *regexp = NULL;
Doug> +
Doug> + /* We use buildargv here so that we handle spaces in the regexp
Doug> + in a way that allows adding more arguments later. */
Doug> + argv = gdb_buildargv (args);
Doug> + cleanups = make_cleanup_freeargv (argv);
The cleanup checker noticed that this function doesn't call do_cleanups.
Tom
* symmisc.c (maintenance_expand_symtabs): Call do_cleanups.
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index eb8bbbf..a1ae7bd 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -898,6 +898,8 @@ maintenance_expand_symtabs (char *args, int from_tty)
maintenance_expand_name_matcher, ALL_DOMAIN, regexp);
}
}
+
+ do_cleanups (cleanups);
}