From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5770 invoked by alias); 8 Feb 2011 13:39:55 -0000 Received: (qmail 5761 invoked by uid 22791); 8 Feb 2011 13:39:54 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_HR X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Feb 2011 13:39:48 +0000 Received: by gxk5 with SMTP id 5so2583305gxk.0 for ; Tue, 08 Feb 2011 05:39:46 -0800 (PST) Received: by 10.150.158.11 with SMTP id g11mr2963020ybe.238.1297172386261; Tue, 08 Feb 2011 05:39:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.34.12 with HTTP; Tue, 8 Feb 2011 05:39:26 -0800 (PST) In-Reply-To: <20110131110412.GA13702@host1.dyn.jankratochvil.net> References: <20110128095213.GA18993@host1.dyn.jankratochvil.net> <20110131110412.GA13702@host1.dyn.jankratochvil.net> From: Hui Zhu Date: Tue, 08 Feb 2011 13:39:00 -0000 Message-ID: Subject: Re: [PATCH/RFC] Move the cmdarg before load execarg To: Jan Kratochvil Cc: Tom Tromey , gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00177.txt.bz2 On Mon, Jan 31, 2011 at 19:04, Jan Kratochvil w= rote: > On Sun, 30 Jan 2011 01:31:46 +0100, Hui Zhu wrote: >> Do you think we can add some other options to let gdb exec some >> command before load the file? >> Cause my gdb support multi-arch, but need "set gnutarget" everytime >> when I use it. =A0So I want add a alias in my bashrc like alias >> arm-gdb=3D'gdb -ex "set gnutarget"' or a shell to make it works better. > > ~/.gdbinit is read before anything else. > > first: mv ~/.gdbinit ~/.gdbinit2 > > alias arm-gdb=3D'echo -e "set gnutarget elf32-littlearm\nsource ~/.gdbini= t2" >~/.gdbinit; /usr/bin/gdb' > alias gdb=3D'echo -e "source ~/.gdbinit2" >~/.gdbinit; /usr/bin/gdb' > > > Regards, > Jan > Thanks Jan. This way is cool. Hui