This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdb questions


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]