From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11556 invoked by alias); 17 Jan 2006 06:12:46 -0000 Received: (qmail 11545 invoked by uid 22791); 17 Jan 2006 06:12:46 -0000 X-Spam-Check-By: sourceware.org Received: from cumulus.netspace.net.au (HELO mail.netspace.net.au) (203.10.110.72) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Jan 2006 06:12:40 +0000 Received: from [192.168.0.10] (220-253-60-77.VIC.netspace.net.au [220.253.60.77]) by mail.netspace.net.au (Postfix) with ESMTP id 493637D380 for ; Tue, 17 Jan 2006 17:12:36 +1100 (EST) Message-ID: <43CC8AD5.2020804@netspace.net.au> Date: Tue, 17 Jan 2006 21:28:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050914 Debian/1.7.11-1 MIME-Version: 1.0 Cc: gdb@sources.redhat.com Subject: Re: dlopen() References: <43CC73CE.2030709@netspace.net.au> <8f2776cb0601162154k6b509013ndaccf217f3b36e39@mail.gmail.com> In-Reply-To: <8f2776cb0601162154k6b509013ndaccf217f3b36e39@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00158.txt.bz2 Jim Blandy wrote: > On 1/16/06, Russell Shaw wrote: > >>Hi, >> >>I do: >> >> void *handle = dlopen("libfile1.so", RTLD_NOW); >> ... >> newfunc = dlsym(handle, "afunc"); >> ... >> int res = (*newfunc)(app); >> >>How do i stop inside the "newfunc" function? I set a breakpoint >>there, but it doesn't activate. > > After you step over the dlopen call, GDB should have read the symbols > from libfile1.so. If you say "break afunc" at that point, what does > GDB say? > > If that doesn't work for you, you'll need to give us more details. > You need to include an actual transcript of your GDB session to start > with, not just an English description of what you did and what > happened. If we don't see any misunderstandings there, then you'll > need to provide us with a test case we can use to make the problem > happen on our own machines. It works now, for some reason. After dlopen(), "info shared" shows that the symbols are read.