From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19276 invoked by alias); 12 Feb 2003 17:33:24 -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 19267 invoked from network); 12 Feb 2003 17:33:23 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 12 Feb 2003 17:33:23 -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 h1CHXNf02876 for ; Wed, 12 Feb 2003 12:33:23 -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 h1CHXNa10637; Wed, 12 Feb 2003 12:33:23 -0500 Received: from [150.1.200.14] (vpn50-7.rdu.redhat.com [172.16.50.7]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1CHXMs08245; Wed, 12 Feb 2003 12:33:22 -0500 Subject: Re: [RFA] Make interpreter_p an argument for gdb_main From: Keith Seitz To: Andrew Cagney Cc: "gdb-patches@sources.redhat.com" In-Reply-To: <3E4A7A20.30403@redhat.com> References: <1045011304.1493.43.camel@lindt.uglyboxes.com> <3E4A7A20.30403@redhat.com> Content-Type: multipart/mixed; boundary="=-47P1WawuD8ekTRqLsSpw" Organization: Message-Id: <1045071488.1787.35.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Date: Wed, 12 Feb 2003 17:33:00 -0000 X-SW-Source: 2003-02/txt/msg00287.txt.bz2 --=-47P1WawuD8ekTRqLsSpw Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 745 On Wed, 2003-02-12 at 08:45, Andrew Cagney wrote: > ``interpreter_p'' is -><- close to being made local to captured_main. Ahh. Ok, that gives me a new criteria for considering where to put such changes. > Otherwize ok, New patch attachd. Note that I've corrected the top.o/gdb.o mishap in the makefile. Keith PS. Anyone want to talk about deprecating "-nw" and "-w" (or aliasing them to doing the same as "-i=console" and ???)? ChangeLog 2003-02-12 Keith R Seitz * main.h (struct captured_main_args): Add interpreter_p. * main.c (captured_main): Initialize interpreter_p from context. * gdb.c (main): Set interpreter_p argument. * Makefile.in (gdb.o): Add dependency for interps.h. --=-47P1WawuD8ekTRqLsSpw Content-Disposition: inline; filename=p Content-Type: text/x-patch; name=p; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 2693 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 17:13:17 -0000 @@ -1682,7 +1682,7 @@ frv-tdep.o: frv-tdep.c $(defs_h) $(infer $(arch_utils_h) $(regcache_h) gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \ $(elf_bfd_h) $(symfile_h) $(objfiles_h) -gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ $(gdb_string_h) $(symtab_h) $(frame_h) $(inferior_h) $(breakpoint_h) \ 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 17:13:17 -0000 @@ -229,10 +229,10 @@ captured_main (void *data) #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); + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); /* Parse arguments and options. */ { 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 17:13:17 -0000 @@ -27,6 +27,7 @@ struct captured_main_args int argc; char **argv; int use_windows; + const char *interpreter_p; }; extern int gdb_main (struct captured_main_args *); 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 17:13:17 -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); } --=-47P1WawuD8ekTRqLsSpw--