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 06/13] Replace start_rbreak_breakpoints and end_rbreak_breakpoints


On 2017-11-02 18:36, Tom Tromey wrote:
 static void
 rbreak_command (char *regexp, int from_tty)
 {
-  struct cleanup *old_chain;
   char *string = NULL;
   int len = 0;
   const char **files = NULL;
@@ -4550,8 +4541,7 @@ rbreak_command (char *regexp, int from_tty)
 						       FUNCTIONS_DOMAIN,
 						       nfiles, files);

-  start_rbreak_breakpoints ();
-  old_chain = make_cleanup (do_end_rbreak_breakpoints, NULL);
+  scoped_rbreak_breakpoints finalize;
   for (const symbol_search &p : symbols)
     {
       if (p.msymbol.minsym == NULL)
@@ -4596,8 +4586,6 @@ rbreak_command (char *regexp, int from_tty)
 			   MSYMBOL_PRINT_NAME (p.msymbol.minsym));
 	}
     }
-
-  do_cleanups (old_chain);
 }
 

Your patch LGTM. But how is the "string" string freed in rbreak_command?

Simon


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