diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-01 21:03:22 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-01 21:03:22 +0000 |
commit | 6e9130cf1b68342311a4815f4320dc75e9f3f296 (patch) | |
tree | 6399bb3485b2dbb74405a377aa3552280cb234df /gdb | |
parent | 5f01dbc03c203f4a45b48125c6ddd8700be7d8e0 (diff) | |
download | gdb-6e9130cf1b68342311a4815f4320dc75e9f3f296.zip gdb-6e9130cf1b68342311a4815f4320dc75e9f3f296.tar.gz gdb-6e9130cf1b68342311a4815f4320dc75e9f3f296.tar.bz2 |
2011-03-01 Michael Snyder <msnyder@vmware.com>
* python/py-prettyprint.c (apply_val_pretty_printer): VAL may
be null.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/python/py-prettyprint.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 24be64c..0b3490b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index 261411a..7276486 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -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); |