public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Register Types: float and double
@ 2000-11-29 13:02 Larry Smith
  2000-11-29 13:32 ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Smith @ 2000-11-29 13:02 UTC (permalink / raw)
  To: insight

The request was to add "float" and "double" to the list
of formats for register display.

Since the value displayed for the registers is actually
obtained by passing the appropriate format character to
a sprintf call, any floats have already been converted
to doubles, so only double support makes sense in this
context.  So the fix merely adds "Double" to the list
of supported formats.

2000-11-29  Larry Smith <lsmith@redhat.com>

        * regwin.itb (build_win,but3): Added "Double" menu entry to
        permit selection of "f" format for register display.

Index: regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.6
diff -u -r1.6 regwin.itb
--- regwin.itb	2000/05/04 16:08:37	1.6
+++ regwin.itb	2000/11/29 20:58:23
@@ -185,6 +185,8 @@
       -command "$this update"
     $f add radio -label "Raw" -value r -underline 0 -state disabled \
       -command "$this update"
+    $f add radio -label "Double" -value f -underline 0 -state disabled \
+      -command "$this update"
     $m add command -label "Remove from Display" -underline 0 -state disabled
     $m add separator
     $m add command -label "Add to Watch" -underline 7 -state disabled
@@ -365,7 +367,7 @@
     set selected -1
     $itk_interior.m.reg entryconfigure 0 -state disabled
     $itk_interior.m.reg entryconfigure 2 -state disabled
-    for {set i 0} {$i < 6} {incr i} {
+    for {set i 0} {$i < 7} {incr i} {
       $itk_interior.m.reg.format entryconfigure $i -state disabled
     }
     return
@@ -388,7 +390,7 @@
   } else {
     set state normal
   }
