aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-02-21 00:05:34 +0000
committerAndrew Cagney <cagney@redhat.com>2001-02-21 00:05:34 +0000
commit1adad886b22cbd1788332c19aebfa9edd0a562dc (patch)
treeb90ca6dd67423cc4fcbee13367d9e4033e6f043e /gdb/mips-tdep.c
parent5cd4edbed2a5d9c69a90c75c1321e9ca12b6e131 (diff)
downloadgdb-1adad886b22cbd1788332c19aebfa9edd0a562dc.zip
gdb-1adad886b22cbd1788332c19aebfa9edd0a562dc.tar.gz
gdb-1adad886b22cbd1788332c19aebfa9edd0a562dc.tar.bz2
Fix printf fmt arguments.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r--gdb/mips-tdep.c42
1 files changed, 32 insertions, 10 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 94a255e..569d076 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -2677,12 +2677,25 @@ do_fp_register_row (int regnum)
flt2 = unpack_double (builtin_type_float, raw_buffer[LO], &inv2);
doub = unpack_double (builtin_type_double, dbl_buffer, &inv3);
- printf_filtered (inv1 ? " %-5s: <invalid float>" :
- " %-5s%-17.9g", REGISTER_NAME (regnum), flt1);
- printf_filtered (inv2 ? " %-5s: <invalid float>" :
- " %-5s%-17.9g", REGISTER_NAME (regnum + 1), flt2);
- printf_filtered (inv3 ? " dbl: <invalid double>\n" :
- " dbl: %-24.17g\n", doub);
+ printf_filtered (" %-5s", REGISTER_NAME (regnum));
+ if (inv1)
+ printf_filtered (": <invalid float>");
+ else
+ printf_filtered ("%-17.9g", flt1);
+
+ printf_filtered (" %-5s", REGISTER_NAME (regnum + 1));
+ if (inv2)
+ printf_filtered (": <invalid float>");
+ else
+ printf_filtered ("%-17.9g", flt2);
+
+ printf_filtered (" dbl: ");
+ if (inv3)
+ printf_filtered ("<invalid double>");
+ else
+ printf_filtered ("%-24.17g", doub);
+ printf_filtered ("\n");
+
/* may want to do hex display here (future enhancement) */
regnum += 2;
}
@@ -2695,10 +2708,19 @@ do_fp_register_row (int regnum)
&raw_buffer[HI][offset], &inv1);
doub = unpack_double (builtin_type_double, dbl_buffer, &inv3);
- printf_filtered (inv1 ? " %-5s: <invalid float>" :
- " %-5s flt: %-17.9g", REGISTER_NAME (regnum), flt1);
- printf_filtered (inv3 ? " dbl: <invalid double>\n" :
- " dbl: %-24.17g\n", doub);
+ printf_filtered (" %-5s: ", REGISTER_NAME (regnum));
+ if (inv1)
+ printf_filtered ("<invalid float>");
+ else
+ printf_filtered ("flt: %-17.9g", flt1);
+
+ printf_filtered (" dbl: ");
+ if (inv3)
+ printf_filtered ("<invalid double>");
+ else
+ printf_filtered ("%-24.17g", doub);
+
+ printf_filtered ("\n");
/* may want to do hex display here (future enhancement) */
regnum++;
}