Automatic date update in version.in
[deliverable/binutils-gdb.git] / gdb / varobj.c
index 17cfe4bdc3a4616b8f33cd7fddcaad41e355744a..b2975be6b774703587725b9e9465c9b78c2431ca 100644 (file)
@@ -1,6 +1,6 @@
 /* Implementation of the GDB variable objects API.
 
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 #include "gdb_regex.h"
 
 #include "varobj.h"
-#include "vec.h"
+#include "common/vec.h"
 #include "gdbthread.h"
 #include "inferior.h"
 #include "varobj-iter.h"
@@ -35,7 +35,6 @@
 #if HAVE_PYTHON
 #include "python/python.h"
 #include "python/python-internal.h"
-#include "python/py-ref.h"
 #else
 typedef int PyObject;
 #endif
@@ -310,13 +309,13 @@ varobj_create (const char *objname,
        }
 
       p = expression;
-      innermost_block.reset (INNERMOST_BLOCK_FOR_SYMBOLS
-                            | INNERMOST_BLOCK_FOR_REGISTERS);
       /* Wrap the call to parse expression, so we can 
          return a sensible error.  */
       TRY
        {
-         var->root->exp = parse_exp_1 (&p, pc, block, 0);
+         var->root->exp = parse_exp_1 (&p, pc, block, 0,
+                                       INNERMOST_BLOCK_FOR_SYMBOLS
+                                       | INNERMOST_BLOCK_FOR_REGISTERS);
        }
 
       CATCH (except, RETURN_MASK_ERROR)
@@ -761,7 +760,7 @@ update_dynamic_varobj_children (struct varobj *var,
          /* Release vitem->value so its lifetime is not bound to the
             execution of a command.  */
          if (item != NULL && item->value != NULL)
-           release_value (item->value).release ();
+           item->value = release_value (item->value).release ();
        }
 
       if (item == NULL)
@@ -1128,7 +1127,7 @@ install_default_visualizer (struct varobj *var)
        }
 
       if (pretty_printer == Py_None)
-       pretty_printer.release ();
+       pretty_printer.reset (nullptr);
   
       install_visualizer (var->dynamic, NULL, pretty_printer.release ());
     }
This page took 0.02432 seconds and 4 git commands to generate.