* gdbserver args @ 2015-03-16 6:33 Russell Shaw 2015-03-16 10:48 ` Russell Shaw 2015-03-16 16:36 ` Mike Frysinger 0 siblings, 2 replies; 3+ messages in thread From: Russell Shaw @ 2015-03-16 6:33 UTC (permalink / raw) To: gdb Hi, On a laptop (acer) i run: gdbserver :1234 myprog arg1 arg2 On the main pc: (gdb) file myprog (gdb) target extended-remote acer:1234 (gdb) b main (gdb) r (gdb) p argc $1 = 1 Why can't i get the arguments arg1 and arg2 ? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gdbserver args 2015-03-16 6:33 gdbserver args Russell Shaw @ 2015-03-16 10:48 ` Russell Shaw 2015-03-16 16:36 ` Mike Frysinger 1 sibling, 0 replies; 3+ messages in thread From: Russell Shaw @ 2015-03-16 10:48 UTC (permalink / raw) To: gdb On 16/03/15 17:33, Russell Shaw wrote: > Hi, > On a laptop (acer) i run: > > gdbserver :1234 myprog arg1 arg2 > > > On the main pc: > > (gdb) file myprog > (gdb) target extended-remote acer:1234 > (gdb) b main > (gdb) r > (gdb) p argc > $1 = 1 > > > Why can't i get the arguments arg1 and arg2 ? I found i can pass the args in gdb on the remote host. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gdbserver args 2015-03-16 6:33 gdbserver args Russell Shaw 2015-03-16 10:48 ` Russell Shaw @ 2015-03-16 16:36 ` Mike Frysinger 1 sibling, 0 replies; 3+ messages in thread From: Mike Frysinger @ 2015-03-16 16:36 UTC (permalink / raw) To: Russell Shaw; +Cc: gdb [-- Attachment #1: Type: text/plain, Size: 355 bytes --] On 16 Mar 2015 17:33, Russell Shaw wrote: > Hi, > On a laptop (acer) i run: > > gdbserver :1234 myprog arg1 arg2 > > > On the main pc: > > (gdb) file myprog > (gdb) target extended-remote acer:1234 > (gdb) b main > (gdb) r you probably want to use continue here instead of run. if you use run, you can pass it args directly. -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-16 16:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-16 6:33 gdbserver args Russell Shaw 2015-03-16 10:48 ` Russell Shaw 2015-03-16 16:36 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).