lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] MIPS: make kgdb depend on FPU support
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

\
 
 \ /
  Last update: 2021-02-10 13:18    [W:0.118 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site