This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/5] Add support for Intel PKRU register to GDB and GDBserver.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]