From nobody Thu Apr 25 00:57:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496246784492999.8144047960275; Wed, 31 May 2017 09:06:24 -0700 (PDT) Received: from localhost ([::1]:60746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG68b-0003gD-0g for importer@patchew.org; Wed, 31 May 2017 12:06:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG63C-0007eY-Pz for qemu-devel@nongnu.org; Wed, 31 May 2017 12:00:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG639-0001pS-JD for qemu-devel@nongnu.org; Wed, 31 May 2017 12:00:46 -0400 Received: from smtp1.lauterbach.com ([62.154.241.196]:51428) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dG639-0001lu-5E for qemu-devel@nongnu.org; Wed, 31 May 2017 12:00:43 -0400 Received: (qmail 1184 invoked by uid 484); 31 May 2017 16:00:23 -0000 Received: from unknown (HELO [192.168.187.23]) (Authenticated_SSL:abouassida@[41.224.44.126]) (envelope-sender ) by smtp1.lauterbach.com (qmail-ldap-1.03) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 31 May 2017 16:00:22 -0000 X-Qmail-Scanner-Diagnostics: from 41.224.44.126 by smtp1.lauterbach.com (envelope-from , uid 484) with qmail-scanner-2.11 (mhr: 1.0. clamdscan: 0.99/21437. spamassassin: 3.4.0. Clear:RC:1(41.224.44.126):. Processed in 0.336441 secs); 31 May 2017 16:00:23 -0000 From: Abdallah Bouassida To: qemu-devel@nongnu.org, pbonzini@redhat.com Message-ID: <8550033a-3ab0-4fdc-0138-8a3300f29dcc@lauterbach.com> Date: Wed, 31 May 2017 17:00:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 62.154.241.196 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: [Qemu-devel] [PATCH] target-x86: Add GDB XML description for SSE registers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Khaled Jmal , ehabkost@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8"; format="flowed" [Qemu-devel] [PATCH] target-x86: Add GDB XML description for SSE registers Add an XML description for SSE registers (XMM+MXCSR) for both X86 and X86-64 architectures in the GDB stub: - configure: Define gdb_xml_files for the X86 targets (32 and 64bit). - gdb-xml/i386-32bit-sse.xml & gdb-xml/i386-64bit-sse.xml: The XML files that contain a description of the XMM + MXCSR registers. - gdb-xml/i386-32bit.xml & gdb-xml/i386-64bit.xml: wrappers that include the XML file of the core registers and the other XML file of the SSE=20 registers. - target/i386/cpu.c: Modify the gdb_core_xml_file to the new XML wrapper, modify the gdb_num_core_regs to fit the registers number defined in each XML file. Signed-off-by: Abdallah Bouassida --- @Paolo: This patch is in response to your hints here: https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg03314.html Thank you for pointing me on the missing registers! configure | 4 ++-- gdb-xml/i386-32bit-sse.xml | 52 ++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-32bit.xml | 14 +++++++++++ gdb-xml/i386-64bit-sse.xml | 60=20 ++++++++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-64bit.xml | 14 +++++++++++ target/i386/cpu.c | 8 +++---- 6 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 gdb-xml/i386-32bit-sse.xml create mode 100644 gdb-xml/i386-32bit.xml create mode 100644 gdb-xml/i386-64bit-sse.xml create mode 100644 gdb-xml/i386-64bit.xml diff --git a/configure b/configure index 1a5ee4b..d4f154d 100755 --- a/configure +++ b/configure @@ -6044,11 +6044,11 @@ TARGET_ABI_DIR=3D"" case "$target_name" in i386) - gdb_xml_files=3D"i386-32bit-core.xml" + gdb_xml_files=3D"i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" ;; x86_64) TARGET_BASE_ARCH=3Di386 - gdb_xml_files=3D"i386-64bit-core.xml" + gdb_xml_files=3D"i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" ;; alpha) mttcg=3D"yes" diff --git a/gdb-xml/i386-32bit-sse.xml b/gdb-xml/i386-32bit-sse.xml new file mode 100644 index 0000000..5767847 --- /dev/null +++ b/gdb-xml/i386-32bit-sse.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/i386-32bit.xml b/gdb-xml/i386-32bit.xml new file mode 100644 index 0000000..956fc7f --- /dev/null +++ b/gdb-xml/i386-32bit.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/gdb-xml/i386-64bit-sse.xml b/gdb-xml/i386-64bit-sse.xml new file mode 100644 index 0000000..e86efc9 --- /dev/null +++ b/gdb-xml/i386-64bit-sse.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdb-xml/i386-64bit.xml b/gdb-xml/i386-64bit.xml new file mode 100644 index 0000000..0b2f00c --- /dev/null +++ b/gdb-xml/i386-64bit.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a41d595..2e2661b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4063,11 +4063,11 @@ static void=20 x86_cpu_common_class_init(ObjectClass *oc, void *data) #endif cc->gdb_arch_name =3D x86_gdb_arch_name; #ifdef TARGET_X86_64 - cc->gdb_core_xml_file =3D "i386-64bit-core.xml"; - cc->gdb_num_core_regs =3D 40; + cc->gdb_core_xml_file =3D "i386-64bit.xml"; + cc->gdb_num_core_regs =3D 57; #else - cc->gdb_core_xml_file =3D "i386-32bit-core.xml"; - cc->gdb_num_core_regs =3D 32; + cc->gdb_core_xml_file =3D "i386-32bit.xml"; + cc->gdb_num_core_regs =3D 41; #endif #ifndef CONFIG_USER_ONLY cc->debug_excp_handler =3D breakpoint_handler; --=20 1.9.1