From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28656 invoked by alias); 23 Jul 2011 01:44:10 -0000 Received: (qmail 28647 invoked by uid 22791); 23 Jul 2011 01:44:09 -0000 X-SWARE-Spam-Status: No, hits=-7.5 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; Sat, 23 Jul 2011 01:43:51 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6N1hofU016930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Jul 2011 21:43:51 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6N1hoNB017587; Fri, 22 Jul 2011 21:43:50 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6N1hm6G020328; Fri, 22 Jul 2011 21:43:48 -0400 From: Tom Tromey To: Gabriel Charette Cc: Diego Novillo , Lawrence Crowl , gcc@gcc.gnu.org, Collin Winter Subject: Re: Linemap and pph References: Date: Sat, 23 Jul 2011 05:46:00 -0000 In-Reply-To: (Gabriel Charette's message of "Fri, 22 Jul 2011 14:15:28 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00436.txt.bz2 Gabriel> We are tying to keep pph as "pluginable" as possible (Diego correct me Gabriel> if I'm wrong), so changing the actual implementation of the linemap Gabriel> would be our very last resort I think. Gabriel> However since source_location aren't pointers per se, this wouldn't Gabriel> work (at least with our current cache implementation, and changing Gabriel> that is also last resort in my opinion) I think something's got to give :) Tom> Can you not just serialize the line map when creating the PPH? Gabriel> We were wondering about that, the problem we thought is that a pph can Gabriel> be loaded from anywhere in many different C files (which would Gabriel> generate a different linemap entry in each case I think?). If there Gabriel> was a way to serialize the linemap entries from the LC_ENTER entry for Gabriel> the header file to the LC_LEAVE (i.e. ignoring builtins, command line, Gabriel> etc.), and then directly insert those entries in a given C file Gabriel> compilation's linemaps entries, that would be great! Sure, I think you could probably serialize just some subset of the linemap. It is hard to be positive, as nobody has ever tried it, and I don't know enough about your needs to suggest what subsetting might make sense. The question then is whether you are certain that the other objects you write out are guaranteed not to reference locations outside this set. Tom