public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* floating point registers in 'info reg'
@ 2001-01-09 14:50 J.T. Conklin
  2001-01-09 15:11 ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: J.T. Conklin @ 2001-01-09 14:50 UTC (permalink / raw)
  To: gdb

While just a nit, this has been bothering me for some time.  

The 'info reg' command is supposed to output only non-fpu registers,
but it uses the following expression to determine whether a register
is floating point:

        TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT

which means that FPU control and status registers are output.  Is
there a better way to determine which registers are FP and which are
not?

        --jtc

-- 
J.T. Conklin
RedBack Networks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: floating point registers in 'info reg'
  2001-01-09 14:50 floating point registers in 'info reg' J.T. Conklin
@ 2001-01-09 15:11 ` Fernando Nasser
  2001-01-09 15:18   ` J.T. Conklin
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-01-09 15:11 UTC (permalink / raw)
  To: jtc; +Cc: gdb

"J.T. Conklin" wrote:
> 
> While just a nit, this has been bothering me for some time.
> 
> The 'info reg' command is supposed to output only non-fpu registers,
> but it uses the following expression to determine whether a register
> is floating point:
> 
>         TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT
> 
> which means that FPU control and status registers are output.  Is
> there a better way to determine which registers are FP and which are
> not?
> 

Well, the problem is that FPU control and status registers should not
have TYPE_CODE_FLT as virtual type.  The data FPU registers are,
but not the control ones.

Maybe you can just fix your architecture's REGISTER_VIRTUAL_TYPE
function
(or macro if it is an old one).

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: floating point registers in 'info reg'
  2001-01-09 15:11 ` Fernando Nasser
@ 2001-01-09 15:18   ` J.T. Conklin
  2001-01-09 16:25     ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: J.T. Conklin @ 2001-01-09 15:18 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: gdb

>>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:
>> While just a nit, this has been bothering me for some time.
>> 
>> The 'info reg' command is supposed to output only non-fpu registers,
>> but it uses the following expression to determine whether a register
>> is floating point:
>> 
>> TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT
>> 
>> which means that FPU control and status registers are output.  Is
>> there a better way to determine which registers are FP and which are
>> not?

Fernando> Well, the problem is that FPU control and status registers
Fernando> should not have TYPE_CODE_FLT as virtual type.  The data FPU
Fernando> registers are, but not the control ones.

That's not the problem.  For example, on the x86, the fctrl, fstat,
ftag, ... registers don't have TYPE_CODE_FLT as a virtual type.  But
since that test is used to determine whether a register is considered
to be a floating point register, "info reg" will output the values of
those registers.  On those targets that a separate command to fetch FP
registers, this adds additional command latency.

        --jtc

-- 
J.T. Conklin
RedBack Networks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: floating point registers in 'info reg'
  2001-01-09 15:18   ` J.T. Conklin
@ 2001-01-09 16:25     ` Fernando Nasser
  2001-01-09 19:28       ` Nick Duffek
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2001-01-09 16:25 UTC (permalink / raw)
  To: jtc; +Cc: gdb

"J.T. Conklin" wrote:
> 
> >>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:
> >> While just a nit, this has been bothering me for some time.
> >>
> >> The 'info reg' command is supposed to output only non-fpu registers,
> >> but it uses the following expression to determine whether a register
> >> is floating point:
> >>
> >> TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT
> >>
> >> which means that FPU control and status registers are output.  Is
> >> there a better way to determine which registers are FP and which are
> >> not?
> 
> Fernando> Well, the problem is that FPU control and status registers
> Fernando> should not have TYPE_CODE_FLT as virtual type.  The data FPU
> Fernando> registers are, but not the control ones.
> 
> That's not the problem.  For example, on the x86, the fctrl, fstat,
> ftag, ... registers don't have TYPE_CODE_FLT as a virtual type.  But
> since that test is used to determine whether a register is considered
> to be a floating point register, "info reg" will output the values of
> those registers.  On those targets that a separate command to fetch FP
> registers, this adds additional command latency.
> 

I see, the problem is exactly that they do not have this type (things
that
fail this test get printed).

The GUI also needs some classification of the registers in groups, so
they can
be more properly arranged in the register widget.  I wanted to add a few
(optional)
descriptive data to registers.

There new register description interface posted recently by Nick Duffek
is
supposed to help us add these new characterizations. 


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: floating point registers in 'info reg'
  2001-01-09 16:25     ` Fernando Nasser
@ 2001-01-09 19:28       ` Nick Duffek
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Duffek @ 2001-01-09 19:28 UTC (permalink / raw)
  To: fnasser; +Cc: gdb, jtc

On 9-Jan-2001, Fernando Nasser wrote:

>There new register description interface posted recently by Nick Duffek
>is supposed to help us add these new characterizations.

Yes, the patch as-is provides a REGS_HIDESOME flag to specify that a
register should not be displayed by "info registers" but should be
displayed by "info all-registers".  It replaces the TYPE_CODE_FLT test.

That's not immediately helpful though, because:
  (1) the patch hasn't been approved yet;
  (2) the REGS_HIDESOME functionality is applies only to multi-arched
      ports using the new interface, and the x86 port isn't multi-arched.

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-01-09 19:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-09 14:50 floating point registers in 'info reg' J.T. Conklin
2001-01-09 15:11 ` Fernando Nasser
2001-01-09 15:18   ` J.T. Conklin
2001-01-09 16:25     ` Fernando Nasser
2001-01-09 19:28       ` Nick Duffek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).