From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17762 invoked by alias); 29 Apr 2009 21:58:18 -0000 Received: (qmail 17742 invoked by uid 22791); 29 Apr 2009 21:58:17 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Apr 2009 21:58:12 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LzHn6-0000QS-2T for insight@sources.redhat.com; Wed, 29 Apr 2009 21:58:08 +0000 Received: from 75.139.7.185 ([75.139.7.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Apr 2009 21:58:08 +0000 Received: from gds by 75.139.7.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Apr 2009 21:58:08 +0000 To: insight@sources.redhat.com From: Gene Smith Subject: Re: Set argc and argv in insight Date: Wed, 29 Apr 2009 21:58:00 -0000 Message-ID: References: <49F0944A.1060404@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <49F0944A.1060404@redhat.com> X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00025.txt.bz2 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 >