aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2010-04-21 23:21:04 +0000
committerPierre Muller <muller@sourceware.org>2010-04-21 23:21:04 +0000
commit9a22f0d0aeec70f4ee1908008f3a2defaad6f7dd (patch)
treea36134950efba04d0c0104c79b7714b47e7e5d49 /gdb/gdbtypes.c
parent32d7376d07d6b1ae69b5e15d6b546a07f9fee446 (diff)
downloadgdb-9a22f0d0aeec70f4ee1908008f3a2defaad6f7dd.zip
gdb-9a22f0d0aeec70f4ee1908008f3a2defaad6f7dd.tar.gz
gdb-9a22f0d0aeec70f4ee1908008f3a2defaad6f7dd.tar.bz2
gdb ChangeLog
* gdbtypes.h (builtin_type): Add builtin_char16 and builtin_char32 fields. * gdbtypes.c (gdbtypes_post_init): Set builtin_char16 and builtin_char32 fields. * printcmd.c (decode_format): Set char size to '\0' for strings unless explicit size is given. (print_formatted): Correct calculation of NEXT_ADDRESS for 16 or 32 bit strings. (do_examine): Do not force byte size for strings. Use builtin_char16 and builtin_char32 types to display 16 or 32 bit-wide strings. (x_command): Set LAST_SIZE to 'b' for string type. gdb/doc ChangeLog * gdb.texinfo (Examining memory): Update for change in string display with explicit size. gdb/testsuite ChangeLog * gdb.base/charset.c (Strin16, String32): New variables. * gdb.base/charset.exp (gdb_test): Test correct display of 16 or 32 bit strings.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index f6de878..a40b717 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -3474,6 +3474,13 @@ gdbtypes_post_init (struct gdbarch *gdbarch)
TYPE_NOTTEXT (builtin_type->builtin_int8) = 1;
TYPE_NOTTEXT (builtin_type->builtin_uint8) = 1;
+ /* Wide character types. */
+ builtin_type->builtin_char16
+ = arch_integer_type (gdbarch, 16, 0, "char16_t");
+ builtin_type->builtin_char32
+ = arch_integer_type (gdbarch, 32, 0, "char32_t");
+
+
/* Default data/code pointer types. */
builtin_type->builtin_data_ptr
= lookup_pointer_type (builtin_type->builtin_void);