python: Make two functions return gdbpy_ref<>
[deliverable/binutils-gdb.git] / gdb / varobj.c
index 02441410e80c3d2d56f689b98407e5a40975e309..e109926a27d481d7d438150f5a0fff9f8576c416 100644 (file)
@@ -948,6 +948,11 @@ varobj_get_path_expr_parent (const struct varobj *var)
   while (!is_root_p (parent) && !is_path_expr_parent (parent))
     parent = parent->parent;
 
+  /* Computation of full rooted expression for children of dynamic
+     varobjs is not supported.  */
+  if (varobj_is_dynamic_p (parent))
+    error (_("Invalid variable object (child of a dynamic varobj)"));
+
   return parent;
 }
 
@@ -2313,9 +2318,9 @@ varobj_value_get_print_value (struct value *value,
            {
              struct value *replacement;
 
-             gdbpy_ref<> output (apply_varobj_pretty_printer (value_formatter,
-                                                              &replacement,
-                                                              &stb));
+             gdbpy_ref<> output apply_varobj_pretty_printer (value_formatter,
+                                                               &replacement,
+                                                               &stb);
 
              /* If we have string like output ...  */
              if (output != NULL)
This page took 0.024293 seconds and 4 git commands to generate.