From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64794 invoked by alias); 21 Aug 2017 16:46:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 64620 invoked by uid 89); 21 Aug 2017 16:45:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=HTo:D*freebsd.org, H*r:sk:static. X-HELO: mail-io0-f194.google.com Received: from mail-io0-f194.google.com (HELO mail-io0-f194.google.com) (209.85.223.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Aug 2017 16:45:57 +0000 Received: by mail-io0-f194.google.com with SMTP id p141so3560849iop.1 for ; Mon, 21 Aug 2017 09:45:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=J2SXFmTl40tXoZz7adSg9GcTxK9byWDZ9lGBjW0bIRI=; b=mS2YIO/NXz+nDih/2KcQBiAJSNUhpoPljPcnrJvgZpbJRtMKwrQ4Dks+OiKTrAMo02 zp79/8j3TobIjb0jPFSfbnLSy0RJTiaV6sd1aa8TuZOoUJ2vNcukC4q5+l7JgxqhbdLY Slq9iPVGyZuklbq2xzX8oYRnXnGxITZK/T2UNomeTBrqv2QJOJWilaaD7UKMrTUjls/b Fv72+8ei0rEMaR5OwDw3CVQs6zSqanF65s4OOekPq4QbNHSC0s7Gu571kqLJlL0aa2QZ pi/ROonXF7ltjkwwbTY293ypgfzqL9FYhhsCwLaQqvXPc3tnSbenBxoB20uRMU0gwXjK swBQ== X-Gm-Message-State: AHYfb5jB6vah+1ZTO531gPZEEz1YG3Be0ma9PbreXSR5F11YICz3+nX+ dYgR8kYRkeJya8Pa X-Received: by 10.107.12.104 with SMTP id w101mr729940ioi.164.1503333956129; Mon, 21 Aug 2017 09:45:56 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id k18sm4101400itb.40.2017.08.21.09.45.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 09:45:55 -0700 (PDT) From: Yao Qi To: John Baldwin Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 03/22] Return X86_XSTATE_SSE_MASK instead of 0 in i386fbsd_core_read_xcr0 References: <1503329347-26711-1-git-send-email-yao.qi@linaro.org> <1503329347-26711-4-git-send-email-yao.qi@linaro.org> <3145523.UstzfFeGMo@ralph.baldwin.cx> Date: Mon, 21 Aug 2017 16:46:00 -0000 In-Reply-To: <3145523.UstzfFeGMo@ralph.baldwin.cx> (John Baldwin's message of "Mon, 21 Aug 2017 09:23:28 -0700") Message-ID: <86k21wswch.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00406.txt.bz2 John Baldwin writes: > I think this should actually be X86_XSTATE_MMX_MASK. Core dumps on FreeB= SD/i386 s/X86_XSTATE_MMX_MASK/X86_XSTATE_X87_MASK/ ? > only include the original 387 FPU state in .reg2, they do not write > out SSE state > in a separate note as Linux does. > FAOD, the existing code (without my patches) get SSE target description tdesc_i386 in default. If we should use MMX target description tdesc_i386_mmx in this case, we can change it after my patch #4, in which i386_target_description returns tdesc_i386_mmx for X86_XSTATE_X87_MAS= K. > For i386 native FreeBSD (and probably other *BSD) targets the logic needs= to > similarly be a bit more complicated, though I can help. In particular, t= he > 'static int have_ptrace_xmmregs' in i386-bsd-nat.c probably needs to be m= ade > non-static with an extern in 'i386-bsd-nat.h', and i386fbsd_read_descript= ion > should try to use PT_GETXMMREGS once to probe it if it isn't set (it can = just > fetch the gdb process' registers to test the flag) and then select > X86_XSTATE_SSE_MASK if there is no XSAVE support for PT_GETXMMREGS works, > else use X86_XSTATE_MMX_MASK. Other BSD's don't have a target read descr= iption > target method, so only i386-fbsd-nat.c would need to have its method upda= ted. > I could always work on this as a followup. To be clear, can I commit this patch as-is? --=20 Yao (=E9=BD=90=E5=B0=A7)