aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 1aca015..9a6d579 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -658,7 +658,11 @@ varobj_get_iterator (struct varobj *var)
{
#if HAVE_PYTHON
if (var->dynamic->pretty_printer)
- return py_varobj_get_iterator (var, var->dynamic->pretty_printer);
+ {
+ value_print_options opts;
+ varobj_formatted_print_options (&opts, var->format);
+ return py_varobj_get_iterator (var, var->dynamic->pretty_printer, &opts);
+ }
#endif
gdb_assert_not_reached ("requested an iterator from a non-dynamic varobj");
@@ -2146,6 +2150,8 @@ varobj_value_get_print_value (struct value *value,
string_file stb;
std::string thevalue;
+ varobj_formatted_print_options (&opts, format);
+
#if HAVE_PYTHON
if (gdb_python_initialized)
{
@@ -2166,7 +2172,8 @@ varobj_value_get_print_value (struct value *value,
gdbpy_ref<> output = apply_varobj_pretty_printer (value_formatter,
&replacement,
- &stb);
+ &stb,
+ &opts);
/* If we have string like output ... */
if (output != NULL)
@@ -2225,8 +2232,6 @@ varobj_value_get_print_value (struct value *value,
}
#endif
- varobj_formatted_print_options (&opts, format);
-
/* If the THEVALUE has contents, it is a regular string. */
if (!thevalue.empty ())
current_language->printstr (&stb, type, (gdb_byte *) thevalue.c_str (),