From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13483 invoked by alias); 27 Feb 2008 02:22:33 -0000 Received: (qmail 13473 invoked by uid 22791); 27 Feb 2008 02:22:32 -0000 X-Spam-Check-By: sourceware.org Received: from hs-out-0708.google.com (HELO hs-out-0708.google.com) (64.233.178.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 27 Feb 2008 02:22:15 +0000 Received: by hs-out-0708.google.com with SMTP id 4so2076828hsl.8 for ; Tue, 26 Feb 2008 18:22:13 -0800 (PST) Received: by 10.100.109.13 with SMTP id h13mr11108548anc.39.1204078933106; Tue, 26 Feb 2008 18:22:13 -0800 (PST) Received: by 10.100.14.19 with HTTP; Tue, 26 Feb 2008 18:22:13 -0800 (PST) Message-ID: Date: Wed, 27 Feb 2008 02:29:00 -0000 From: "Robert Bu" To: gdb@sourceware.org Subject: How to set the path of shared library in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 2008-02/txt/msg00225.txt.bz2 Hello, How can I set the search path of the shared libraries in Linux for GDB? I tried "set solib-search-path path_to_my_shared_lib", but GDB still tries the $LD_LIBRARY_PATH first. I have two versions of the same shared library, one is in $LD_LIBRARY_PATH, the other is in path_to_my_shared_libray ( not in $LD_LIBRARY_PATH). GDB just always uses the one in $LD_LIBRARY_PATH.