From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10235 invoked by alias); 15 Sep 2009 19:30:07 -0000 Received: (qmail 10208 invoked by uid 22791); 15 Sep 2009 19:30:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Sep 2009 19:30:00 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id n8FJTx9O012424 for ; Tue, 15 Sep 2009 12:29:59 -0700 Received: from ywh2 (ywh2.prod.google.com [10.192.8.2]) by wpaz13.hot.corp.google.com with ESMTP id n8FJTu22018250 for ; Tue, 15 Sep 2009 12:29:56 -0700 Received: by ywh2 with SMTP id 2so6057610ywh.27 for ; Tue, 15 Sep 2009 12:29:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.59.4 with SMTP id h4mr13033609yba.299.1253042996527; Tue, 15 Sep 2009 12:29:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 15 Sep 2009 19:30:00 -0000 Message-ID: Subject: Re: how to pass environment variables to inferior when debugging with gdbserver From: Doug Evans To: "Amker.Cheng" Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2009-09/txt/msg00208.txt.bz2 On Fri, Sep 4, 2009 at 12:34 AM, Amker.Cheng wrote: > Hi All: > =A0 I want to debug a problem with dynamic linker when setting LD_AUDIT > variable, apparently this can only be set to inferior, > or gdbserver itself would break. > The problem is how to pass this variables to inferior by gdbserver > command line? I searched the doc but > didn't found a solution. Maybe I've missed something important, please > help and correct me if I am wrong. > Thanks. > -- > Best Regards. > With cvs head gdb (and in 7.0 when it is released) there is a new --wrapper argument to gdbserver. E.g. $ gdbserver --wrapper env LD_AUDIT=3Dmumble -- :2222 ./testprog