summaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:21:21 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:21:21 +0000
commitf7b34aae92aaafaace65b8137a6532ab4258d93e (patch)
treef02f2768ce27affbed61ab50e65519f8e67d7353 /gdb/printcmd.c
parent17cc51d1b6cf33c1481cc7a559f6617d8ad4262b (diff)
downloadgdb-f7b34aae92aaafaace65b8137a6532ab4258d93e.tar.gz
* gdbtypes.h (struct builtin_type): Remove builtin_true_char
and builtin_true_unsigned_char. (builtin_type_true_char): Remove macro, add extern declaration. (builtin_type_true_unsigned_char): Add extern declaration. * gdbtypes.c (builtin_type_true_char): New global variable. (builtin_type_true_unsigned_char): Likewise. (_initialize_gdbtypes): Initialize them. (gdbtypes_post_init): Do not initialize builtin_true_char and builtin_true_unsigned_char members of struct builtin_type. * printcmd.c (print_scalar_formatted): Do not use builtin_type; use builtin_type_true_unsigned_char instead. * ada-valprint.c (ada_val_print_1): Use builtin_type_true_char instead of builtin_type_char for internal string.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index f09dc91609c..131099475c6 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -425,13 +425,9 @@ print_scalar_formatted (const void *valaddr, struct type *type,
case 'c':
if (TYPE_UNSIGNED (type))
- {
- struct type *utype;
-
- utype = builtin_type (current_gdbarch)->builtin_true_unsigned_char;
- value_print (value_from_longest (utype, val_long),
- stream, 0, Val_pretty_default);
- }
+ value_print (value_from_longest (builtin_type_true_unsigned_char,
+ val_long),
+ stream, 0, Val_pretty_default);
else
value_print (value_from_longest (builtin_type_true_char, val_long),
stream, 0, Val_pretty_default);