From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13703 invoked by alias); 4 Jul 2010 18:18:10 -0000 Received: (qmail 13685 invoked by uid 22791); 4 Jul 2010 18:18:08 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 04 Jul 2010 18:18:03 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o64II2p0031578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 4 Jul 2010 14:18:02 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o64IHxgj020422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Jul 2010 14:18:01 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o64IHxSa031130; Sun, 4 Jul 2010 20:17:59 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o64IHwwj031129; Sun, 4 Jul 2010 20:17:58 +0200 Date: Sun, 04 Jul 2010 18:18:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [3/4] RFC: add DWARF index support Message-ID: <20100704181758.GA30603@host0.dyn.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00072.txt.bz2 Hi Tom, OpenOffice.org Fedora-13-x86_64 `thread apply all bt full' did for me: system =0m9.079s HEAD =0m7.671s noindex=0m7.864s index =0m1.811s (44MB of indexes) Nice. :-) On Thu, 01 Jul 2010 00:45:55 +0200, Tom Tromey wrote: > +/* All offsets in the index are of this type. It must be > + architecture-independent. */ > +typedef uint32_t offset_type; It should be 64bit, Fedora already has to carry 64bit obstack patch for >2GB .debug files. I have seen only an artificial reproducer for >2GB .debug, no real world case, though. http://sourceware.org/ml/libc-alpha/2007-01/msg00090.html > + if (stat (objfile->name, &obstat) < 0) dwarf2read.c:1764: error: implicit declaration of function ‘stat’ dwarf2read.c:1771: error: implicit declaration of function ‘fstat’ -> #include > +static void > +create_addrmap_from_index (struct objfile *objfile, struct mapped_index *index) > + addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr, > + dwarf2_per_objfile->all_comp_units[cu_index]); addrmap_set_empty has parameter end_inclusive, "hi" is end-exclusive. > + filename = concat (dir, "/", lbasename (objfile->name), INDEX_SUFFIX, NULL); Here is some cross-platform path issue. Also there should be `(char *) NULL'. > + 1. The file header. This is a sequence of values, of offset_type > + unless otherwise noted: I would prefer there some simple magic (for file(1)). > + [0] The version number. Currently 1. > + [1] The mtime of the objfile, as a 64-bit little-endian value. Do you have some specific needs for storing timestamp into the file? When such index files will be packaged by distros it may create needless differences across various verifications. Isn't make(1)-like timestamp dependency enough? > + TRY_CATCH (except, RETURN_MASK_ALL) Only RETURN_MASK_ERROR probably. Thanks, Jan