From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3026 invoked by alias); 15 Jul 2011 18:27:31 -0000 Received: (qmail 3015 invoked by uid 22791); 15 Jul 2011 18:27:30 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_TM 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; Fri, 15 Jul 2011 18:27:10 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6FIRAlq001580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Jul 2011 14:27:10 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6FIR9DF009951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jul 2011 14:27:09 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p6FIR84F004559; Fri, 15 Jul 2011 20:27:08 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p6FIR7Yr003860; Fri, 15 Jul 2011 20:27:07 +0200 Date: Fri, 15 Jul 2011 19:21:00 -0000 From: Jakub Jelinek To: Tom Tromey Cc: gcc-patches@gcc.gnu.org, Jason Merrill , Richard Henderson , Jan Kratochvil , Roland McGrath , Cary Coutant , Mark Wielaard Subject: Re: [RFC] More compact (100x) -g3 .debug_macinfo (take 2) Message-ID: <20110715182707.GN2687@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20110713170053.GX2687@tyan-ft48-01.lab.bos.redhat.com> <20110715154223.GM2687@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg01275.txt.bz2 On Fri, Jul 15, 2011 at 12:15:48PM -0600, Tom Tromey wrote: > >>>>> "Jakub" == Jakub Jelinek writes: > > Jakub> The patch below implements that slight change, in particular the > Jakub> "4" suffixes from the op names were dropped, > Jakub> DW_MACINFO_GNU_*_indirect have DW_FORM_udata and DW_FORM_strp > Jakub> arguments now (i.e. DWARF_OFFSET_SIZE large) and > Jakub> DW_MACINFO_GNU_transparent_include has DW_FORM_sec_offset > Jakub> argument (i.e. again 4 bytes long for 32-bit DWARF and 8 bytes > Jakub> long for 64-bit DWARF). GCC assures that no merging will happen > Jakub> between .debug_macinfo chunks with 32-bit and 64-bit DWARF by > Jakub> adding the byte size in the comdat GROUP name. I think that's > Jakub> cleaner than hardcoding 4 bytes and not optimizing anything on > Jakub> MIPS. > > The .debug_macinfo section doesn't have any header describing its > contents. How would a consumer know which offset size to use? The same way as it knows how to interpret the second operands of DW_MACINFO_start_file. They aren't meaningful without knowing what .debug_line section they refer to. For .debug_line, you need to remember DW_AT_stmt_list of the CU that refers to the .debug_macinfo section through DW_AT_macro_info, and you'd remember whether the referencing CU is 32-bit DWARF or 64-bit DWARF. And the producer would need to arange that DW_MACINFO_GNU_transparent_include referenced chunks have the same properties (i.e. same offset size, and, if they use DW_MACINFO_start_file, also the same .debug_line). Jakub