From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1789 invoked by alias); 30 Jan 2003 21:31:30 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1781 invoked from network); 30 Jan 2003 21:31:30 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 30 Jan 2003 21:31:30 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D963D407C; Thu, 30 Jan 2003 16:31:27 -0500 (EST) Message-ID: <3E3999AF.90203@redhat.com> Date: Thu, 30 Jan 2003 21:31:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: Dan Mosedale , "Martin M. Hunt" , gdb@sources.redhat.com Subject: Re: linux, threads and auto-solib-add References: <1043886256.1217.64.camel@Dragon> <1030130005010.ZM22518@localhost.localdomain> <3E38FB11.4020401@mozilla.org> <1030130181325.ZM25461@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00525.txt.bz2 > I used the word "needless" above because I think there's a perfectly > reasonable way that the user can achieve the same effect without > modifying gdb. Simply place the following commands in a suitable > .gdbinit file: > > set auto-solib-add off > define hook-stop > sharedlibrary libpthread > end > > The ``hook-stop'' definition above will attempt to load the libpthread > shared library every time gdb stops. Of course, once a shared library > has been loaded, future attempts to load the shared library are > effectively no-ops since gdb knows that the library is already loaded. Hey, wow! Consider adding this to the documentation. Andrew