aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/guile/scm-pretty-print.c4
-rw-r--r--gdb/python/py-prettyprint.c4
3 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a05f459..591cb93 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2018-07-22 Tom Tromey <tom@tromey.com>
+ * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
+ unused variable. Call value_fetch_lazy when needed.
+ * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
+ Remove unused variable. Call value_fetch_lazy when needed.
+
+2018-07-22 Tom Tromey <tom@tromey.com>
+
* m32c-tdep.c (mark_dma): Return void.
(make_regs): Remove unused declarations.
diff --git a/gdb/guile/scm-pretty-print.c b/gdb/guile/scm-pretty-print.c
index 3fe3682..f292960 100644
--- a/gdb/guile/scm-pretty-print.c
+++ b/gdb/guile/scm-pretty-print.c
@@ -949,7 +949,9 @@ gdbscm_apply_val_pretty_printer (const struct extension_language_defn *extlang,
enum display_hint hint;
enum ext_lang_rc result = EXT_LANG_RC_NOP;
enum string_repr_result print_result;
- const gdb_byte *valaddr = value_contents_for_printing (val);
+
+ if (value_lazy (val))
+ value_fetch_lazy (val);
/* No pretty-printer support for unavailable values. */
if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 21b1ce9..a8a8489 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -662,7 +662,9 @@ gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang,
struct gdbarch *gdbarch = get_type_arch (type);
struct value *value;
enum string_repr_result print_result;
- const gdb_byte *valaddr = value_contents_for_printing (val);
+
+ if (value_lazy (val))
+ value_fetch_lazy (val);
/* No pretty-printer support for unavailable values. */
if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))