From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29446 invoked by alias); 6 Sep 2005 16:22:51 -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 29421 invoked by uid 22791); 6 Sep 2005 16:22:35 -0000 Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (193.131.176.58) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 06 Sep 2005 16:22:35 +0000 Received: from pc960.cambridge.arm.com (pc960.cambridge.arm.com [10.1.205.4]) by cam-admin0.cambridge.arm.com (8.12.10/8.12.10) with ESMTP id j86GLrQb026820; Tue, 6 Sep 2005 17:21:53 +0100 (BST) Received: from pc960.cambridge.arm.com (localhost.localdomain [127.0.0.1]) by pc960.cambridge.arm.com (8.12.8/8.12.8) with ESMTP id j86GLwGt005221; Tue, 6 Sep 2005 17:21:58 +0100 Received: (from rearnsha@localhost) by pc960.cambridge.arm.com (8.12.8/8.12.8/Submit) id j86GLwkg005219; Tue, 6 Sep 2005 17:21:58 +0100 Subject: Re: sim/arm/armos.c: IsTTY [PATCH] From: Richard Earnshaw To: Daniel Jacobowitz Cc: Shaun Jackman , gdb-patches@sources.redhat.com In-Reply-To: <20050830023718.GB16189@nevyn.them.org> References: <7f45d9390508151204ca0b146@mail.gmail.com> <20050830023718.GB16189@nevyn.them.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1126023717.4930.8.camel@pc960.cambridge.arm.com> Mime-Version: 1.0 Date: Tue, 06 Sep 2005 16:22:00 -0000 X-SW-Source: 2005-09/txt/msg00030.txt.bz2 On Tue, 2005-08-30 at 03:37, Daniel Jacobowitz wrote: > 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? > I've no objections, these are part of the standard SWI set, so I see no real reason not to implement them if we can. > > + 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... Agreed. R.