From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 850 invoked by alias); 16 Dec 2004 00:59:03 -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 614 invoked from network); 16 Dec 2004 00:58:51 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.200) by sourceware.org with SMTP; 16 Dec 2004 00:58:51 -0000 Received: by rproxy.gmail.com with SMTP id b11so1214084rne for ; Wed, 15 Dec 2004 16:58:50 -0800 (PST) Received: by 10.38.77.49 with SMTP id z49mr858241rna; Wed, 15 Dec 2004 16:58:50 -0800 (PST) Received: by 10.38.22.12 with HTTP; Wed, 15 Dec 2004 16:58:50 -0800 (PST) Message-ID: Date: Thu, 16 Dec 2004 00:59:00 -0000 From: zhu yong Reply-To: zhu yong To: gdb Subject: how to set commandline args in gdb remote debug? In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-SW-Source: 2004-12/txt/msg00092.txt.bz2 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. best regards yong zhu