Fix printf of a convenience variable holding an inferior address
[deliverable/binutils-gdb.git] / gdb / printcmd.c
index 797041484eb5c74cfee17738a88b2c2da9504203..78d8d3d81e1863e7698c2ecfc68a80a1760d13de 100644 (file)
@@ -2260,7 +2260,8 @@ printf_c_string (struct ui_file *stream, const char *format,
 {
   const gdb_byte *str;
 
-  if (VALUE_LVAL (value) == lval_internalvar
+  if (TYPE_CODE (value_type (value)) != TYPE_CODE_PTR
+      && VALUE_LVAL (value) == lval_internalvar
       && c_is_string_type_p (value_type (value)))
     {
       size_t len = TYPE_LENGTH (value_type (value));
This page took 0.027428 seconds and 4 git commands to generate.