From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32404 invoked by alias); 25 Nov 2010 13:56:30 -0000 Received: (qmail 32228 invoked by uid 22791); 25 Nov 2010 13:56:26 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_00,TW_LW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e24smtp01.br.ibm.com (HELO e24smtp01.br.ibm.com) (32.104.18.85) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Nov 2010 13:56:20 +0000 Received: from mailhub3.br.ibm.com (mailhub3.br.ibm.com [9.18.232.110]) by e24smtp01.br.ibm.com (8.14.4/8.13.1) with ESMTP id oAPEG09p007745 for ; Thu, 25 Nov 2010 12:16:00 -0200 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by mailhub3.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oAPE3AOC2453700 for ; Thu, 25 Nov 2010 12:03:11 -0200 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oAPDtxjI024830 for ; Thu, 25 Nov 2010 11:55:59 -0200 Received: from [9.78.135.150] ([9.78.135.150]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oAPDtwrC024824; Thu, 25 Nov 2010 11:55:59 -0200 Message-ID: <4CEE6AFA.1050802@linux.vnet.ibm.com> Date: Thu, 25 Nov 2010 13:56:00 -0000 From: Edjunior Barbosa Machado User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100619 Lightning/1.0b1 Icedove/3.0.5 MIME-Version: 1.0 To: Mark Kettenis CC: gdb-patches@sourceware.org, brobecker@adacore.com 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> <201011251123.oAPBN6at018614@glazunov.sibelius.xs4all.nl> In-Reply-To: <201011251123.oAPBN6at018614@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00428.txt.bz2 On 11/25/2010 09:23 AM, Mark Kettenis wrote: >> 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? Good point, you might be right, unfortunately I didn't have the chance to test it against other OSes than linux. > > And doesn't this pass random garbage as the argument to the exit system call? Right, I think we could add 'li 3,0' before calling 'sc', but I'm not sure if this is a problem since we're not checking the exit code on the testcase. Thanks, -- Edjunior > >> 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 >> >> >