From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114325 invoked by alias); 10 Feb 2017 15:46:29 -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 114303 invoked by uid 89); 10 Feb 2017 15:46:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=xsave, stale 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 ESMTP; Fri, 10 Feb 2017 15:46:27 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B11358050B; Fri, 10 Feb 2017 15:46:27 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D54B306C0; Fri, 10 Feb 2017 15:46:25 +0000 (UTC) Subject: Re: [PATCH 5/5] Add support for Intel PKRU register to GDB and GDBserver. To: Michael Sturm , mark.kettenis@xs4all.nl, eliz@gnu.org References: <1485954205-18536-1-git-send-email-michael.sturm@intel.com> <1485954205-18536-6-git-send-email-michael.sturm@intel.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <23b66a48-ce18-2b9d-240e-84c74998c234@redhat.com> Date: Fri, 10 Feb 2017 15:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1485954205-18536-6-git-send-email-michael.sturm@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-02/txt/msg00255.txt.bz2 Hi Michael, On 02/01/2017 01:03 PM, Michael Sturm wrote: > +#define XSAVE_PKEYS_ADDR(tdep, xsave, regnum) \ > +(xsave + xsave_pkeys_offset[regnum - I387_PKRU_REGNUM (tdep)]) Missing indentation in the second line. > +if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ "failed to prepare" or some such instead of "${testfile}.exp" > + [list debug additional_flags=${comp_flags}]] } { > + untested "failed to compiler x86 PKEYS test. typo: compileR > +# Test pkru register at startup > +# set test_string "0" > + > +gdb_test "print \$pkru" 0 "pkru register" Write " = 0" instead of "0", since the latter matches anything that ends in 0, like "= 10" too. > + > +# Read values from pseudo registers. > +gdb_breakpoint [ gdb_get_line_number "break here 1" ] > +gdb_continue_to_breakpoint "break here 1" ".*break here 1.*" > + > +# set test_string ".*0x12345678.*" > +gdb_test "info register pkru" ".*pkru.*0x12345678.*" "read pkru register" > + > +# set test_string ".*0x44444444.*" > +gdb_test "print /x \$pkru = 0x44444444" "= 0x44444444" "set pkru value" > +gdb_test "info register pkru" ".*pkru.*0x44444444.*" "read value after setting value" All those "set test_string" bits look like stale bits? Should we remove them? Fix the nits above, and you're good to go for the whole series. Please push. Thanks, Pedro Alves