From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3108 invoked by alias); 11 Dec 2014 15:31:13 -0000 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 Received: (qmail 3003 invoked by uid 89); 11 Dec 2014 15:31:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e37.co.us.ibm.com Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 11 Dec 2014 15:31:10 +0000 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Dec 2014 08:31:08 -0700 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 11 Dec 2014 08:31:07 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 52B751FF0023 for ; Thu, 11 Dec 2014 08:19:51 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBBFU7KE18022616 for ; Thu, 11 Dec 2014 08:30:07 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBBFV4Wo024545 for ; Thu, 11 Dec 2014 08:31:06 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id sBBFUxsi023697; Thu, 11 Dec 2014 08:30:59 -0700 Message-Id: <201412111530.sBBFUxsi023697@d03av02.boulder.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 11 Dec 2014 16:30:57 +0100 Subject: Re: [PATCH] Detect 64-bit-ness in PowerPC Book III-E To: yao@codesourcery.com (Yao Qi), anton@samba.org Date: Thu, 11 Dec 2014 15:31:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <1418296515-8689-1-git-send-email-yao@codesourcery.com> from "Yao Qi" at Dec 11, 2014 07:15:15 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14121115-0025-0000-0000-000006D714B1 X-SW-Source: 2014-12/txt/msg00245.txt.bz2 Yao Qi wrote: > This patch is to teach GDBServer to detect 64-bit inferior correctly. > We find a problem that GDBServer is unable to detect on an e5500 core > processor. Current GDBServer assumes that MSR is a 64-bit register, > but MSR is a 32-bit register in Book III-E. This patch is to fix this > problem by checking both bits in MSR, in order to handle both Book > III-S and Book III-E. Hmm. If it actually is Book III-S, then bit 32 is "reserved", so I'm not sure including it in the check is safe. Anton, what would you suggest a user program to use to safely detect whether a ptrace-attached child is 64-bit or not, on either Book III-S or Book III-E systems? In any case, whatever we do, we should do both in native GDB and gdbserver. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com