delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/11/06/11:26:13

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <keiths AT cygnus DOT com>
To: Ignasi Villagrasa <gri AT netcom DOT es>
cc: Cygwin <cygwin AT cygwin DOT com>
Subject: Re: gdb questions
In-Reply-To: <3BE7A34C.2000608@netcom.es>
Message-ID: <Pine.GSO.4.33.0111060728560.16541-100000@makita.cygnus.com>
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019