aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-05-12 08:05:52 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-05-12 08:05:52 +0000
commit2d90c72afecf3529ed5e08ed3d53e66aff4cb06a (patch)
tree10a54bc8fd425d3e7d6ca8c4d152de4b58c1348e
parent17f2d8437527041aed9f34c3d3d0a3c19b0fc344 (diff)
downloadgdb-2d90c72afecf3529ed5e08ed3d53e66aff4cb06a.zip
gdb-2d90c72afecf3529ed5e08ed3d53e66aff4cb06a.tar.gz
gdb-2d90c72afecf3529ed5e08ed3d53e66aff4cb06a.tar.bz2
* c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
pushing it on the output obstack.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/c-lang.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 92c47a1..3780632 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-12 Joel Brobecker <brobecker@adacore.com>
+
+ * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
+ pushing it on the output obstack.
+
2009-05-11 Joel Brobecker <brobecker@adacore.com>
Fix internal error on breaking at a multi-locations caller source line.
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 027e9b2..f95c98f 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -166,9 +166,11 @@ print_wchar (gdb_wint_t w, const gdb_byte *orig, int orig_len,
&& w != LCST ('8')
&& w != LCST ('9'))))
{
+ gdb_wchar_t wchar = (gdb_wchar_t) w;
+
if (w == gdb_btowc (quoter) || w == LCST ('\\'))
obstack_grow_wstr (output, LCST ("\\"));
- obstack_grow (output, &w, sizeof (gdb_wchar_t));
+ obstack_grow (output, &wchar, sizeof (gdb_wchar_t));
}
else
{