From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25351 invoked by alias); 16 Dec 2004 13:38:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25260 invoked from network); 16 Dec 2004 13:38:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 16 Dec 2004 13:38:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CevpU-0002il-41; Thu, 16 Dec 2004 08:38:04 -0500 Date: Thu, 16 Dec 2004 13:38:00 -0000 From: Daniel Jacobowitz To: zhu yong Cc: gdb Subject: Re: how to set commandline args in gdb remote debug? Message-ID: <20041216133803.GA10405@nevyn.them.org> Mail-Followup-To: zhu yong , gdb References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00094.txt.bz2 On Thu, Dec 16, 2004 at 08:58:50AM +0800, zhu yong wrote: > hello.list > I want to debug my application (hciattach) in gdb remote debug. > host use arm-elf-gdb and target use gdbserver. > normally, my application need commandline args as follows: > hciattach /dev/ttyS0 bcsp 115200 > > So I invoke gdb like this: > arm-elf-gdb --args hciattach.gdb /dev/ttyS0 bcsp 115200 > hciattach.gdb include debug info. > during debug, I print argc's value: > *args=-1. > is it error? > I also try > "arm-elf-gdb hciattach.gdb" > "target remote 10.0.0.1:2453" > "set args hciattach /dev/ttyS0 bcsp 115200" > "b main" > "continue" > but *argc still equal "-1". > > how can i set commandline args in gdb remote debug? any advice will help me. Put them on gdbserver's command line instead. BTW, if you are using gdbserver, arm-elf is probably incorrect. gdbserver only supports arm-linux. -- Daniel Jacobowitz