This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs


>>>>> "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);
 }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]