Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: cgd@broadcom.com
To: kevinb@redhat.com
Cc: "Andrew Cagney" <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [WIP/RFC] MIPS registers overhaul
Date: Wed, 14 May 2003 23:35:00 -0000	[thread overview]
Message-ID: <yov5wugtump3.fsf@broadcom.com> (raw)
In-Reply-To: kevinb@redhat.com's message of "Wed, 14 May 2003 22:05:11 +0000 (UTC)"

At Wed, 14 May 2003 22:05:11 +0000 (UTC), "Kevin Buettner" wrote:
> > ``info registers'' should always display the target's underlying 
> > register set.  In the case of o32 running on a 64 bit ISA, the 64 bit 
> > registers should be displayed.
> 
> Well, in this case the underlying register set really is only 32-bits
> wide.  Volume 1 of the MIPS64 Architecture (revision 1.00, dated
> August 29, 2002) says:
> 
>     For compatibility with MIPS32 processors, the FR bit in the CP0
>     Status register is used by a MIPS64 processor to configure the FPU
>     in a mode in which the FPRs are treated as 32 32-bit registers,
>     each of which is capable of storing only 32-bit data types.  In
>     this mode, the double-precision floating point (type D) data type
>     is stored in even-odd pairs of FPRs, and the long-integer (type L)
>     and paired single (type PS) data types are not supported.
> 
> Figure 2-8 in this manual shows that bits 32-63 (i.e, the high 32 bits)
> are "UNPREDICTABLE" in this mode.

Indeed.


> We still *could* show these extra bits, but displaying the register in
> this way would, most of the time, be next to useless.  If the GDB user
> really wants to see what the higher order bits are, then the raw_fN
> names are useful.

One possible thing to do is display the upper 32 bits *if* you know
that Status:FR is set to 1.  The Status:FR value is really the thing
that determines how the bits are interpreted.

Now, if o32, Status:FR *should* be 0.

However, I don't know if for old binaries being debugged o64 will be
detected properly (or, heck, even for new binaries 8-), and I also
know people who've done Really Special Things with o32 and soft float
and using library calls for all FP and using 64-bit floating point.
8-)

In other words, the real arbiter of the unpredictability of those bits
is Status:FR, so you should probably display them consistently with
what it says (if you have Status... I forget 8-).



I don't know enough about the remote protocol to know what one would
expect from a 64-bit debug agent debugging a 32-bit program (on a
64-bit target).  But i could imagine it could become ugly very
quickly...  8-)


cgd


  parent reply	other threads:[~2003-05-14 23:35 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-10  0:25 Kevin Buettner
2003-05-10 20:30 ` Andrew Cagney
2003-05-10 20:40   ` Daniel Jacobowitz
2003-05-14 22:00   ` Kevin Buettner
     [not found]     ` <mailpost.1052949911.28802@news-sj1-1>
2003-05-14 23:35       ` cgd [this message]
2003-05-15  0:07         ` Kevin Buettner
2003-05-15  0:15           ` Daniel Jacobowitz
2003-05-15 22:01     ` Kevin Buettner
2003-05-16  3:24       ` Andrew Cagney
2003-05-16  4:00     ` Andrew Cagney
2003-05-16 17:20       ` Kevin Buettner
     [not found]       ` <mailpost.1053057614.17325@news-sj1-1>
2003-05-16 22:25         ` cgd
     [not found]           ` <mailpost.1053123913.16634@news-sj1-1>
2003-05-16 22:50             ` cgd
2003-05-16 23:05               ` Kevin Buettner
     [not found]                 ` <mailpost.1053126410.17856@news-sj1-1>
2003-05-16 23:24                   ` cgd
2003-05-17  0:41                     ` Kevin Buettner
2003-05-17 20:59                       ` Daniel Jacobowitz
2003-05-20 20:18                         ` Always remote: " Andrew Cagney
2003-05-20 20:26                           ` Daniel Jacobowitz
     [not found]                       ` <mailpost.1053132070.20348@news-sj1-1>
2003-05-20 20:37                         ` cgd
2003-05-20 20:51                           ` Kevin Buettner
2003-05-20 20:52                           ` Andrew Cagney
2003-05-20 21:57                             ` cgd
2003-05-21 15:34                               ` Andrew Cagney
2003-05-21 15:41                                 ` Daniel Jacobowitz
2003-05-21 16:38                                   ` Andrew Cagney
2003-05-21 16:58                                     ` Daniel Jacobowitz
2003-05-21 18:32                                       ` Kevin Buettner
2003-05-21 19:15                                         ` Andrew Cagney
2003-05-21 19:45                                           ` Kevin Buettner
2003-05-22  0:32                                           ` Daniel Jacobowitz
2003-05-23 18:39                                             ` Andrew Cagney
2003-05-23 19:02                                               ` Daniel Jacobowitz
2003-05-23 20:45                                                 ` Andrew Cagney
2003-05-20 20:25               ` Andrew Cagney
2003-05-20 20:32                 ` cgd
2003-05-21 15:40                   ` Andrew Cagney
2003-06-15  1:44                     ` Andrew Cagney
2003-06-16 18:06                       ` cgd
2003-06-16 18:47                         ` Andrew Cagney
2003-06-15 17:23                   ` Andrew Cagney
2003-06-16 20:06                     ` cgd
2003-06-16 20:41                       ` Andrew Cagney
     [not found]                         ` <mailpost.1055796186.4097@news-sj1-1>
2003-06-17  5:04                           ` cgd
2003-06-17 14:27                             ` Andrew Cagney
     [not found]                               ` <mailpost.1055860052.3406@news-sj1-1>
2003-06-17 16:27                                 ` cgd
2003-05-21 20:58 David Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yov5wugtump3.fsf@broadcom.com \
    --to=cgd@broadcom.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox