From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20321 invoked by alias); 1 Apr 2004 21:36:10 -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 20304 invoked from network); 1 Apr 2004 21:36:08 -0000 Received: from unknown (HELO colossus.systems.pipex.net) (62.241.160.73) by sources.redhat.com with SMTP; 1 Apr 2004 21:36:08 -0000 Received: from dsl.pipex.com (81-86-67-130.dsl.pipex.com [81.86.67.130]) by colossus.systems.pipex.net (Postfix) with ESMTP id 31A231C007C1; Thu, 1 Apr 2004 22:36:07 +0100 (BST) Message-ID: <406C8B48.2070800@dsl.pipex.com> Date: Thu, 01 Apr 2004 21:36:00 -0000 From: Richard Tierney User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 MIME-Version: 1.0 To: Jim Blandy Cc: gdb@sources.redhat.com Subject: Re: How do you debug a shared library if the main app is compiled without debug? References: <406BEBF5.4090600@dsl.pipex.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00007.txt.bz2 Jim Blandy wrote: > Richard Tierney writes: > > >>I've written a shared library (ELF/.so), with debug enabled, which is >>called from a commercial package. I don't have sources for the other >>vendor's code, and it was (I think) compiled without debug info. >> >>Question: can I use gdb to debug my own code in this environment? If I >>set 'file' to the name of the vendor's executable then I get a message >>about there being no symbols. I've tried setting breakpoints in my own >>code, using a function name or a file and a line number, and then >>running the main app. I had assumed that the breakpoints would be set >>when my code is loaded, but this isn't happening - I get a warning >>about not being able to insert a breakpoint, and a memory access error. > > > You should try the current GDB sources. As of about a month ago, Jeff > Johnston got "pending breakpoint" support working, which does exactly > what you want. Below, '__overflow' is a function used internally by > the 'puts' function: Fantastic! Many thanks. Rick