From: "Sturm, Michael" <michael.sturm@intel.com>
To: Pedro Alves <palves@redhat.com>, mark.kettenis@xs4all.nl, eliz@gnu.org
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 5/5] Add support for Intel PKRU register to GDB and GDBserver.
Date: Fri, 27 Jan 2017 15:00:00 -0000 [thread overview]
Message-ID: <588B607A.9040507@intel.com> (raw)
In-Reply-To: <c160cf95-ddf6-2c62-963b-588558f6c1d2@redhat.com>
Hello Pedro,
thanks for your review. Please see comments/answers below. I'll post a
new revision of the patch series soon.
Thanks and Regards,
Michael
On 26/01/2017 16:38, Pedro Alves wrote:
> On 12/06/2016 10:58 AM, Michael Sturm wrote:
>
>> diff --git a/gdb/features/i386/32bit-pkeys.xml b/gdb/features/i386/32bit-pkeys.xml
>> new file mode 100644
>> index 0000000..84fff51
>> --- /dev/null
>> +++ b/gdb/features/i386/32bit-pkeys.xml
>> @@ -0,0 +1,13 @@
>> +<?xml version="1.0"?>
>> +<!-- Copyright (C) 2015-2016 Free Software Foundation, Inc.
> 2017.
Ok.
>
>> +
>> +/* PKRU register? */
>> +
>> +int
>> +i386_pkru_regnum_p (struct gdbarch *gdbarch, int regnum)
> We should start using bool.
Ok.
>
>> +{
>> + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
>> + int pkru_regnum = tdep->pkru_regnum;
>> +
>> + if (pkru_regnum < 0)
>> + return 0;
> return false;
Ok.
>
>> +
>> + regnum -= pkru_regnum;
>> + return regnum >= 0 && regnum < I387_NUM_PKEYS_REGS;
>> +}
>> +
>
>> + Copyright 2015-2016 Free Software Foundation, Inc.
>> +
>> + Contributed by Intel Corp. <michael.sturm@intel.com>
> Please see:
>
> https://sourceware.org/gdb/wiki/ContributionChecklist#Attribution
Ok, I'll remove these lines.
>
>
> In the test:
>
>> +#include <stdio.h>
> This is not needed, right?
It's needed to pull in the definition for NULL which is used in the call
to __get_cpuid_
>
>> +#include "x86-cpuid.h"
>
>
>> +# 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"
>> +
>> +gdb_breakpoint [ gdb_get_line_number "break here 2" ]
>> +gdb_continue_to_breakpoint "break here 2" ".*break here 2.*"
>> +
>> +gdb_test "print /x rd_value" ".*" "variable after reading pkru"
> Is this last test too lax? It'll basically accept anything
> but a crash, including an error.
You're absolutely right, I'll correct this. Thanks for catching this!
>
> Otherwise it LGTM.
>
> Thanks,
> Pedro Alves
>
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2017-01-27 15:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 10:58 [PATCH v3 0/5] Add support for PKRU register to GDB and GDBServer Michael Sturm
2016-12-06 10:58 ` [PATCH v3 2/5] Change xstate_bv handling to use 8 bytes of data Michael Sturm
2017-01-26 14:46 ` Pedro Alves
2016-12-06 10:58 ` [PATCH v3 5/5] Add support for Intel PKRU register to GDB and GDBserver Michael Sturm
2016-12-08 15:35 ` Luis Machado
2017-01-26 15:38 ` Pedro Alves
2017-01-27 15:00 ` Sturm, Michael [this message]
2017-01-27 15:22 ` Pedro Alves
2017-02-01 12:34 ` Sturm, Michael
2016-12-06 10:58 ` [PATCH v3 1/5] Sync up x86-gcc-cpuid.h with cpuid.h from gcc-6 branch Michael Sturm
2016-12-07 18:28 ` Luis Machado
2016-12-08 12:16 ` Sturm, Michael
2016-12-08 15:35 ` Luis Machado
2017-01-26 14:29 ` Pedro Alves
2016-12-06 10:58 ` [PATCH v3 3/5] Rename target descriptions to reflect actual content of description Michael Sturm
2017-01-26 14:50 ` Pedro Alves
2017-01-26 15:55 ` Sturm, Michael
2017-01-26 16:17 ` Pedro Alves
2016-12-06 10:59 ` [PATCH v3 4/5] Add target description for avx-avx512 Michael Sturm
2017-01-26 14:57 ` Pedro Alves
2017-01-26 16:02 ` Sturm, Michael
[not found] ` <DB865139DDA33A4DA36CC4A460C112734740AE54@irsmsx105.ger.corp.intel.com>
2017-01-26 14:07 ` [PING][PATCH v3 0/5] Add support for PKRU register to GDB and GDBServer Sturm, Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=588B607A.9040507@intel.com \
--to=michael.sturm@intel.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox