From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24665 invoked by alias); 12 Feb 2003 00:50:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24658 invoked from network); 12 Feb 2003 00:50:21 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 12 Feb 2003 00:50:21 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1C0oLf30399 for ; Tue, 11 Feb 2003 19:50:21 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1C0oLa15362 for ; Tue, 11 Feb 2003 19:50:21 -0500 Received: from [150.1.200.14] (vpn50-20.rdu.redhat.com [172.16.50.20]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1C0oKs16650 for ; Tue, 11 Feb 2003 19:50:20 -0500 Subject: [RFA] Make interpreter_p an argument for gdb_main From: Keith Seitz To: "gdb-patches@sources.redhat.com" Content-Type: multipart/mixed; boundary="=-1gjZmXnM1lBl76Tvp6q+" Organization: Message-Id: <1045011304.1493.43.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Date: Wed, 12 Feb 2003 00:50:00 -0000 X-SW-Source: 2003-02/txt/msg00282.txt.bz2 --=-1gjZmXnM1lBl76Tvp6q+ Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 559 Hi, The recent interpreter commit broke insight. The following patch adds interpreter_p to captured_main_args so that Insight's main function can set it. Sorry, Elena; more patches to review. :-( Keith ChangeLog 2003-02-11 Keith R Seitz * main.h (struct captured_main_args): Add interpreter_p. * main.c (captured_main): Don't initialize interpreter_p... (gdb_main): ... It's now initialized here. * gdb.c (main): Initialize interpreter_p. * Makefile.in (top.o): Add dependency for interps.h. --=-1gjZmXnM1lBl76Tvp6q+ Content-Disposition: inline; filename=captured_main_args.patch Content-Type: text/x-patch; name=captured_main_args.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 2749 Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.329 diff -u -p -r1.329 Makefile.in --- Makefile.in 11 Feb 2003 16:11:16 -0000 1.329 +++ Makefile.in 12 Feb 2003 00:45:07 -0000 @@ -2232,7 +2232,7 @@ top.o: top.c $(defs_h) $(gdbcmd_h) $(cal $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ $(gdb_assert_h) $(event_top_h) $(gdb_string_h) $(gdb_stat_h) \ - $(ui_out_h) $(cli_out_h) $(readline_h) + $(ui_out_h) $(cli_out_h) $(readline_h) $(interps_h) tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ Index: main.h =================================================================== RCS file: /cvs/src/src/gdb/main.h,v retrieving revision 1.1 diff -u -p -r1.1 main.h --- main.h 26 Sep 2002 17:46:04 -0000 1.1 +++ main.h 12 Feb 2003 00:45:07 -0000 @@ -27,6 +27,7 @@ struct captured_main_args int argc; char **argv; int use_windows; + char *interpreter_p; }; extern int gdb_main (struct captured_main_args *); Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.27 diff -u -p -r1.27 main.c --- main.c 7 Feb 2003 00:27:30 -0000 1.27 +++ main.c 12 Feb 2003 00:45:07 -0000 @@ -228,12 +228,6 @@ captured_main (void *data) #endif #endif - /* 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); - /* 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; } Index: gdb.c =================================================================== RCS file: /cvs/src/src/gdb/gdb.c,v retrieving revision 1.1 diff -u -p -r1.1 gdb.c --- gdb.c 26 Sep 2002 17:46:04 -0000 1.1 +++ gdb.c 12 Feb 2003 00:45:07 -0000 @@ -21,6 +21,7 @@ #include "defs.h" #include "main.h" #include "gdb_string.h" +#include "interps.h" int main (int argc, char **argv) @@ -30,5 +31,6 @@ main (int argc, char **argv) args.argc = argc; args.argv = argv; args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; return gdb_main (&args); } --=-1gjZmXnM1lBl76Tvp6q+--