This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Set argc and argv in insight


Keith Seitz wrote:
arkkimede wrote:
How I can pass the parameters argc and argv to a program running in
the insight debugger?

Two options:


1) Open a console window and enter the normal gdb command ("set args ...")
Clarification: This is Insight's console, not an OS console.
I think you can also enter "run arg1 arg2 .." to set the arguments (arguments are space separated). Enter just "set args" with no arguments to clear the argument list for subsequent runs. Put "set args ..." in gdbinit to have the args always set and used.



2) File->Target Settings... there is a place to enter arguments
Would that be the place that says "Command to issue after attaching:"? That doesn't sound like arguments.

I don't usually pass arguments since I mainly use insight and gdb for embedded work. But occasionally I do and always forget how.


If you usually use the console window to run your executable (like I do), use #1. If you're a button pusher, use #2. There was always a disconnect between these two methods.


I'll put this annoyance on my list of things to do before the next release.

Keith



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