gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 16 Sep 2010 19:20:51 +0000 (19:20 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 16 Sep 2010 19:20:51 +0000 (19:20 +0000)
* charset.c (wchar_iterate) <EILSEQ>: Return any possibly converted
characters.

gdb/ChangeLog
gdb/charset.c

index 85e69738b340c0ee64b674a3596e069371ddd67c..9d6b886ac2532c9ae73ebcdfd99f41baef5693f2 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * charset.c (wchar_iterate) <EILSEQ>: Return any possibly converted
+       characters.
+
 2010-09-16  Phil Muldoon  <pmuldoon@redhat.com>
 
        PR mi/11407
index 32742190865455d44e393b101af3ff83e2e5784e..90d5717b57377c35e7d85f72fb93f6ab95435d6a 100644 (file)
@@ -648,8 +648,13 @@ wchar_iterate (struct wchar_iterator *iter,
          switch (errno)
            {
            case EILSEQ:
-             /* Invalid input sequence.  Skip it, and let the caller
-                know about it.  */
+             /* Invalid input sequence.  We still might have converted a
+                character; if so, return it.  */
+             if (out_avail < out_request * sizeof (gdb_wchar_t))
+               break;
+             
+             /* Otherwise skip the first invalid character, and let the
+                caller know about it.  */
              *out_result = wchar_iterate_invalid;
              *ptr = iter->input;
              *len = iter->width;
This page took 0.045456 seconds and 4 git commands to generate.