From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6719 invoked by alias); 29 Apr 2009 22:08:25 -0000 Received: (qmail 6704 invoked by uid 22791); 29 Apr 2009 22:08:24 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Apr 2009 22:08:18 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n3TM8GXP029510 for ; Wed, 29 Apr 2009 18:08:16 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3TM8GQw027507 for ; Wed, 29 Apr 2009 18:08:16 -0400 Received: from lindt.uglyboxes.com (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3TM8CCA031091; Wed, 29 Apr 2009 18:08:14 -0400 Message-ID: <49F8CFCC.80208@redhat.com> Date: Wed, 29 Apr 2009 22:08:00 -0000 From: Keith Seitz User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Gene Smith CC: insight@sources.redhat.com Subject: Re: Set argc and argv in insight References: <49F0944A.1060404@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00026.txt.bz2 Gene Smith wrote: > Clarification: This is Insight's console, not an OS console. Correct. The "Console Window" as it is called in the Window menu. > 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. All those options are valid ways to do it. I checked in patches to better sync arguments between gdb and Insight, but if you specify "set args" in your .gdbinit, it will probably be overridden by whatever may be stored in Insight's session preferences. I did not test that case, just the case of "set args" and the target preferences dialog. >> 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. Nope. If you are using an "Exec" target, i.e., debugging natively (target==host), then the one entry box is relabeled "Arguments". The "after attaching" thing is for something else entirely; it allows you to run any command after attaching to the target but before loading/running it. This was used by various embedded platforms to do necessary board initialization, particularly w.r.t. memory configuration on a certain JTAG emulator that I worked on long ago. It is not really intended for natives, but I guess it would work. If you are using a cross debugger (host != target), then you must use the "set args" method. The target preferences dialog will not allow you to enter arguments (because this is typically impossible to do with embedded systems). Keith