From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3249 invoked by alias); 15 Jul 2011 16:22:59 -0000 Received: (qmail 3236 invoked by uid 22791); 15 Jul 2011 16:22:57 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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 16:22:43 +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 p6FGMhlO016650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Jul 2011 12:22:43 -0400 Received: from anchor.twiddle.net (vpn-225-131.phx2.redhat.com [10.3.225.131]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6FGMgWO002729; Fri, 15 Jul 2011 12:22:42 -0400 Message-ID: <4E206952.8000601@redhat.com> Date: Fri, 15 Jul 2011 17:19:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Jakub Jelinek CC: gcc-patches@gcc.gnu.org, Jason Merrill , Tom Tromey , Jan Kratochvil , Cary Coutant , Mark Wielaard Subject: Re: [RFC] More compact (100x) -g3 .debug_macinfo (take 2) References: <20110713170053.GX2687@tyan-ft48-01.lab.bos.redhat.com> <20110715154223.GM2687@tyan-ft48-01.lab.bos.redhat.com> In-Reply-To: <20110715154223.GM2687@tyan-ft48-01.lab.bos.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg01262.txt.bz2 On 07/15/2011 08:42 AM, Jakub Jelinek wrote: > The newly added opcodes: > DW_MACINFO_GNU_define_indirect 0xe0 > This opcode has two arguments, one is uleb128 lineno and the > other is offset size long byte offset into .debug_str. Except > for the encoding of the string it is similar to DW_MACINFO_define. > DW_MACINFO_GNU_undef_indirect 0xe1 > This opcode has two arguments, one is uleb128 lineno and the > other is offset size long byte offset into .debug_str. Except > for the encoding of the string it is similar to DW_MACINFO_undef. > DW_MACINFO_GNU_transparent_include 0xe2 > This opcode has a single argument, a offset size long byte offset into > .debug_macinfo. It instructs the debug info consumer that > this opcode during reading should be replaced with the sequence > of .debug_macinfo opcodes from the mentioned offset, up to > a terminating 0 opcode (not including that 0). > DW_MACINFO_GNU_define_opcode 0xe3 > This is an opcode for future extensibility through which > a debugger could skip unknown opcodes. It has 3 arguments: > 1 byte opcode number, uleb128 count of arguments and > a count bytes long array, with a DW_FORM_* code how the > argument is encoded. I do like the new opcodes. Elsewhere you described transparent_include as also saving state about defined opcodes around the include. Do you want to either describe that or drop it? > + case DW_MACINFO_define: > + case DW_MACINFO_undef: > +#ifdef OBJECT_FORMAT_ELF > + if (!dwarf_strict > + && HAVE_COMDAT_GROUP > + && VEC_length (macinfo_entry, files) != 1 > + && i > 0 > + && i + 1 < length > + && VEC_index (macinfo_entry, macinfo_table, i - 1)->code == 0) > + { > + char linebuf[sizeof (HOST_WIDE_INT) * 3 + 1]; > + unsigned char checksum[16]; > + struct md5_ctx ctx; I'd like to see this broken out into some functions, and avoid as much code as possible within ifdefs. Perhaps some_function (...) { #ifndef OBJECT_FORMAT_ELF return; #endif // everything else } I think it also doesn't help review that there are no comments at all, and a preponderance of description-less variable names like "ref" and "ref2". r~