Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1259321pxb; Wed, 10 Feb 2021 04:18:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYYiC0Y5LBu7xIL7vhDn0b78/RZ0p3iLZsfxBeEwhH3CkNvbF24IYnRXROg0D6d73gwpKq X-Received: by 2002:a05:6402:3070:: with SMTP id bs16mr2870692edb.22.1612959523148; Wed, 10 Feb 2021 04:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612959523; cv=none; d=google.com; s=arc-20160816; b=jKap/kYNhrGDipcNcwgXOqIrsEG4nNtkWDExGNrTeiOa1ZbaQdwXsRwEVXwEgFA1bq 66n1NdFJVvSLKxsCrzxlW58V2RVHhicIwdcwIZ/1A6+N4/8pJ4X0lHhoN4NNvv1joOjy WSr3EvtYN9T6cY4YVwkButUXQxyAeBAolBSSmJwGr9mI5jrqO3KlFxNfsPueqY82RjbG qQKz30m1GBctEe5fDAd5a+Ow/FS5fvgWmNeV919AI9Dh0PbAQF3Y5OlrjlKaQYtiJuDE 9VF0JaHjtRRmeV9HPFMkIZ0X1b3LGPbkrYq48NMvi7MtszfAlH2ccpb0mvRGFwb0Bu5x 6TUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=y5hfw1FW6i2HqNbrCWE/vOZD05cDYCoFNT4vM1Vu1TQ=; b=vVmcIzLeAPb458PwztVtmVOVx/2Af5vBHu6ezO3HpdxOpR2jD5jItnbzqa0SrV+zUa G2qzSD87FCISvGQaujRKjQpVYxTR7ZysJA0ba+VvbPhXd4HHfdSRIorABqTlEGCvcx8S Pnb6HzLvn2KROmKO0JNGhlB9kAgnRwDKice2uj9Lcg0SoJr5e9gggdLq/GfjRkyRW6MO s+ks9IR58DynPog69Q0dhAbGY4JL8kejUCor+IaeJxDZM9uv+swUF2hCmjzPG2RwCUpr I8RTXIlT023CYLUJSfOJhFCFStPg9RtwrF/BBGwlzKk/uXNezKrEd1+VO9vM2MP1XZ+b X0qg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kx25si1231153ejc.434.2021.02.10.04.18.19; Wed, 10 Feb 2021 04:18:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231166AbhBJMQy (ORCPT + 99 others); Wed, 10 Feb 2021 07:16:54 -0500 Received: from angie.orcam.me.uk ([157.25.102.26]:47364 "EHLO angie.orcam.me.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbhBJMMQ (ORCPT ); Wed, 10 Feb 2021 07:12:16 -0500 Received: by angie.orcam.me.uk (Postfix, from userid 500) id 6D0429200B4; Wed, 10 Feb 2021 13:11:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 657BD9200B3; Wed, 10 Feb 2021 13:11:28 +0100 (CET) Date: Wed, 10 Feb 2021 13:11:28 +0100 (CET) From: "Maciej W. Rozycki" To: Daniel Thompson 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 In-Reply-To: <20210210113830.xeechzpctz5repv5@maple.lan> Message-ID: References: <20210122110307.934543-1-arnd@kernel.org> <20210122110307.934543-2-arnd@kernel.org> <20210210113830.xeechzpctz5repv5@maple.lan> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. In no case however there will be user confusion for such registers. Maciej