gdb
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index e18f173ad1a49b492173b7efd9c097fcf7519ebd..027e9b292fb21f76e01d2db4a25975ebf6d346c4 100644 (file)
@@ -296,7 +296,7 @@ c_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
   obstack_init (&output);
   make_cleanup_obstack_free (&output);
 
-  convert_between_encodings ("wchar_t", host_charset (),
+  convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
                             obstack_base (&wchar_buf),
                             obstack_object_size (&wchar_buf),
                             1, &output, translit_char);
@@ -562,7 +562,7 @@ c_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
   obstack_init (&output);
   make_cleanup_obstack_free (&output);
 
-  convert_between_encodings ("wchar_t", host_charset (),
+  convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
                             obstack_base (&wchar_buf),
                             obstack_object_size (&wchar_buf),
                             1, &output, translit_char);
@@ -941,7 +941,15 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp,
        *pos += 2;
 
        if (noside == EVAL_SKIP)
-         return NULL;
+         {
+           /* Return a dummy value of the appropriate type.  */
+           if ((dest_type & C_CHAR) != 0)
+             result = allocate_value (type);
+           else
+             result = value_typed_string ("", 0, type);
+           do_cleanups (cleanup);
+           return result;
+         }
 
        if ((dest_type & C_CHAR) != 0)
          {
This page took 0.024022 seconds and 4 git commands to generate.