-  for {set i 0} {$i < 6} {incr i} {
+  for {set i 0} {$i < 7} {incr i} {
     debug "RegWin format $i $state"
     $itk_interior.m.reg.format entryconfigure $i -state $state \
       -variable reg_display($r,format)
@@ -470,6 +472,8 @@
         -value o -variable reg_display($rn,format)
       $Menu add radio -label "Raw" -command "$this update" \
         -value r -variable reg_display($rn,format)
+      $Menu add radio -label "Double" -command "$this update" \
+        -value f -variable reg_display($rn,format)
       $Menu add separator
     }
     $Menu add command  -command "$this addToWatch $rn" \

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

* Re: [RFA] Register Types: float and double
  2000-11-29 13:02 [RFA] Register Types: float and double Larry Smith
@ 2000-11-29 13:32 ` Fernando Nasser
  2000-11-29 14:00   ` Larry Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2000-11-29 13:32 UTC (permalink / raw)
  To: Larry Smith; +Cc: insight

Larry Smith wrote:
> 
> The request was to add "float" and "double" to the list
> of formats for register display.
> 
> Since the value displayed for the registers is actually
> obtained by passing the appropriate format character to
> a sprintf call, any floats have already been converted
> to doubles, so only double support makes sense in this
> context.  So the fix merely adds "Double" to the list
> of supported formats.
> 

We should call it "Floating Point" (as opposed to Decimal, Octal, Binary).

Our options are not the actual C formats.

It will satisfy your original request as well.

Fernando



> 2000-11-29  Larry Smith <lsmith@redhat.com>
> 
>         * regwin.itb (build_win,but3): Added "Double" menu entry to
>         permit selection of "f" format for register display.
> 
> Index: regwin.itb
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
> retrieving revision 1.6
> diff -u -r1.6 regwin.itb
> --- regwin.itb  2000/05/04 16:08:37     1.6
> +++ regwin.itb  2000/11/29 20:58:23
> @@ -185,6 +185,8 @@
>        -command "$this update"
>      $f add radio -label "Raw" -value r -underline 0 -state disabled \
>        -command "$this update"
> +    $f add radio -label "Double" -value f -underline 0 -state disabled \
> +      -command "$this update"
>      $m add command -label "Remove from Display" -underline 0 -state disabled
>      $m add separator
>      $m add command -label "Add to Watch" -underline 7 -state disabled
> @@ -365,7 +367,7 @@
>      set selected -1
>      $itk_interior.m.reg entryconfigure 0 -state disabled
>      $itk_interior.m.reg entryconfigure 2 -state disabled
> -    for {set i 0} {$i < 6} {incr i} {
> +    for {set i 0} {$i < 7} {incr i} {
>        $itk_interior.m.reg.format entryconfigure $i -state disabled
>      }
>      return
> @@ -388,7 +390,7 @@
>    } else {
>      set state normal
>    }
> -  for {set i 0} {$i < 6} {incr i} {
> +  for {set i 0} {$i < 7} {incr i} {
>      debug "RegWin format $i $state"
>      $itk_interior.m.reg.format entryconfigure $i -state $state \
>        -variable reg_display($r,format)
> @@ -470,6 +472,8 @@
>          -value o -variable reg_display($rn,format)
>        $Menu add radio -label "Raw" -command "$this update" \
>          -value r -variable reg_display($rn,format)
> +      $Menu add radio -label "Double" -command "$this update" \
> +        -value f -variable reg_display($rn,format)
>        $Menu add separator
>      }
>      $Menu add command  -command "$this addToWatch $rn" \

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

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

* Re: [RFA] Register Types: float and double
  2000-11-29 13:32 ` Fernando Nasser
@ 2000-11-29 14:00   ` Larry Smith
  2000-11-29 14:04     ` Fernando Nasser
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Smith @ 2000-11-29 14:00 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: insight

Fernando Nasser wrote:

> Larry Smith wrote:
> >
> > The request was to add "float" and "double" to the list
> > of formats for register display.
> >
> > Since the value displayed for the registers is actually
> > obtained by passing the appropriate format character to
> > a sprintf call, any floats have already been converted
> > to doubles, so only double support makes sense in this
> > context.  So the fix merely adds "Double" to the list
> > of supported formats.

> We should call it "Floating Point" (as opposed to Decimal, Octal, Binary).
> Our options are not the actual C formats.
> It will satisfy your original request as well.

Easier done than said, Fernando.  Approved with that
change?



2000-11-29  Larry Smith <lsmith@redhat.com>

        * regwin.itb (build_win,but3): Added "Double" menu entry to
        permit selection of "f" format for register display.

Index: regwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.6
diff -u -r1.6 regwin.itb
--- regwin.itb  2000/05/04 16:08:37     1.6
+++ regwin.itb  2000/11/29 21:58:34
@@ -185,6 +185,8 @@
       -command "$this update"
     $f add radio -label "Raw" -value r -underline 0 -state disabled \
       -command "$this update"
+    $f add radio -label "Floating Point" -value f -underline 0 -state
disabled \
+      -command "$this update"
     $m add command -label "Remove from Display" -underline 0 -state
disabled
     $m add separator
     $m add command -label "Add to Watch" -underline 7 -state disabled
@@ -365,7 +367,7 @@
     set selected -1
     $itk_interior.m.reg entryconfigure 0 -state disabled
     $itk_interior.m.reg entryconfigure 2 -state disabled
-    for {set i 0} {$i < 6} {incr i} {
+    for {set i 0} {$i < 7} {incr i} {
       $itk_interior.m.reg.format entryconfigure $i -state disabled
     }
     return
@@ -388,7 +390,7 @@
   } else {
     set state normal
   }
-  for {set i 0} {$i < 6} {incr i} {
+  for {set i 0} {$i < 7} {incr i} {
     debug "RegWin format $i $state"
     $itk_interior.m.reg.format entryconfigure $i -state $state \
       -variable reg_display($r,format)
@@ -470,6 +472,8 @@
         -value o -variable reg_display($rn,format)
       $Menu add radio -label "Raw" -command "$this update" \
         -value r -variable reg_display($rn,format)
+      $Menu add radio -label "Floating Point" -command "$this update" \
+        -value f -variable reg_display($rn,format)
       $Menu add separator
     }
     $Menu add command  -command "$this addToWatch $rn" \

regards,
-- 
 .-.    .-. .---. .---. .-..-. | "Bill Gates is just a monocle
 | |__ / | \| |-< | |-<  >  /  | and a Persian Cat away from
 `----'`-^-'`-'`-'`-'`-' `-'   | being one of the bad guys in a
       My opinions only.       | James Bond movie." -- D Miller

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

* Re: [RFA] Register Types: float and double
  2000-11-29 14:00   ` Larry Smith
@ 2000-11-29 14:04     ` Fernando Nasser
  2000-11-29 14:09       ` Larry Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Fernando Nasser @ 2000-11-29 14:04 UTC (permalink / raw)
  To: lsmith; +Cc: insight

Larry Smith wrote:
> 
> Fernando Nasser wrote:
> 
> > Larry Smith wrote:
> > >
> > > The request was to add "float" and "double" to the list
> > > of formats for register display.
> > >
> > > Since the value displayed for the registers is actually
> > > obtained by passing the appropriate format character to
> > > a sprintf call, any floats have already been converted
> > > to doubles, so only double support makes sense in this
> > > context.  So the fix merely adds "Double" to the list
> > > of supported formats.
> 
> > We should call it "Floating Point" (as opposed to Decimal, Octal, Binary).
> > Our options are not the actual C formats.
> > It will satisfy your original request as well.
> 
> Easier done than said, Fernando.  Approved with that
> change?
> 

Absolutely.  Please check it in.

And thank you for the new feature (we can call it "unnatural format" among 
ourselves :-) ).

Regards,
Fernando


> 2000-11-29  Larry Smith <lsmith@redhat.com>
> 
>         * regwin.itb (build_win,but3): Added "Double" menu entry to
>         permit selection of "f" format for register display.
> 
> Index: regwin.itb
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/library/regwin.itb,v
> retrieving revision 1.6
> diff -u -r1.6 regwin.itb
> --- regwin.itb  2000/05/04 16:08:37     1.6
> +++ regwin.itb  2000/11/29 21:58:34
> @@ -185,6 +185,8 @@
>        -command "$this update"
>      $f add radio -label "Raw" -value r -underline 0 -state disabled \
>        -command "$this update"
> +    $f add radio -label "Floating Point" -value f -underline 0 -state
> disabled \
> +      -command "$this update"
>      $m add command -label "Remove from Display" -underline 0 -state
> disabled
>      $m add separator
>      $m add command -label "Add to Watch" -underline 7 -state disabled
> @@ -365,7 +367,7 @@
>      set selected -1
>      $itk_interior.m.reg entryconfigure 0 -state disabled
>      $itk_interior.m.reg entryconfigure 2 -state disabled
> -    for {set i 0} {$i < 6} {incr i} {
> +    for {set i 0} {$i < 7} {incr i} {
>        $itk_interior.m.reg.format entryconfigure $i -state disabled
>      }
>      return
> @@ -388,7 +390,7 @@
>    } else {
>      set state normal
>    }
> -  for {set i 0} {$i < 6} {incr i} {
> +  for {set i 0} {$i < 7} {incr i} {
>      debug "RegWin format $i $state"
>      $itk_interior.m.reg.format entryconfigure $i -state $state \
>        -variable reg_display($r,format)
> @@ -470,6 +472,8 @@
>          -value o -variable reg_display($rn,format)
>        $Menu add radio -label "Raw" -command "$this update" \
>          -value r -variable reg_display($rn,format)
> +      $Menu add radio -label "Floating Point" -command "$this update" \
> +        -value f -variable reg_display($rn,format)
>        $Menu add separator
>      }
>      $Menu add command  -command "$this addToWatch $rn" \
> 
> regards,
> --
>  .-.    .-. .---. .---. .-..-. | "Bill Gates is just a monocle
>  | |__ / | \| |-< | |-<  >  /  | and a Persian Cat away from
>  `----'`-^-'`-'`-'`-'`-' `-'   | being one of the bad guys in a
>        My opinions only.       | James Bond movie." -- D Miller

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

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

* Re: [RFA] Register Types: float and double
  2000-11-29 14:04     ` Fernando Nasser
@ 2000-11-29 14:09       ` Larry Smith
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Smith @ 2000-11-29 14:09 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: lsmith, insight

Fernando Nasser wrote:

> Larry Smith wrote:

> > Easier done than said, Fernando.  Approved with that
> > change?

> Absolutely.  Please check it in.

Done.

regards,
-- 
 .-.    .-. .---. .---. .-..-. | "Bill Gates is just a monocle
 | |__ / | \| |-< | |-<  >  /  | and a Persian Cat away from
 `----'`-^-'`-'`-'`-'`-' `-'   | being one of the bad guys in a
       My opinions only.       | James Bond movie." -- D Miller

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

end of thread, other threads:[~2000-11-29 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-29 13:02 [RFA] Register Types: float and double Larry Smith
2000-11-29 13:32 ` Fernando Nasser
2000-11-29 14:00   ` Larry Smith
2000-11-29 14:04     ` Fernando Nasser
2000-11-29 14:09       ` Larry Smith

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).