From patchwork Thu Jun 1 12:41:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 769711 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wdnVH13DPz9s89 for ; Thu, 1 Jun 2017 22:59:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OWOkarut"; dkim-atps=neutral Received: from localhost ([::1]:44226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGPh6-0001VH-Oo for incoming@patchwork.ozlabs.org; Thu, 01 Jun 2017 08:59:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGPQt-00045t-QS for qemu-devel@nongnu.org; Thu, 01 Jun 2017 08:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGPQr-0005p4-Rq for qemu-devel@nongnu.org; Thu, 01 Jun 2017 08:42:31 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:36316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGPQr-0005ow-IX for qemu-devel@nongnu.org; Thu, 01 Jun 2017 08:42:29 -0400 Received: by mail-wm0-x241.google.com with SMTP id k15so11051210wmh.3 for ; Thu, 01 Jun 2017 05:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=sb25EtXNGmn4Rwm+mv9UbL5D173VEGIDcMWWuwmTXMw=; b=OWOkarutuugroHpiyTR9g8eeIwQ1xOiQwzMjxyrL8TcFXI3q4633YMQ2KIXee4yyRz S8TxN+tOCVto26hnqLsYpd8rz4hr3KZQROZOJ1Dlgd5bUgbR9qxZoxs3VExXpUvKtHs8 F5hQEmWxO0FWYqaH0iei5dTcETudrjU3oU+GKK8deF3kBX4tCB2igsLCn46ECWh8w9Fw s4mPMaHDJDlPhKM47AB2xBL/0Cwjje5ar1lW+fRHqRXFngR09ysmKm4N0aXhokhP54Ke xaCQLhythCIcVuIrjVAoFcv7Y87ZtGqcDVqzZfEC7J5JLDP2EaLFWf4mzrdjpl0WbKYL dnbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=sb25EtXNGmn4Rwm+mv9UbL5D173VEGIDcMWWuwmTXMw=; b=RnRsyn9XnyNJf32ttW66Mc5v2b3KIyLc5DqKDK4d87NHy6NcjwqLK4UxfYDF823CKg d8gU4ZNKg7wnPGAIJo9VnNzNbmWm0eSWjgco0PanuyApR9Vjjb7pLrgvHHQ/Go1ZlWEE OVtRp2v2mHpsDk2WbHhK2U00h1yz+tjjMnVF4vuPgxduTUUIGlmXOJbjPfyjTznqxKps QNvM8q3dBqjX6HM9zjOsyZKWs/FzLu17WHrfz355alGvb6tpYleCsZKIeMtRF7Bsb1Rc 3RwEh0UsKqdtncCVcUujtsbcjeynrX9+Mjf0R1VSi1KKQPFLguXMprG4stvNkPDsUhMA Ef2A== X-Gm-Message-State: AODbwcAuw5V4nOtwzuTa90HrcIRNX0/KtshSW3ZsaBmZGFp/NA84j3BR nk1oru5QSDXVcX/zjho= X-Received: by 10.28.126.210 with SMTP id z201mr1492282wmc.75.1496320948274; Thu, 01 Jun 2017 05:42:28 -0700 (PDT) Received: from 640k.lan (94-39-157-43.adsl-ull.clienti.tiscali.it. [94.39.157.43]) by smtp.gmail.com with ESMTPSA id g46sm6271438wrg.69.2017.06.01.05.42.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 05:42:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 1 Jun 2017 14:41:48 +0200 Message-Id: <1496320911-51305-31-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1496320911-51305-1-git-send-email-pbonzini@redhat.com> References: <1496320911-51305-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 30/33] target/i386: 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: Abdallah Bouassida Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Abdallah Bouassida 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 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 Signed-off-by: Paolo Bonzini --- configure | 4 ++-- gdb-xml/i386-32bit-sse.xml | 52 ++++++++++++++++++++++++++++++++++++++++ gdb-xml/i386-32bit.xml | 14 +++++++++++ gdb-xml/i386-64bit-sse.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 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 139638e..aeec615 100755 --- a/configure +++ b/configure @@ -6033,11 +6033,11 @@ TARGET_ABI_DIR="" case "$target_name" in i386) - gdb_xml_files="i386-32bit-core.xml" + gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml" ;; x86_64) TARGET_BASE_ARCH=i386 - gdb_xml_files="i386-64bit-core.xml" + gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml" ;; alpha) mttcg="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 a638832..41978d8 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4068,11 +4068,11 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) #endif cc->gdb_arch_name = x86_gdb_arch_name; #ifdef TARGET_X86_64 - cc->gdb_core_xml_file = "i386-64bit-core.xml"; - cc->gdb_num_core_regs = 40; + cc->gdb_core_xml_file = "i386-64bit.xml"; + cc->gdb_num_core_regs = 57; #else - cc->gdb_core_xml_file = "i386-32bit-core.xml"; - cc->gdb_num_core_regs = 32; + cc->gdb_core_xml_file = "i386-32bit.xml"; + cc->gdb_num_core_regs = 41; #endif #ifndef CONFIG_USER_ONLY cc->debug_excp_handler = breakpoint_handler;