This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: sim/arm/armos.c: IsTTY [PATCH]
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Shaun Jackman <sjackman at gmail dot com>, gdb-patches at sources dot redhat dot com
- Date: Tue, 06 Sep 2005 17:21:57 +0100
- Subject: Re: sim/arm/armos.c: IsTTY [PATCH]
- References: <7f45d9390508151204ca0b146@mail.gmail.com> <20050830023718.GB16189@nevyn.them.org>
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 <sjackman@gmail.com>
> >
> > * 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.