From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27410 invoked by alias); 2 Dec 2003 16:12:53 -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 27403 invoked from network); 2 Dec 2003 16:12:52 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 2 Dec 2003 16:12:52 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id LAA10589 for ; Tue, 2 Dec 2003 11:25:40 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id LAA11481 for ; Tue, 2 Dec 2003 11:12:51 -0500 Message-ID: <024101c3b8ef$480138c0$0202040a@catdog> From: "Kris Warkentin" To: "Gdb@Sources.Redhat.Com" Subject: Interesting dwarf-2/shared lib problem. Date: Tue, 02 Dec 2003 16:12:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-12/txt/msg00017.txt.bz2 When debugging an app with a shared lib I ran across the following problem. After having proceeded to main(), all libs/syms are loaded, source search directory set appropriately, etc. Trying to use the following address form: list display.c:10 -or- break display.c:27 where display.c is in one of the loaded shared libraries, fails with "No source file named display.c" If I then do "break display", where display() is a function in display.c, the above two addressing forms work fine. I observed that libdisplay.so has been loaded with a psymtab and that the code in lookup_symtab() only searches through objects which have a full symtab loaded. This would seem to be why it's not finding display.c. I'm supposing that when you do a break on a function, the full symtab is then loaded. Note also that this goes away if the source is compiled with the stabs+ debugging format. I'm pondering the solution to this. Is there a way to force gdb to load the full symbol table for all shared objects? Or is there a better way to get around this? cheers, Kris