From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7836 invoked by alias); 17 Jul 2007 03:46:24 -0000 Received: (qmail 7827 invoked by uid 22791); 17 Jul 2007 03:46:23 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.243) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Jul 2007 03:46:21 +0000 Received: by an-out-0708.google.com with SMTP id c23so303129anc for ; Mon, 16 Jul 2007 20:46:19 -0700 (PDT) Received: by 10.100.10.20 with SMTP id 20mr14598anj.1184643979182; Mon, 16 Jul 2007 20:46:19 -0700 (PDT) Received: by 10.100.8.8 with HTTP; Mon, 16 Jul 2007 20:46:19 -0700 (PDT) Message-ID: <64dc1fc50707162046g14063577l37bac2fa8b47fc2d@mail.gmail.com> Date: Tue, 17 Jul 2007 10:54:00 -0000 From: "Mandar Mitra" Reply-To: mandar.mitra@gmail.com To: gdb@sourceware.org Subject: "path" does not seem to work correctly MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 515d174b3c91a017 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-07/txt/msg00133.txt.bz2 Hello, I have two versions of a program (called smart): - one compiled with -g and located in .../src/bin - the other compiled with -O2 (without -g) and located in .../diropt/bin The diropt/bin directory comes first on my $PATH, but in my ~/.gdbinit file, I've re-defined "path" so that the debuggable program comes first: (gdb) path Executable and object file path: .../src/bin:/bin:...:diropt/bin:. But when I run "gdb smart", or "file smart" inside gdb, it still picks up the optimized executable from diropt/bin. (gdb) file smart Reading symbols from .../diropt/bin/smart...done. Can someone give me some hint about what I'm doing wrong? Thanks, Mandar.