This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Make interpreter_p an argument for gdb_main
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>,Elena Zannoni <ezannoni at redhat dot com>
- Cc: "gdb-patches at sources dot redhat dot com" <gdb-patches at sources dot redhat dot com>
- Date: Wed, 12 Feb 2003 17:45:20 +0100
- Subject: Re: [RFA] Make interpreter_p an argument for gdb_main
- References: <1045011304.1493.43.camel@lindt.uglyboxes.com>
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