This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: [RFA] Register Types: float and double
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: [RFA] Register Types: float and double
- From: Larry Smith <larry at smith-house dot org>
- Date: Wed, 29 Nov 2000 16:59:53 -0500
- CC: insight at sources dot redhat dot com
- Organization: Red Hat, Inc.
- References: <200011292102.QAA25232@ozma.smith-house.org> <3A2575FC.AEFF28DF@cygnus.com>
- Reply-To: lsmith at redhat dot com
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