From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5391 invoked by alias); 18 Mar 2002 19:45:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5257 invoked from network); 18 Mar 2002 19:45:04 -0000 Received: from unknown (HELO mail-out1.apple.com) (17.254.0.52) by sources.redhat.com with SMTP; 18 Mar 2002 19:45:04 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out1.apple.com (8.11.3/8.11.3) with ESMTP id g2IJj3Q27909 for ; Mon, 18 Mar 2002 11:45:03 -0800 (PST) Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Mon, 18 Mar 2002 11:45:03 -0800 Received: from apple.com (vpn-gh-1104.apple.com [17.254.140.79]) by scv3.apple.com (8.11.3/8.11.3) with ESMTP id g2IJj2X23591; Mon, 18 Mar 2002 11:45:02 -0800 (PST) Message-ID: <3C9643B8.334D7812@apple.com> Date: Mon, 18 Mar 2002 11:45:00 -0000 From: Stan Shebs X-Mailer: Mozilla 4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 To: Neil Booth CC: Daniel Berlin , Jim Blandy , gdb-patches@sources.redhat.com, gcc@gcc.gnu.org Subject: Re: RFC: C/C++ preprocessor macro support for GDB References: <20020318072916.GB14970@daikokuya.demon.co.uk> <20020318184525.GC19897@daikokuya.demon.co.uk> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00319.txt.bz2 Neil Booth wrote: > > [...] We should have GCC and GDB agree > perfectly on macro expansion, otherwise there is little point. As someone who has had much of his time consumed by keeping another preprocessor (Apple's cpp-precomp) in sync with GNU cpp, I think we really should try hard to avoid duplicate macro expanders. The hallmark of a good expression evaluator in the debugger is that it passes the "cut-n-paste" test, that is, you can take any chunk of program source code and have the debugger produce the same result as the compiler. This is an ideal, and very hard to accomplish everywhere, but if the debugger uses the compiler's own preprocessing library, it gets a long way there with just the one step. I also imagine the extreme puzzlement of a GDB user who spends an hour trying to figure why stepping always goes down the else clause, when the evaluation of the if condition clearly shows the result is true - because the if condition includes a macro that was expanded differently... Stan