From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2976 invoked by alias); 29 Jun 2004 15:41:48 -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 2960 invoked from network); 29 Jun 2004 15:41:48 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org with SMTP; 29 Jun 2004 15:41:48 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id i5TFflFl030369 for ; Tue, 29 Jun 2004 11:41:47 -0400 Received: from M30.equallogic.com (m30 [172.16.1.30]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id i5TFflsw030364 for ; Tue, 29 Jun 2004 11:41:47 -0400 Received: from pkoning.equallogic.com ([172.16.1.220]) by M30.equallogic.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 29 Jun 2004 11:41:47 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16609.36282.383014.108683@gargle.gargle.HOWL> Date: Tue, 29 Jun 2004 17:39:00 -0000 From: Paul Koning To: gdb@sources.redhat.com Subject: Getting gdb to find definitions X-OriginalArrivalTime: 29 Jun 2004 15:41:47.0512 (UTC) FILETIME=[96670F80:01C45DEF] X-SW-Source: 2004-06/txt/msg00291.txt.bz2 There's a problem I'm seeing increasingly often with GDB 6.1 -- especially now that our compilers are switching to Dwarf-2 format. It seems that gdb doesn't load definitions of types until you reference some variable that causes it to load the symbols for a particular source file -- or something like that. For example, I might do this: (gdb) file netbsd.gdb Reading symbols from netbsd.gdb...done. (gdb) ptype struct user No struct type named user. (gdb) p curproc $1 = (struct proc *) 0x8282e9e0 (gdb) ptype struct user type = struct user { struct pcb u_pcb; struct pstats u_stats; } This is causing a lot of confusion among users, and it breaks various scripts. I would argue that gdb should read the definitions of types when they are mentioned (as it does with the definitions of variables). Either that, or it shouldn't default to delayed loading, if it causes malfunctions like this. Is there a fix for this? Alternatively, is there a way to at least change the default symbol loading rule? paul