From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12197 invoked by alias); 2 Jan 2008 05:16:53 -0000 Received: (qmail 12179 invoked by uid 22791); 2 Jan 2008 05:16:52 -0000 X-Spam-Check-By: sourceware.org Received: from mail.intrepid.com (HELO mail.intrepid.com) (74.95.8.113) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Jan 2008 05:16:29 +0000 Received: from screamer.intrepid.com (screamer.intrepid.com [10.10.1.2]) by mail.intrepid.com (8.13.8/8.13.8) with ESMTP id m025GQvW009517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 1 Jan 2008 21:16:27 -0800 Received: from screamer.intrepid.com (screamer.intrepid.com [127.0.0.1]) by screamer.intrepid.com (8.13.8/8.13.8) with ESMTP id m025GQ2L025376 for ; Tue, 1 Jan 2008 21:16:26 -0800 Received: (from gary@localhost) by screamer.intrepid.com (8.13.8/8.13.8/Submit) id m025GQ1n025375 for gdb@sources.redhat.com; Tue, 1 Jan 2008 21:16:26 -0800 Date: Wed, 02 Jan 2008 05:16:00 -0000 From: Gary Funck To: GDB List Subject: Re: how to search for a global type? Message-ID: <20080102051626.GB1259@intrepid.com> References: <20071231042844.GA18814@intrepid.com> <20080102031750.GA27872@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080102031750.GA27872@caradoc.them.org> User-Agent: Mutt/1.4.2.1i 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-01/txt/msg00001.txt.bz2 On 01/01/08 22:17:50, Daniel Jacobowitz wrote: > On Sun, Dec 30, 2007 at 08:28:44PM -0800, Gary Funck wrote: > > Are types global, or do they usually end up in the file's static > block? I'd guess the latter. Check maint print symbols. Not sure (excerpt from maint print symbols follows). The typedef is defined in the runtime, not in the main source file. Thus, if I run up until "main" and try "maint print symbols", I don't see the typedef at all. If I position to one of the runtime source files, then the typedef appears in the maint print symbols output as below: Symtab for file /upc/gcc-upc-4/src/libupc/smp/upc_access.c Read from object file /upc/gdb-upc/wrk/a.out (0x954630) Language: c++ [...] block #000, object at 0xb40a30, 9 syms/buckets in 0x4015d8..0x4022bf, compiled with gcc2 float __getsf2(upc_shared_ptr_t); block object 0xb363c0, 0x4017ff..0x401836 void __putblk3(upc_shared_ptr_t, void *, size_t); block object 0xb3b0a0, 0x401b40..0x401b75 [...] int THREADS; unresolved long unsigned int __upc_page1_ref; unresolved void *__upc_page1_base; unresolved block #001, object at 0xb40990 under 0xb40a30, 6 syms/buckets in 0x4015d8..0x4022bf, compiled with gcc2 typedef long unsigned int size_t; typedef signed char signed char; typedef long int long int; [...] typedef short unsigned int short unsigned int; typedef struct shared_ptr_struct { long unsigned int phase : 48; short unsigned int thread : 16; void *vaddr; } upc_shared_ptr_t; ^^^^^^^^^^^^^^^^^ typedef we're looking for The typedef appears to be in inner block. Does that make it static?