This is the mail archive of the gdb-patches@sources.redhat.com 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] Make interpreter_p an argument for gdb_main


Since elena's overloaded I'll pick this up.

+  char *interpreter_p;
Should be const.

-  /* There will always be an interpreter.  Either the one passed into
-     this captured main (not yet implemented), or one specified by the
-     user at start up, or the console.  Make life easier by always
-     initializing the interpreter to something.  */
-  interpreter_p = xstrdup (INTERP_CONSOLE);
Can you please keep the assignment here (instead of below).

-
   /* Parse arguments and options.  */
   {
     int c;
@@ -803,6 +797,7 @@ int
 gdb_main (struct captured_main_args *args)
 {
   use_windows = args->use_windows;
+  interpreter_p = xstrdup (args->interpreter_p);
   catch_errors (captured_main, args, "", RETURN_MASK_ALL);
   return 0;
 }
``interpreter_p'' is -><- close to being made local to captured_main.

Otherwize ok,
Andrew



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