From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21916 invoked by alias); 25 Nov 2010 11:23:52 -0000 Received: (qmail 21892 invoked by uid 22791); 25 Nov 2010 11:23:51 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_LW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Nov 2010 11:23:46 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id oAPBN99S000491; Thu, 25 Nov 2010 12:23:09 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id oAPBN6at018614; Thu, 25 Nov 2010 12:23:06 +0100 (CET) Date: Thu, 25 Nov 2010 11:23:00 -0000 Message-Id: <201011251123.oAPBN6at018614@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: emachado@linux.vnet.ibm.com CC: gdb-patches@sourceware.org, brobecker@adacore.com In-reply-to: <1290537939-28990-1-git-send-email-emachado@linux.vnet.ibm.com> (message from Edjunior Barbosa Machado on Tue, 23 Nov 2010 16:45:39 -0200) Subject: Re: [PATCH] testsuite: asm-source.exp: use 'sys_exit' on powerpc.inc References: <20101120053408.GQ2634@adacore.com> <1290537939-28990-1-git-send-email-emachado@linux.vnet.ibm.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00425.txt.bz2 > From: Edjunior Barbosa Machado > Date: Tue, 23 Nov 2010 16:45:39 -0200 > > With this patch, ppc32 uses 'sys_exit' sequence on gdbasm_exit0 macro. Isn't this somewhat OS-dependent? It'll work on OpenBSD since the exit system call is indeed #1 there, but there is no guarantee that's true on all OSes isn't it? And doesn't this pass random garbage as the argument to the exit system call? > gdb/testsuite/ > 2010-11-23 Edjunior Machado > > * powerpc.inc: Use 'sys_exit' on gdbasm_exit0 macro. > > diff --git a/gdb/testsuite/gdb.asm/powerpc.inc b/gdb/testsuite/gdb.asm/powerpc.inc > index a0797bf..ab700c2 100644 > --- a/gdb/testsuite/gdb.asm/powerpc.inc > +++ b/gdb/testsuite/gdb.asm/powerpc.inc > @@ -29,9 +29,9 @@ > > comment "exit (0)" > .macro gdbasm_exit0 > - comment "Don't know how to exit, but this will certainly halt..." > - li 0, 0 > - lwz 0, 0(0) > + comment "sys_exit" > + li 0, 1 > + sc > .endm > > comment "crt0 startup" > -- > 1.7.1 > >