From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30203 invoked by alias); 24 May 2006 12:41:34 -0000 Received: (qmail 30192 invoked by uid 22791); 24 May 2006 12:41:33 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 24 May 2006 12:41:24 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fisfx-0006ZQ-4q; Wed, 24 May 2006 08:41:21 -0400 Date: Wed, 24 May 2006 13:06:00 -0000 From: Daniel Jacobowitz To: Nathan Sidwell Cc: gdb@sourceware.org Subject: Re: reset fileio Message-ID: <20060524124120.GA25225@nevyn.them.org> Mail-Followup-To: Nathan Sidwell , gdb@sourceware.org References: <4474131D.2080805@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4474131D.2080805@codesourcery.com> User-Agent: Mutt/1.5.11+cvs20060403 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00350.txt.bz2 On Wed, May 24, 2006 at 09:02:37AM +0100, Nathan Sidwell wrote: > + /* Close any open descriptors, and reinitialize the file mapping */ Period at the end of the comment. > + void > + remote_fileio_reset (void) > + { > + int ix; > + > + for (ix = 0; ix != remote_fio_data.fd_map_size; ix++) > + { > + int fd = remote_fio_data.fd_map[ix]; > + > + if (fd >= 0) > + close (fd); > + } > + free (remote_fio_data.fd_map); > + remote_fio_data.fd_map = NULL; > + remote_fio_data.fd_map_size = 0; > + } Won't this free NULL if the target hadn't initialized fileio? I think that's non-portable. -- Daniel Jacobowitz CodeSourcery