Use scoped_value_mark in dwarf2_evaluate_loc_desc_full
[deliverable/binutils-gdb.git] / gdb / value.h
index 0c5ab284b3b6c7addca29cc5b1b45aa60debc7fa..c57ea7979e05d6118b5b3478c96602b0ecececee 100644 (file)
@@ -728,7 +728,17 @@ class scoped_value_mark
 
   ~scoped_value_mark ()
   {
-    value_free_to_mark (m_value);
+    free_to_mark ();
+  }
+
+  /* Free the values currently on the value stack.  */
+  void free_to_mark ()
+  {
+    if (m_value != NULL)
+      {
+       value_free_to_mark (m_value);
+       m_value = NULL;
+      }
   }
 
  private:
This page took 0.023076 seconds and 4 git commands to generate.