Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Tue, 6 Nov 2001 07:36:37 -0800 (PST) From: Keith Seitz To: Ignasi Villagrasa cc: Cygwin Subject: Re: gdb questions In-Reply-To: <3BE7A34C.2000608@netcom.es> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 6 Nov 2001, Ignasi Villagrasa wrote: > 2) I'm trying to run gdb.exe to debug a program with several parameters. > > I've seen there is an option, set argvs, inside gdb command line to this > purpose. But in order to automatize the process I'd like to know if > there's any gdb command line option or any config file where I can add > these parameters. I haven't seen any. There are two ways to specify command line arguments for an application with gdb: 1) Use "set args" command, e.g., "set args arg1 arg2 arg3" 2) Supply them with the run command, e.g., "run arg1 arg2 arg3". This does an implicit "set args", so you won't need to re-enter the args unless you want to change them. You can put a "set args" command (or any gdb command, for that matter) into an init file. When started, gdb will read ~/.gdbinit (gdb.ini on cygwin). When you load an executable, it should also read the .gdbinit/gdb.ini in the exe's directory, but this appears broken on current gdbs (or this behavior was changed). This now only happens when gdb is started (it will read both ~/.gdbinit and ./.gdbinit). Keith -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/