From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28077 invoked by alias); 29 Feb 2008 11:13:33 -0000 Received: (qmail 28067 invoked by uid 22791); 29 Feb 2008 11:13:33 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.249) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Feb 2008 11:13:15 +0000 Received: by an-out-0708.google.com with SMTP id c23so1219340anc.42 for ; Fri, 29 Feb 2008 03:13:14 -0800 (PST) Received: by 10.100.123.4 with SMTP id v4mr18935460anc.85.1204283593808; Fri, 29 Feb 2008 03:13:13 -0800 (PST) Received: by 10.100.207.14 with HTTP; Fri, 29 Feb 2008 03:13:13 -0800 (PST) Message-ID: <64077c280802290313j71685717q225403479ed99c63@mail.gmail.com> Date: Fri, 29 Feb 2008 13:40:00 -0000 From: "luca regini" To: gdb@sourceware.org Subject: Re: Beginner question regarding gdb symbol files Cc: "Daniel Jacobowitz" In-Reply-To: <1204227347.19253.456.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <64077c280802210543r163ce60aje62c2d6fc4632554@mail.gmail.com> <20080221134725.GA6642@caradoc.them.org> <64077c280802280757n76d94f5ckd839cca266437296@mail.gmail.com> <20080228161244.GA31641@caradoc.them.org> <64077c280802280852j67689f54g6e6fefc8f6ba1ba4@mail.gmail.com> <20080228165941.GA1954@caradoc.them.org> <1204227347.19253.456.camel@localhost.localdomain> 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: 2008-02/txt/msg00256.txt.bz2 The server is an openldap server. The binary comes directly from the fedora package for it. My plugin is a custom openldap backend that is loaded into the server using a libtool facility: lt_dlopenext. This is the output that i get when i try run gdb slapd immediatly: gdb slapd (gdb) start Breakpoint 1 at 0x14bc7: file ../../../servers/slapd/main.c, line 304. Starting program: /opt/six/sbin/slapd Warning: Cannot insert breakpoint 1. Error accessing memory address 0x14bc7: Input/output error. This is what i got when i try to attach to the process: (gdb) attach 29764 Attaching to process 29764 Reading symbols from /opt/six/sbin/slapd...Reading symbols from /opt/six/sbin/slapd.dbg...done. Using host libthread_db library "/lib/tls/libthread_db.so.1". done. 0x00116c68 in hex () (gdb) . If i compile openldap directly from the sources i don't have any problem. These problems show up when i use the fedora openldap rpm also with the debug-info package is installed. Thanks in advance. Luca On Thu, Feb 28, 2008 at 8:35 PM, Michael Snyder wrote: > > On Thu, 2008-02-28 at 11:59 -0500, Daniel Jacobowitz wrote: > > On Thu, Feb 28, 2008 at 05:52:42PM +0100, luca regini wrote: > > > > > > > > --add-gnu-debuglink is not related to this situation. GDB should > > > > automatically load symbols for your plugin when the application loads > > > > it. What doesn't work? > > > > > > > > > > The plug-in is loaded dynamically by the server application so it runs > > > in the server application address space. When i try to attach to the > > > server application gdb displays a message about a successeful load of > > > the symbols but then complains about missing source files, then i am > > > not able to set a breakpoint in the source of the plug-in. > > > > Sorry, this is not enough information. We need the exact output from > > GDB to help you. > > Yes, please attach a log of your gdb session. > Thanks. > > You say you're using attach? > What happens if you launch the server under gdb? > What happens if you attach to the server before it dlopens the plugin? > (I assume you're using dlopen...) > > >