aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-08-13 18:39:20 +0000
committerTom Tromey <tromey@redhat.com>2009-08-13 18:39:20 +0000
commit4e7a5ef5a84e2f120a52def047ef671f8dbd7954 (patch)
tree4725f0f358a5993278ac1bde5d391739ae6740d4 /gdb/value.c
parentecd0ada520284724373d81f3580cf1e15855b737 (diff)
downloadgdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.zip
gdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.tar.gz
gdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.tar.bz2
* varobj.c (update_dynamic_varobj_children): Don't use
value_copy. * value.h: (preserve_one_value): Declare. (value_prepend_to_list, value_remove_from_list): Remove. * value.c (preserve_one_value): No longer static. (preserve_values): Call preserve_python_values. (value_prepend_to_list): Remove. (value_remove_from_list): Remove. * python/python.h (values_in_python): Don't declare. (preserve_python_values): Declare. * python/python-value.c (values_in_python): Change type. Move lower. Now static. (struct value_object): Add struct tag. <next, prev>: New fields. (valpy_dealloc): Update. (note_value): New function. (valpy_new): Use value_incref, note_value. (preserve_python_values): New function. (valpy_positive): Don't use value_copy. (value_to_value_object): Use value_incref, note_value. (convert_value_from_python): Update comment.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 65a5aa9..97f236c 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -312,31 +312,6 @@ allocate_repeat_value (struct type *type, int count)
return allocate_value (array_type);
}
-/* Needed if another module needs to maintain its on list of values. */
-void
-value_prepend_to_list (struct value **head, struct value *val)
-{
- val->next = *head;
- *head = val;
-}
-
-/* Needed if another module needs to maintain its on list of values. */
-void
-value_remove_from_list (struct value **head, struct value *val)
-{
- struct value *prev;
-
- if (*head == val)
- *head = (*head)->next;
- else
- for (prev = *head; prev->next; prev = prev->next)
- if (prev->next == val)
- {
- prev->next = val->next;
- break;
- }
-}
-
struct value *
allocate_computed_value (struct type *type,
struct lval_funcs *funcs,
@@ -1430,7 +1405,7 @@ add_internal_function (const char *name, const char *doc,
/* Update VALUE before discarding OBJFILE. COPIED_TYPES is used to
prevent cycles / duplicates. */
-static void
+void
preserve_one_value (struct value *value, struct objfile *objfile,
htab_t copied_types)
{
@@ -1490,8 +1465,7 @@ preserve_values (struct objfile *objfile)
for (var = internalvars; var; var = var->next)
preserve_one_internalvar (var, objfile, copied_types);
- for (val = values_in_python; val; val = val->next)
- preserve_one_value (val, objfile, copied_types);
+ preserve_python_values (objfile, copied_types);
htab_delete (copied_types);
}