How to reproduce (as a Bash snippet): cat > /tmp/a.c <<EOF #include <stdio.h> int main(int argc, char** argv) { puts("hi\n"); return 0; } EOF gcc -g -O0 -o /tmp/a /tmp/a.c gdbserver localhost:5000 /tmp/a & gdb -q /tmp/a <<EOF target remote localhost:5000 quit EOF Expected behavior: The client connects to the server and quits without errors. Actual behavior: The server crashes when the client connects: Remote debugging from host 127.0.0.1 ../../../gdb/gdbserver/regcache.c:264: A problem internal to GDBserver has been detected. Unknown register pkru requested This is only reproducible in hosts that support the Intel Protection Keys for Userspace x86 extension (lscpu |grep -w pku). Version: GNU gdbserver (GDB) Fedora 8.0.1-26.fc26 GNU gdb (GDB) Fedora 8.0.1-26.fc26
Created attachment 10433 [details] Previous commiter did not regenerated the dat files. Partially added to Master branch by Yao.
Bug is confirmed. Patch should fix the issue. Thanks and regards, /Fred
> Bug is confirmed. Updating status then. Waldfred, if your account doesn't let you do that yourself, please let me know. And, I believe the bug is fixed in both master and 8.0 branch, right?
> -----Original Message----- > From: palves at redhat dot com [mailto:sourceware- > bugzilla@sourceware.org] > Sent: Friday, October 13, 2017 11:06 AM > To: Tedeschi, Walfred <walfred.tedeschi@intel.com> > Subject: [Bug server/22137] gdbserver crashes on hosts with pkru register > > https://sourceware.org/bugzilla/show_bug.cgi?id=22137 > > Pedro Alves <palves at redhat dot com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |NEW > Last reconfirmed| |2017-10-13 > Ever confirmed|0 |1 > > --- Comment #3 from Pedro Alves <palves at redhat dot com> --- > > Bug is confirmed. > > Updating status then. Waldfred, if your account doesn't let you do that > yourself, please let me know. > > And, I believe the bug is fixed in both master and 8.0 branch, right? > Patch works for both! I will patch then! Thanks and regards, /Fred > -- > You are receiving this mail because: > You are on the CC list for the bug. 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