From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48926 invoked by alias); 16 Mar 2015 10:48:46 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 48913 invoked by uid 89); 16 Mar 2015 10:48:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: icp-osb-irony-out9.external.iinet.net.au Received: from icp-osb-irony-out9.external.iinet.net.au (HELO icp-osb-irony-out9.external.iinet.net.au) (203.59.1.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Mar 2015 10:48:44 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYBALq0BlXSVDON/2dsb2JhbAANToc+xGuCUgKBdgEBAQEBAYUNAQEEIxVAEQsNCwICBRYLAgIJAwIBAgFFEwgCsRFwmwEBAQgCAR+BIYl2hHgWglKBRQEEoS+NBYQlgx4BAQE Received: from unknown (HELO [192.168.0.10]) ([210.84.51.141]) by icp-osb-irony-out9.iinet.net.au with ESMTP; 16 Mar 2015 18:48:39 +0800 Message-ID: <5506B508.5040300@netspace.net.au> Date: Mon, 16 Mar 2015 10:48:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: gdbserver args References: <55067953.4050403@netspace.net.au> In-Reply-To: <55067953.4050403@netspace.net.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00050.txt.bz2 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.