From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9284 invoked by alias); 24 Aug 2007 16:38:50 -0000 Received: (qmail 9249 invoked by uid 22791); 24 Aug 2007 16:38:50 -0000 X-Spam-Check-By: sourceware.org Received: from mail.baymicrosystems.com (HELO mail.baymicrosystems.com) (65.174.40.133) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 24 Aug 2007 16:38:42 +0000 Received: from [192.168.1.179] (ssl-linux.baymicrosystems.com [192.168.1.179]) (authenticated bits=0) by mail.baymicrosystems.com (8.13.5/8.13.5) with ESMTP id l7OGbSRL007587; Fri, 24 Aug 2007 09:37:28 -0700 Message-ID: <46CF0945.8090901@baymicrosystems.com> Date: Fri, 24 Aug 2007 16:38:00 -0000 From: Sheng-Liang Song User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Jan Kratochvil , rockwellkc , gdb@sourceware.org Subject: Re: reference environment variables from gdb scripts References: <12302351.post@talk.nabble.com> <20070824085740.GA11291@host0.dyn.jankratochvil.net> In-Reply-To: <20070824085740.GA11291@host0.dyn.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-08/txt/msg00193.txt.bz2 Hi, I use .cshrc to update the current pointer whenever I login to a 32 or 64 bit machine. If so, I can keep .gdbinit as it is. BTW, Is there a gdb script functional document? Is there a gdb script test vector (or a complete feature checklist) for each gdb release? Thanks, Sheng-Liang .gdbinit source ~/.gdb/current/gdb_stl_utils (ref: http://www.stanford.edu/~afn/gdb_stl_utils/ I try follow the above examples to make some changes for my machine. I feel it is a little bit hard to debug the scripts. If you have more gdb script examples, could you email me? Thanks!) .cshrc if ( -f ~/.gdb/current ) then rm ~/.gdb/current endif ln -s ~/.gdb/`uname -m` ~/.gdb/current /home/ssl/.gdb/i686 /home/ssl/.gdb/x86_64 /home/ssl/.gdb/current -> /home/ssl/.gdb/x86_64 Jan Kratochvil wrote: > On Thu, 23 Aug 2007 23:19:44 +0200, rockwellkc wrote: > >> Is there a way to reference an environment variable from a gdbscript? >> > > Unaware. > > >> I'm hoping a gdb script command to load different script files based on the >> current environment variable. >> > > Set bash function and use the --command parameter? > > >> source $HOME/gdb.scripts >> > > $HOME -> ~ > and it should work. > > > Regards, > Jan >