Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* how to set commandline args in gdb remote debug?
       [not found] ` <f64f4e8a0412150125647a21ec@mail.gmail.com>
@ 2004-12-16  0:59   ` zhu yong
  2004-12-16 13:38     ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: zhu yong @ 2004-12-16  0:59 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to set commandline args in gdb remote debug?
  2004-12-16  0:59   ` how to set commandline args in gdb remote debug? zhu yong
@ 2004-12-16 13:38     ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2004-12-16 13:38 UTC (permalink / raw)
  To: zhu yong; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-16 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <f64f4e8a0412150120570c0a40@mail.gmail.com>
     [not found] ` <f64f4e8a0412150125647a21ec@mail.gmail.com>
2004-12-16  0:59   ` how to set commandline args in gdb remote debug? zhu yong
2004-12-16 13:38     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox