Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: zhu yong <zhuyong0003@gmail.com>
Cc: gdb <gdb@sources.redhat.com>
Subject: Re: how to set commandline args in gdb remote debug?
Date: Thu, 16 Dec 2004 13:38:00 -0000	[thread overview]
Message-ID: <20041216133803.GA10405@nevyn.them.org> (raw)
In-Reply-To: <f64f4e8a041215165847b96456@mail.gmail.com>

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


      reply	other threads:[~2004-12-16 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f64f4e8a0412150120570c0a40@mail.gmail.com>
     [not found] ` <f64f4e8a0412150125647a21ec@mail.gmail.com>
2004-12-16  0:59   ` zhu yong
2004-12-16 13:38     ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041216133803.GA10405@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=zhuyong0003@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox