Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1268146pxb; Wed, 10 Feb 2021 04:33:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgUpptiyc6/sAJQJAsu3YgMMTW6vSCi/OGCZK8q1SLEybU4VxpW16JKNZzV/aliLQVImrJ X-Received: by 2002:a05:6402:5193:: with SMTP id q19mr2952466edd.264.1612960396620; Wed, 10 Feb 2021 04:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612960396; cv=none; d=google.com; s=arc-20160816; b=ocaVznC7xCgpNQgteGd479dMZXAxRsEi8ZM0SwogOfv5Z895jIv+5lx9RcDlHyg1MW 7TFgdruX/oslFph9H6kNGQ5rBhByRK5/flSrpXJubBqIpiXJz57zGjKZXUMWmfitY9tu PJlYBB6WERc83+9N+vXmwyBnX5kU7VlzwUfuz9d5KhC4nMnj+7MKNi8qYNwHmR0Dd/lV CE3TjzPu/rodauruPEsgl2FBv4K0l+HCc0zr/4EQ7l/PltfvFGajjkgQwVSRmZ6NfE6d zm/bEht3/0je77Y+feS1HMCd9f93omei/qHnDB3e4wxR9+eGDHZfa0kXerfi9DxHwi+M LYmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HSBGzyNlTheaTP9Pm689kFtenx8ASuk2y6uL2Tc/WCo=; b=SFrMIbYGFnG4PtgKCAzH+EikQLtXSMakKtaOEePiuKMLQko7L18cc4nY2ZEufkW5c3 qYQhf5aP8zpkO7f7gGRVVOAOQUfd9+wcu5y6ZSlz4yxpLer1l84iwGYm0mvXczacFzn1 ReY7mLOjP7QJFipEMfBGnTlwZa/olN/kx9rkRaYwWlMKEFvx/144uZpgHxXXb+lbW03r 9B1JWTACoAFxdlh1I/1wvV76Y7n2qalJaosinJDRZZL+kleaxc25bYtybHiFpyC9JOTZ qyMv5QdbDpV2yiex4AbdhIYu4DrW52YjYz49L6ZELZBifmJm+r0jjO+MZOc2kWbdzAoV iC6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ja8uBoCH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si1250394edt.594.2021.02.10.04.32.53; Wed, 10 Feb 2021 04:33:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ja8uBoCH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231278AbhBJMcM (ORCPT + 99 others); Wed, 10 Feb 2021 07:32:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231868AbhBJMaN (ORCPT ); Wed, 10 Feb 2021 07:30:13 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097DCC06174A for ; Wed, 10 Feb 2021 04:29:33 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id 190so1686383wmz.0 for ; Wed, 10 Feb 2021 04:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HSBGzyNlTheaTP9Pm689kFtenx8ASuk2y6uL2Tc/WCo=; b=ja8uBoCHnX3lV+218wuF4ozP9tqIM2twFANPvabPFO9wvMTYXLQfh8QD46knAfpuMN EmVCvgfqXLC0BwOPAqhj24425FF98V2EcIEOFDvxhjDl/LYym/D80JGuM/astu89Q6QU jQ1x6wNKProSzpJHYNZO6b5d3UDcgJ43ManuVMdqQesg6SEmz8qyfYE7gW/uUJ+VtfD2 SGccTg91+1RR0uB/lUsQDCp+VfhPgSN2UrxntP3WOOz1d226AyI5+uFud9KZVI/a73Qc r0bYtcmwIo/L4Wxt7QZiVUe1rMqML0+AgIAEWOKw9C+hCUdzedpRdcFe9cDabgssblUf 5kyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HSBGzyNlTheaTP9Pm689kFtenx8ASuk2y6uL2Tc/WCo=; b=ONQPZMAblrPGjq2d1MlH0Hs75xR3xCBjmDsnYEuAR2CJc7GBUlZWO1DoIN+zuzfvrx LdfoAYVfxVMaEyPoziTpd7Zxg/WRTbGP7mr9FT5w482Qni95tyxjfHMreOX5zOUieVgu sPNQUyf23AHmGen9H3qKEqDmTwg/qkEaQU1/2J9hpBiHAn1GjBpbcKT0t9Wu5Tj6eBzk VuwVSaRQhWYKavAd+SVzEdSgURw2ZOE6EIJxDXD0ThNaRx43pi0cna3rlVE0FXsSJQtf yvVKpzUt1nuqQvz8T4YMLowk8G9ARlnUXxRexEcp+jDLZj3ZP3xS64Vn3jCQDU/9Q5t7 o4sQ== X-Gm-Message-State: AOAM533OplQ72dwWLzEafOXyG6HvonVW+5VvJXAxp6xOWTUP9mVNzvlp KIh/B6W7Dx+XcccA/00RicUo/Q== X-Received: by 2002:a7b:cb92:: with SMTP id m18mr2732673wmi.35.1612960171708; Wed, 10 Feb 2021 04:29:31 -0800 (PST) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id m18sm11864608wmq.1.2021.02.10.04.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 04:29:31 -0800 (PST) Date: Wed, 10 Feb 2021 12:29:29 +0000 From: Daniel Thompson To: "Maciej W. Rozycki" Cc: Arnd Bergmann , Thomas Bogendoerfer , Arnd Bergmann , kernel test robot , Jiaxun Yang , Paul Cercueil , Paul Burton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] MIPS: make kgdb depend on FPU support Message-ID: <20210210122929.rgqfkoop4rsso3yo@maple.lan> References: <20210122110307.934543-1-arnd@kernel.org> <20210122110307.934543-2-arnd@kernel.org> <20210210113830.xeechzpctz5repv5@maple.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 01:11:28PM +0100, Maciej W. Rozycki wrote: > On Wed, 10 Feb 2021, Daniel Thompson wrote: > > > > Wrapping the relevant parts of this file into #ifdef MIPS_FP_SUPPORT > > > would be as easy though and would qualify as a proper fix given that we > > > have no XML description support for the MIPS target (so we need to supply > > > the inexistent registers in the protocol; or maybe we can return NULL in > > > `dbg_get_reg' to get them padded out in the RSP packet, I haven't checked > > > if generic KGDB code supports this feature). > > > > Returning NULL should be fine. > > > > The generic code will cope OK. The values in the f.p. registers may > > act a little odd if gdb uses a 'G' packet to set them to non-zero values > > (since kgdb will cache the values gdb sent it) but the developer > > operating the debugger will probably figure out what is going on without > > too much pain. > > Ack, thanks! > > NB if GDB sees a register padded out (FAOD it means all-x's rather than a > hex string placed throughout the respective slot) in a `g' packet, then it > will mark the register internally as "unavailable" and present it to the > receiver of the information as such rather than giving any specific value. > I don't remember offhand what the syntax for the `G' packet is in that > case; possibly GDB just sends all-zeros, and in any case you can't make > GDB write any specific value to such a register via any user > interface. kgdb doesn't track register validity and adding would be a fairly big change. Everything internally (including some of the interactions with arch code) is based on updating a binary shadow of register state which is only bin2hex'ed just before transmitting a packet. It will simply default them to zero and update them on a 'G' packet. > The way the unavailability is shown depends on the interface used, i.e. > it will be different between the `info all-registers'/`info register $reg' > commands, and the `p $reg' command (or any expression involving `$reg'), > and the MI interface. But in any case it will be unambiguous. I guess this probably does create a technical protocol violation since kgdb will reject per-register read/write for register that its report says are zero rather then invalid. Daniel.