From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29957 invoked by alias); 17 Jan 2006 05:54:48 -0000 Received: (qmail 29949 invoked by uid 22791); 17 Jan 2006 05:54:48 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.199) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Jan 2006 05:54:41 +0000 Received: by zproxy.gmail.com with SMTP id 34so1209971nzf for ; Mon, 16 Jan 2006 21:54:39 -0800 (PST) Received: by 10.36.66.3 with SMTP id o3mr5671241nza; Mon, 16 Jan 2006 21:54:39 -0800 (PST) Received: by 10.37.2.42 with HTTP; Mon, 16 Jan 2006 21:54:39 -0800 (PST) Message-ID: <8f2776cb0601162154k6b509013ndaccf217f3b36e39@mail.gmail.com> Date: Tue, 17 Jan 2006 06:00:00 -0000 From: Jim Blandy To: Russell Shaw Subject: Re: dlopen() Cc: gdb@sources.redhat.com In-Reply-To: <43CC73CE.2030709@netspace.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43CC73CE.2030709@netspace.net.au> 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/msg00156.txt.bz2 On 1/16/06, Russell Shaw wrote: > Hi, > > I do: > > void *handle =3D dlopen("libfile1.so", RTLD_NOW); > ... > newfunc =3D dlsym(handle, "afunc"); > ... > int res =3D (*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.=20 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.