2011-03-01 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 21:03:22 +0000 (21:03 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 21:03:22 +0000 (21:03 +0000)
* python/py-prettyprint.c (apply_val_pretty_printer): VAL may
be null.

gdb/ChangeLog
gdb/python/py-prettyprint.c

index 24be64cac773e00dc650bc304436329eaefb8265..0b3490ba7aa7b0497fb5a1cfafcd0e279adef5f2 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-01  Michael Snyder  <msnyder@vmware.com>
 
+       * python/py-prettyprint.c (apply_val_pretty_printer): VAL may
+       be null.
+
        * linespec.c (decode_line_1): Check for null before dereference.
 
        * reverse.c (record_restore): Move null-check to before pointer
index 261411a5117910d6ab59041b04b82dd92db7cd45..727648636d152281dc0bc2e03e0f1455389eb9d3 100644 (file)
@@ -692,7 +692,8 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
   enum string_repr_result print_result;
 
   /* No pretty-printer support for unavailable values.  */
-  if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
+  if (val && !value_bytes_available (val, embedded_offset, 
+                                    TYPE_LENGTH (type)))
     return 0;
 
   cleanups = ensure_python_env (gdbarch, language);