From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21337 invoked by alias); 30 Aug 2005 02:37:31 -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 21207 invoked by uid 22791); 30 Aug 2005 02:37:21 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 30 Aug 2005 02:37:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1E9vzy-0004JM-3Q; Mon, 29 Aug 2005 22:37:18 -0400 Date: Tue, 30 Aug 2005 02:38:00 -0000 From: Daniel Jacobowitz To: Shaun Jackman , Richard Earnshaw Cc: gdb-patches@sources.redhat.com Subject: Re: sim/arm/armos.c: IsTTY [PATCH] Message-ID: <20050830023718.GB16189@nevyn.them.org> Mail-Followup-To: Shaun Jackman , Richard Earnshaw , gdb-patches@sources.redhat.com References: <7f45d9390508151204ca0b146@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f45d9390508151204ca0b146@mail.gmail.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-08/txt/msg00249.txt.bz2 On Mon, Aug 15, 2005 at 12:04:13PM -0700, Shaun Jackman wrote: > This patch adds support for the ARM IsTTY, Remove, and Rename SWI calls. > > Please cc me in your reply. Cheers, > Shaun > > 2005-08-15 Shaun Jackman > > * sim/arm/armos.c (unlink): Remove this macro. It is unused > in this file and conflicts with sim_callback->unlink. > (SWIremove): New function. > (SWIrename): Ditto. > (ARMul_OSHandleSWI): Handle the RDP calls SWI_IsTTY, > SWI_Remove, and SWI_Rename, as well as the RDI calls > AngelSWI_Reason_IsTTY, AngelSWI_Reason_Remove, and > AngelSWI_Reason_Rename. It looks plausible to me; Richard, any comments? > + char dummy[2000]; > + int i; > + > + for (i = 0; (dummy[i] = ARMul_SafeReadByte (state, path + i)); i++) > + ; Please no buffer overflows be adding. Also, there's plenty of ways to write this without the ugly empty loop body... -- Daniel Jacobowitz CodeSourcery, LLC