This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA 06/12] Remove free_all_values


free_all_values is unused, so this removes it.

ChangeLog
2018-04-05  Tom Tromey  <tom@tromey.com>

	* value.h (free_all_values): Remove.
	* value.c (free_all_values): Remove.
---
 gdb/ChangeLog |  5 +++++
 gdb/value.c   | 20 --------------------
 gdb/value.h   |  2 --
 3 files changed, 5 insertions(+), 22 deletions(-)

diff --git a/gdb/value.c b/gdb/value.c
index 677ec42e63..a84c196aaa 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1638,26 +1638,6 @@ value_free_to_mark (const struct value *mark)
   all_values = val;
 }
 
-/* Free all the values that have been allocated (except for those released).
-   Call after each command, successful or not.
-   In practice this is called before each command, which is sufficient.  */
-
-void
-free_all_values (void)
-{
-  struct value *val;
-  struct value *next;
-
-  for (val = all_values; val; val = next)
-    {
-      next = val->next;
-      val->released = 1;
-      value_decref (val);
-    }
-
-  all_values = 0;
-}
-
 /* Frees all the elements in a chain of values.  */
 
 void
diff --git a/gdb/value.h b/gdb/value.h
index f7e7387ff1..2016937406 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -1053,8 +1053,6 @@ extern int unop_user_defined_p (enum exp_opcode op, struct value *arg1);
 
 extern int destructor_name_p (const char *name, struct type *type);
 
-extern void free_all_values (void);
-
 extern void free_value_chain (struct value *v);
 
 extern value_ref_ptr release_value (struct value *val);
-- 
2.13.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]