From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2578 invoked by alias); 27 Aug 2004 18:12:18 -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 2567 invoked from network); 27 Aug 2004 18:12:16 -0000 Received: from unknown (HELO biscayne-one-station.mit.edu) (18.7.7.80) by sourceware.org with SMTP; 27 Aug 2004 18:12:16 -0000 Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id i7RIC3ZD023264 for ; Fri, 27 Aug 2004 14:12:15 -0400 (EDT) Received: from contents-vnder-pressvre.mit.edu (CONTENTS-VNDER-PRESSVRE.MIT.EDU [18.7.16.67]) (authenticated bits=56) (User authenticated as nathanw@ATHENA.MIT.EDU) by melbourne-city-street.mit.edu (8.12.4/8.12.4) with ESMTP id i7RI4quv007506 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 27 Aug 2004 14:04:53 -0400 (EDT) Received: (from nathanw@localhost) by contents-vnder-pressvre.mit.edu (8.12.9) id i7RI4qZt021643; Fri, 27 Aug 2004 14:04:52 -0400 (EDT) To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] target.c: Check current_target in target_resize_to_sections References: <412E5516.6050209@gnu.org> <412F4F68.5000104@gnu.org> From: "Nathan J. Williams" Organization: Wasabi Systems, Inc. Date: Fri, 27 Aug 2004 18:12:00 -0000 In-Reply-To: <412F4F68.5000104@gnu.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-08/txt/msg00754.txt.bz2 Committed. - Nathan 2004-08-27 Nathan J. Williams * target.c (target_resize_to_sections): Check current_target.to_sections for an old value when updating. Index: target.c =================================================================== RCS file: /cvs/src/src/gdb/target.c,v retrieving revision 1.78 diff -u -r1.78 target.c --- target.c 3 Aug 2004 00:57:26 -0000 1.78 +++ target.c 27 Aug 2004 18:02:57 -0000 @@ -1415,6 +1415,13 @@ (*t)->to_sections_end = target->to_sections_end; } } + /* There is a flattened view of the target stack in current_target, + so its to_sections pointer might also need updating. */ + if (current_target.to_sections == old_value) + { + current_target.to_sections = target->to_sections; + current_target.to_sections_end = target->to_sections_end; + } } return old_count;