[RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs
Tom Tromey
tromey@redhat.com
Fri May 24 15:50:00 GMT 2013
>>>>> "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);
}
More information about the Gdb-patches
mailing list