From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25325 invoked by alias); 23 May 2010 14:29:59 -0000 Received: (qmail 25315 invoked by uid 22791); 23 May 2010 14:29:58 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Sun, 23 May 2010 14:29:52 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4NETpN5000782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 23 May 2010 10:29:51 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4NETnnS022490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 23 May 2010 10:29:51 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o4NETndW004357 for ; Sun, 23 May 2010 16:29:49 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o4NETmex004356 for gdb-patches@sourceware.org; Sun, 23 May 2010 16:29:48 +0200 Date: Sun, 23 May 2010 17:06:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] comment: push_target: Fix comment Message-ID: <20100523142948.GA4275@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00536.txt.bz2 Hi, I would like to update this comment but I was told one should not make references to other code in comments as such comment may become stale. OTOH unaware how to fix it otherwise, changing this code will most probably require updating the referenced add_target_sections code anyway. Thanks, Jan 2010-05-23 Jan Kratochvil * target.c (push_target): Fix comment wrt strata above. --- gdb/target.c 23 May 2010 14:23:31 -0000 1.255 +++ gdb/target.c 23 May 2010 14:26:35 -0000 @@ -898,9 +898,8 @@ push_target (struct target_ops *t) break; } - /* If there's already targets at this stratum, remove them. */ - /* FIXME: cagney/2003-10-15: I think this should be popping all - targets to CUR, and not just those at this stratum level. */ + /* If there's already targets at this stratum, remove them. Do not remove + targets at strata above, at least add_target_sections depends on it. */ while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) { /* There's already something at this stratum level. Close it,