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]

Re: [RFA] Register Types: float and double


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

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