From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18949 invoked by alias); 27 Aug 2004 15:13:53 -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 18941 invoked from network); 27 Aug 2004 15:13:52 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 27 Aug 2004 15:13:52 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7RFDqS2008493 for ; Fri, 27 Aug 2004 11:13:52 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7RFDn300972; Fri, 27 Aug 2004 11:13:49 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9652F2B9D; Fri, 27 Aug 2004 11:12:40 -0400 (EDT) Message-ID: <412F4F68.5000104@gnu.org> Date: Fri, 27 Aug 2004 15:13:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: "Nathan J. Williams" Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] target.c: Check current_target in target_resize_to_sections References: <412E5516.6050209@gnu.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00741.txt.bz2 > Andrew Cagney writes: > > >>>> > 2004-08-25 Nathan J. Williams >>>> > * target.c (target_resize_to_sections): Check >>>> > current_target.to_sections for an old value when updating. >> >>> >>> Can you just add some sort of brief comment noting why current_target >>> also needs to be checked. With that it's ok (but post the revised >>> patch when committing). > > > Sure. Should I add the comment to the ChangeLog, the code, or both? > (The code already says what it's trying to do by updating all this > stuff, and while it's not obvious when something like current_target > is missing, it's pretty obvious when it's there). The code. The ChangeLog contains what was changed, the code why. It's not so obvious, as otherwize you'd have not found yourself fixing the bug :-) Just some sort of gentle reminder that current_target contains a flattened copy of the target stack and hence also needs to be updated. Andrew