From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 7821A3858405; Wed, 23 Mar 2022 12:46:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7821A3858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 845EE210E9; Wed, 23 Mar 2022 12:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1648039610; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=001O7cfg/Lq/7iZgfy/t95FXZwoH0NC6GiqHs2+kRu0=; b=UkCHiklvcLF0tAMQUuyLdUJoMoBENUaqiU6Cvy31jnypFpKEWV6IrjeosNqT9QGdz6Rb0B GHCl/OWcrTkmqK3QkJndeLV5uzIWt6Ww3dadMh50iBCxqm3fFVM231z7hGgZlUetJoK5wI paDU29MaMC/UpAwrlPgIKxlSiP5YF/k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1648039610; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=001O7cfg/Lq/7iZgfy/t95FXZwoH0NC6GiqHs2+kRu0=; b=uTT0Bn5OtTz2JmnAc6sdFoDnmg8MaJKpAVrNQ2Mc6uUPiaaYG4CUeXFUbYZbQpsIzku/KL k8fHrGgt98SGQ/Aw== Received: from suse.cz (virgil.suse.cz [10.100.13.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 6B199A3B81; Wed, 23 Mar 2022 12:46:50 +0000 (UTC) From: Martin Jambor To: Erick Ochoa Cc: gcc@gcc.gnu.org Subject: Re: Question on path from C parser to DECL_INITIAL In-Reply-To: References: User-Agent: Notmuch/0.35 (https://notmuchmail.org) Emacs/27.2 (x86_64-suse-linux-gnu) Date: Wed, 23 Mar 2022 13:46:50 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2022 12:46:52 -0000 Hi, On Wed, Mar 23 2022, Erick Ochoa via Gcc wrote: > Hi, > > I am trying to understand what path is executed in GCC from parsing a C > expression (in a global variable declaration) to the value in DECL_INITIAL. > At the moment, I have annotated a tree during parsing. I have another > debugging pass that looks for this tree in subsequent passes. The > annotation persists if the tree is inside a function body. However, if the > tree is in a global variable initialization (i.e., DECL_INITIAL), then I am > unable to see the annotation even when placing the debugging pass at the > beginning of passes.def. > > Can someone provide a little bit of guidance? Sounds like a gdb watchpoint should help here. Martin