* exec.c (xfer_memory): Add attrib argument.
[deliverable/binutils-gdb.git] / gdb / jv-valprint.c
index 6fd1691b2e7aebb2e0862d754ad7510fc39fb41e..758e1f621838a90a275e7f5dc408ea20bdc93b52 100644 (file)
@@ -96,8 +96,9 @@ java_value_print (value_ptr val, struct ui_file *stream, int format,
 
          while (i < length && things_printed < print_max)
            {
-             char buf[TARGET_PTR_BIT / HOST_CHAR_BIT];
+             char *buf;
 
+             buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
              fputs_filtered (", ", stream);
              wrap_here (n_spaces (2));
 
@@ -197,9 +198,10 @@ java_value_print (value_ptr val, struct ui_file *stream, int format,
   if (TYPE_CODE (type) == TYPE_CODE_PTR
       && TYPE_TARGET_TYPE (type)
       && TYPE_NAME (TYPE_TARGET_TYPE (type))
-    && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0
+      && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "java.lang.String") == 0
       && (format == 0 || format == 's')
-      && address != 0)
+      && address != 0
+      && value_as_pointer (val) != 0)
     {
       value_ptr data_val;
       CORE_ADDR data;
This page took 0.023165 seconds and 4 git commands to generate.