From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12529 invoked by alias); 8 Sep 2014 15:20:32 -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 12504 invoked by uid 89); 8 Sep 2014 15:20:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 08 Sep 2014 15:20:26 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s88FKKFA027430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Sep 2014 11:20:20 -0400 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s88FKJnK006483 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 8 Sep 2014 11:20:20 -0400 From: Sergio Durigan Junior To: "Ulrich Weigand" Cc: emachado@linux.vnet.ibm.com (Edjunior Barbosa Machado), gdb-patches@sourceware.org Subject: Re: [PATCH] ppc64le/gdbserver: Fix ppc_collect/supply_ptrace_register() routines References: <201409081151.s88BpOJX015412@d06av02.portsmouth.uk.ibm.com> X-URL: http://www.redhat.com Date: Mon, 08 Sep 2014 15:20:00 -0000 In-Reply-To: <201409081151.s88BpOJX015412@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Mon, 8 Sep 2014 13:51:24 +0200 (CEST)") Message-ID: <87y4tuxhos.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00183.txt.bz2 On Monday, September 08 2014, Ulrich Weigand wrote: >> Why not use gdbarch_byte_order here? We don't use __BYTE_ORDER anywhere >> in the code. > > Well, this is gdbserver code, so there is no gdbarch ... > > In gdbserver, we usually check for host properties, so the above check > seems fine to me. Ouch, missed that, sorry. > However, there is one additional problem: > >>+ /* Big-endian values sit at the right end of the buffer. In case of >>+ registers whose size is smaller than sizeof (long), we must use a >>+ padding to access it correctly. */ >>+ int padding = (sizeof (long) - register_size (regcache->tdesc, regno)); >>+ collect_register (regcache, regno, buf + padding); > > This will be wrong for registers larger than "long", e.g. vector registers. > The old code handled them correctly, but this new code does not. This part seemed "strange" to me as well, but then I figured you guys know more about PPC than I do :-). Anyway, thanks for the corrections, Ulrich. -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/