This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
how to set commandline args in gdb remote debug?
- From: zhu yong <zhuyong0003 at gmail dot com>
- To: gdb <gdb at sources dot redhat dot com>
- Date: Thu, 16 Dec 2004 08:58:50 +0800
- Subject: how to set commandline args in gdb remote debug?
- References: <f64f4e8a0412150120570c0a40@mail.gmail.com> <f64f4e8a0412150125647a21ec@mail.gmail.com>
- Reply-to: zhu yong <zhuyong0003 at gmail dot com>
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