From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2851 invoked by alias); 8 Jan 2013 15:50:16 -0000 Received: (qmail 2842 invoked by uid 22791); 8 Jan 2013 15:50:15 -0000 X-SWARE-Spam-Status: No, hits=-8.8 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jan 2013 15:50:12 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D996333DAAB; Tue, 8 Jan 2013 15:50:11 +0000 (UTC) From: Mike Frysinger To: "H.J. Lu" Subject: Re: [PATCH] gdb: x86: fix x32 builds with inline asm Date: Tue, 08 Jan 2013 15:50:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com References: <1357657280-24150-1-git-send-email-vapier@gentoo.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2091875.disksFpbCS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201301081052.36180.vapier@gentoo.org> 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: 2013-01/txt/msg00132.txt.bz2 --nextPart2091875.disksFpbCS Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1577 On Tuesday 08 January 2013 10:36:11 H.J. Lu wrote: > On Tue, Jan 8, 2013 at 7:01 AM, Mike Frysinger wrote: > > --- a/gdb/common/linux-ptrace.c > > +++ b/gdb/common/linux-ptrace.c > > @@ -103,21 +103,11 @@ linux_ptrace_test_ret_to_nx (void) > > strerror (errno)); > > else > > { > > -#if defined __i386__ > > - asm volatile ("pushl %0;" > > - ".globl linux_ptrace_test_ret_to_nx_instr;" > > - "linux_ptrace_test_ret_to_nx_instr:" > > - "ret" > > - : : "r" (return_address) : "%esp", "memory"); > > -#elif defined __x86_64__ > > - asm volatile ("pushq %0;" > > + asm volatile ("push %0;" > > ".globl linux_ptrace_test_ret_to_nx_instr;" > > "linux_ptrace_test_ret_to_nx_instr:" > > "ret" > > - : : "r" (return_address) : "%rsp", "memory"); > > -#else > > -# error "!__i386__ && !__x86_64__" > > -#endif > > + : : "r" (return_address) : "sp", "memory"); > > gdb_assert_not_reached ("asm block did not terminate"); > > } >=20 > I think we should keep >=20 > #else > # error "!__i386__ && !__x86_64__" > #endif that #else case is currently impossible to hit because the whole func is=20 protected by: #if defined __i386__ || defined __x86_64__ i'm guessing the #else was there only to make sure that some asm test was=20 performed, but since there is no conditional asm, that's no longer an issue -mike --nextPart2091875.disksFpbCS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQ7EDEAAoJEEFjO5/oN/WBtTQP/22PyFTKrAhdghDZGztDUUY7 ixoDRJ2xGSUU1IxUPB+WYUuWgKv9NhmJESOnLEpVh9FIqq4jccB7NeE9iDN1oLzf JltDfNLXa+WvdGLWC7/vcEGZgk2nhrrJpampyI/ax9xj6/0O54W/KVkZirsLhU1Q Z5nTaQQErc4oR8Xi/ObV/a1CRM1/Fk8WHUr0qxVZQ2+jmAU03X1G7arc9KpjUvPJ GbeS5SNhwbBZOqL2DWfXqKrEsUx9L/hdMCnPtvAfg4CkemQjPQDaZdSdpnI7SIRx BXF9JNU8acDHD7ilmRhBT/GetI0vgduWsdcKKCz1Mtgl7FCXFUwhZrFCIdmFj+Vf leeRmMp7uB3b4q6HXu/QxnQaVtgg2uuMmPkJNUfPNcl7nTfhbRq1XxmqtigJZQfO srbnlUYsMTgVBA9fHRoaBvblYryn3BnPRIV2+xnZnGuJSYlcXOhtNEh1BrhCTvfu IOMBpMwWZLn1MqJWdbfs57vzvMNocqh5h+7LoPmxt0j288MDllsJv+sg9BzN1hWE zR6h3Jlofhgwrpwweug/c2so9JpHbu9P71le6tPrw0LmMHHZ5UldvewxCh6SX8jD jr9GPNsSKTsIjFu95dawMSTIm2M59LYnJvh50o8hxShP3hbl5oH9EizO3hbZ3noI nMNP0QAM6HpfjNIThZmr =m2BW -----END PGP SIGNATURE----- --nextPart2091875.disksFpbCS--