This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] Register Types: float and double



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" \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]