aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-03-17 16:10:25 +0000
committerAndrew Cagney <cagney@redhat.com>2002-03-17 16:10:25 +0000
commitf66c9f11b6a343a68f2e88b23a521334e257af0b (patch)
treef59f8b338c46da66d0e4abf43e7def50b6520d73
parent444269101d8823b47b500af288fd115ca1c074d9 (diff)
downloadgdb-f66c9f11b6a343a68f2e88b23a521334e257af0b.zip
gdb-f66c9f11b6a343a68f2e88b23a521334e257af0b.tar.gz
gdb-f66c9f11b6a343a68f2e88b23a521334e257af0b.tar.bz2
* valprint.c (set_input_radix): Use input_radix.
(set_output_radix): Use output_radix. (set_input_radix_1, set_output_radix_1): Add FIXME - bad radix isn't reverted.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/valprint.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8034264..00e74c7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-17 Andrew Cagney <ac131313@redhat.com>
+
+ * valprint.c (set_input_radix): Use input_radix.
+ (set_output_radix): Use output_radix.
+ (set_input_radix_1, set_output_radix_1): Add FIXME - bad radix
+ isn't reverted.
+
2002-03-16 Andrew Cagney <ac131313@redhat.com>
* value.h (struct value): Delete field ``substring_addr''. Change
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 131769b..be22ce6 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1294,7 +1294,7 @@ val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream)
static void
set_input_radix (char *args, int from_tty, struct cmd_list_element *c)
{
- set_input_radix_1 (from_tty, *(unsigned *) c->var);
+ set_input_radix_1 (from_tty, input_radix);
}
/* ARGSUSED */
@@ -1310,6 +1310,8 @@ set_input_radix_1 (int from_tty, unsigned radix)
if (radix < 2)
{
+ /* FIXME: cagney/2002-03-17: This needs to revert the bad radix
+ value. */
error ("Nonsense input radix ``decimal %u''; input radix unchanged.",
radix);
}
@@ -1325,7 +1327,7 @@ set_input_radix_1 (int from_tty, unsigned radix)
static void
set_output_radix (char *args, int from_tty, struct cmd_list_element *c)
{
- set_output_radix_1 (from_tty, *(unsigned *) c->var);
+ set_output_radix_1 (from_tty, output_radix);
}
static void
@@ -1345,6 +1347,8 @@ set_output_radix_1 (int from_tty, unsigned radix)
output_format = 'o'; /* octal */
break;
default:
+ /* FIXME: cagney/2002-03-17: This needs to revert the bad radix
+ value. */
error ("Unsupported output radix ``decimal %u''; output radix unchanged.",
radix);
}