public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-vla: Disable the types garbage collector as its varobj part is missing.  - https://bugzilla.redhat.com/show_bug.cgi?id=682286
@ 2011-03-05  6:04 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-03-05  6:04 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-vla has been updated
       via  e26f1c45c667707092c9955842cfdb1d095a7c85 (commit)
      from  530ce8bb0aeeb513f566da7a7fae46d6414f8dc1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit e26f1c45c667707092c9955842cfdb1d095a7c85
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sat Mar 5 07:04:11 2011 +0100

    Disable the types garbage collector as its varobj part is missing.
     - https://bugzilla.redhat.com/show_bug.cgi?id=682286

-----------------------------------------------------------------------

Summary of changes:
 gdb/breakpoint.c      |    4 ++++
 gdb/doc/observer.texi |    8 ++++----
 gdb/gdbtypes.c        |   12 ++++++++++++
 gdb/gdbtypes.h        |    8 ++++++++
 gdb/parse.c           |    2 ++
 gdb/parser-defs.h     |    2 ++
 gdb/printcmd.c        |    4 ++++
 gdb/python/py-type.c  |   10 ++++++++++
 gdb/python/py-value.c |    4 ++++
 gdb/top.c             |    2 ++
 gdb/value.c           |    6 ++++++
 11 files changed, 58 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 835b612..125e96b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -12100,6 +12100,7 @@ all_tracepoints ()
   return tp_vec;
 }
 
+#if 0
 /* Call type_mark_used for any TYPEs referenced from this GDB source file.  */
 
 static void
@@ -12115,6 +12116,7 @@ breakpoint_types_mark_used (void)
 	type_mark_used (value_type (b->val));
     }
 }
+#endif
 
 \f
 /* This help string is used for the break, hbreak, tbreak and thbreak
@@ -12737,5 +12739,7 @@ inferior in all-stop mode, gdb behaves as if always-inserted mode is off."),
   automatic_hardware_breakpoints = 1;
 
   observer_attach_about_to_proceed (breakpoint_about_to_proceed);
+#if 0
   observer_attach_mark_used (breakpoint_types_mark_used);
+#endif
 }
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index d8d24d9..946ad95 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -223,10 +223,10 @@ Bytes from @var{data} to @var{data} + @var{len} have been written
 to the current inferior at @var{addr}.
 @end deftypefun
 
-@deftypefun void mark_used (void)
-Mark any possibly reclaimable objects as used during a mark-and-sweep garbage
-collector pass.  Currently only @code{type_mark_used} marker is supported.
-@end deftypefun
+@c @deftypefun void mark_used (void)
+@c Mark any possibly reclaimable objects as used during a mark-and-sweep garbage
+@c collector pass.  Currently only @code{type_mark_used} marker is supported.
+@c @end deftypefun
 
 @deftypefun void test_notification (int @var{somearg})
 This observer is used for internal testing.  Do not use.  
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index e3b9eac..ea1422c 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -150,11 +150,13 @@ static void print_cplus_stuff (struct type *, int);
 static LONGEST type_length_get (struct type *type, struct type *target_type,
 				int full_span);
 
+#if 0
 /* The hash table holding all discardable `struct type *' references.  */
 static htab_t type_discardable_table;
 
 /* Current type_discardable_check pass used for TYPE_DISCARDABLE_AGE.  */
 static int type_discardable_age_current;
+#endif
 
 /* Allocate a new OBJFILE-associated type structure and fill it
    with some defaults.  Space for the type structure is allocated
@@ -185,6 +187,7 @@ alloc_type (struct objfile *objfile)
   return type;
 }
 
+#if 0
 /* Declare TYPE as discardable on next garbage collection by free_all_types.
    You must call type_mark_used during each free_all_types to protect TYPE from
    being deallocated.  */
@@ -203,6 +206,7 @@ set_type_as_discardable (struct type *type)
   gdb_assert (!*slot);
   *slot = type;
 }
+#endif
 
 /* Allocate a new type like alloc_type but preserve for it the discardability
    state of PARENT_TYPE.  */
@@ -212,8 +216,10 @@ alloc_type_as_parent (struct type *parent_type)
 {
   struct type *new_type = alloc_type_copy (parent_type);
 
+#if 0
   if (TYPE_DISCARDABLE (parent_type))
     set_type_as_discardable (new_type);
+#endif
 
   return new_type;
 }
@@ -3462,11 +3468,13 @@ copy_type_recursive_1 (struct objfile *objfile,
   TYPE_OBJFILE_OWNED (new_type) = 0;
   TYPE_OWNER (new_type).gdbarch = get_type_arch (type);
 
+#if 0
   /* TYPE_MAIN_TYPE memory copy above rewrote the TYPE_DISCARDABLE flag so we
      need to initialize it again.  And even if TYPE was already discardable
      NEW_TYPE so far is not registered in TYPE_DISCARDABLE_TABLE.  */
   TYPE_DISCARDABLE (new_type) = 0;
   set_type_as_discardable (new_type);
+#endif
 
   /* Pre-clear the fields processed by delete_main_type.  If DWARF block
      evaluations below call error we would leave an unfreeable TYPE.  */
@@ -3788,6 +3796,7 @@ copy_type (const struct type *type)
   return new_type;
 }
 
+#if 0
 /* Callback type for main_type_crawl.  */
 typedef int (*main_type_crawl_iter) (struct type *type, void *data);
 
@@ -3981,6 +3990,7 @@ free_all_types (void)
 
   htab_traverse (type_discardable_table, type_discardable_remove, NULL);
 }
+#endif
 
 /* Helper functions to initialize architecture-specific types.  */
 
@@ -4497,9 +4507,11 @@ _initialize_gdbtypes (void)
 {
   gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
 
+#if 0
   type_discardable_table = htab_create_alloc (20, type_discardable_hash,
 					     type_discardable_equal, NULL,
 					     xcalloc, xfree);
+#endif
 
   objfile_type_data = register_objfile_data ();
 
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 29974d1..f32495d 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -290,6 +290,7 @@ enum type_instance_flag_value
 
 #define TYPE_DECLARED_CLASS(t) (TYPE_MAIN_TYPE (t)->flag_declared_class)
 
+#if 0
 /* Define this type as being reclaimable during free_all_types.  Type is
    required to be have TYPE_OBJFILE set to NULL.  Setting this flag requires
    initializing TYPE_DISCARDABLE_AGE, see alloc_type_discardable.  */
@@ -301,6 +302,7 @@ enum type_instance_flag_value
    by TYPE_DISCARDABLE_AGE_CURRENT.  */
 
 #define TYPE_DISCARDABLE_AGE(t)	(TYPE_MAIN_TYPE (t)->flag_discardable_age)
+#endif
 
 /* Is HIGH_BOUND a low-bound relative count (1) or the high bound itself (0)?  */
 
@@ -439,8 +441,10 @@ struct main_type
   /* True if this type was declared with "class" rather than
      "struct".  */
   unsigned int flag_declared_class : 1;
+#if 0
   unsigned int flag_discardable : 1;
   unsigned int flag_discardable_age : 1;
+#endif
   unsigned int flag_dynamic : 1;
   unsigned int flag_range_high_bound_is_count : 1;
   unsigned int flag_not_allocated : 1;
@@ -1523,7 +1527,9 @@ extern int is_public_ancestor (struct type *, struct type *);
 
 extern int is_unique_ancestor (struct type *, struct value *);
 
+#if 0
 extern void type_mark_used (struct type *type);
+#endif
 
 /* Overload resolution */
 
@@ -1602,6 +1608,8 @@ extern struct type *copy_type_recursive (struct type *type,
 
 extern struct type *copy_type (const struct type *type);
 
+#if 0
 extern void free_all_types (void);
+#endif
 
 #endif /* GDBTYPES_H */
diff --git a/gdb/parse.c b/gdb/parse.c
index 2826fce..e3c5193 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1627,6 +1627,7 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile)
 
 /* Helper for exp_types_mark_used.  */
 
+#if 0
 static int
 exp_types_mark_used_iter (struct type *type, void *unused)
 {
@@ -1643,6 +1644,7 @@ exp_types_mark_used (struct expression *exp)
 {
   exp_iterate (exp, exp_types_mark_used_iter, NULL, NULL);
 }
+#endif
 
 void
 _initialize_parse (void)
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 0ee19f5..3b942c4 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -334,6 +334,8 @@ extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);
 
 extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);
 
+#if 0
 extern void exp_types_mark_used (struct expression *exp);
+#endif
 
 #endif /* PARSER_DEFS_H */
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 42b7821..0116004 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1471,6 +1471,7 @@ x_command (char *exp, int from_tty)
     }
 }
 
+#if 0
 /* Call type_mark_used for any TYPEs referenced from this GDB source file.  */
 
 static void
@@ -1485,6 +1486,7 @@ print_types_mark_used (void)
     if (d->exp)
       exp_types_mark_used (d->exp);
 }
+#endif
 
 \f
 
@@ -2887,5 +2889,7 @@ Show printing of source filename and line number with <symbol>."), NULL,
 Convert \"printf format string\", arg1, arg2, arg3, ..., argn to\n\
 a command line, and call it."));
 
+#if 0
   observer_attach_mark_used (print_types_mark_used);
+#endif
 }
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 92073f6..3f4a261 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -47,8 +47,10 @@ typedef struct pyty_type_object
   struct pyty_type_object *next;
 } type_object;
 
+#if 0
 /* First element of a doubly-linked list of TYPE_DISCARDABLE Types.  */
 static type_object *pyty_objects_discardable;
+#endif
 
 static PyTypeObject type_object_type;
 
@@ -948,6 +950,7 @@ typy_link (type_object *type_obj)
 	type_obj->next->prev = type_obj;
       set_objfile_data (objfile, typy_objfile_data_key, type_obj);
     }
+#if 0
   else if (type_obj->type && TYPE_DISCARDABLE (type_obj->type))
     {
       type_obj->next = pyty_objects_discardable;
@@ -955,6 +958,7 @@ typy_link (type_object *type_obj)
 	type_obj->next->prev = type_obj;
       pyty_objects_discardable = type_obj;
     }
+#endif
   else
     type_obj->next = NULL;
 }
@@ -973,8 +977,10 @@ typy_unlink (type_object *type_obj)
 
       set_objfile_data (objfile, typy_objfile_data_key, type_obj->next);
     }
+#if 0
   else if (pyty_objects_discardable == type_obj)
     pyty_objects_discardable = type_obj->next;
+#endif
 
   if (type_obj->next)
     type_obj->next->prev = type_obj->prev;
@@ -1023,6 +1029,7 @@ typy_dealloc (PyObject *obj)
   type_obj->ob_type->tp_free (obj);
 }
 
+#if 0
 /* Call type_mark_used for any TYPEs referenced from this GDB source file.  */
 static void
 typy_types_mark_used (void)
@@ -1034,6 +1041,7 @@ typy_types_mark_used (void)
        type_obj = type_obj->next)
     type_mark_used (type_obj->type);
 }
+#endif
 
 /* Create a new Type referring to TYPE.  */
 PyObject *
@@ -1121,7 +1129,9 @@ gdbpy_initialize_types (void)
   Py_INCREF (&field_object_type);
   PyModule_AddObject (gdb_module, "Field", (PyObject *) &field_object_type);
 
+#if 0
   observer_attach_mark_used (typy_types_mark_used);
+#endif
 }
 
 \f
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 8c08f39..35ec44e 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -1212,6 +1212,7 @@ gdbpy_is_value_object (PyObject *obj)
   return PyObject_TypeCheck (obj, &value_object_type);
 }
 
+#if 0
 /* Call type_mark_used for any TYPEs referenced from this GDB source file.  */
 
 static void
@@ -1222,6 +1223,7 @@ python_types_mark_used (void)
   for (iter = values_in_python; iter; iter = iter->next)
     type_mark_used (value_type (iter->value));
 }
+#endif
 
 void
 gdbpy_initialize_values (void)
@@ -1234,7 +1236,9 @@ gdbpy_initialize_values (void)
 
   values_in_python = NULL;
 
+#if 0
   observer_attach_mark_used (python_types_mark_used);
+#endif
 }
 
 \f
diff --git a/gdb/top.c b/gdb/top.c
index a205d00..6061b33 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -343,7 +343,9 @@ void
 prepare_execute_command (void)
 {
   free_all_values ();
+#if 0
   free_all_types ();
+#endif
 
   /* With multiple threads running while the one we're examining is
      stopped, the dcache can get stale without us being able to detect
diff --git a/gdb/value.c b/gdb/value.c
index bcfbe5d..394528c 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1516,7 +1516,9 @@ value_history_cleanup (void *unused)
 
   /* Free the unreferenced types above.  */
   free_all_values ();
+#if 0
   free_all_types ();
+#endif
 }
 \f
 /* Internal variables.  These are variables within the debugger
@@ -1996,6 +1998,7 @@ call_internal_function (struct gdbarch *gdbarch,
   return (*ifn->handler) (gdbarch, language, ifn->cookie, argc, argv);
 }
 
+#if 0
 /* Call type_mark_used for any TYPEs referenced from this GDB source file.  */
 
 static void
@@ -2025,6 +2028,7 @@ value_types_mark_used (void)
 	  type_mark_used (value_type (chunk->values[i]));
     }
 }
+#endif
 
 /* The 'function' command.  This does nothing -- it is just a
    placeholder to let "help function NAME" work.  This is also used as
@@ -3174,5 +3178,7 @@ Placeholder command for showing help on convenience functions."),
 
   make_final_cleanup (value_history_cleanup, NULL);
 
+#if 0
   observer_attach_mark_used (value_types_mark_used);
+#endif
 }


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-05  6:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05  6:04 [SCM] archer-jankratochvil-vla: Disable the types garbage collector as its varobj part is missing. - https://bugzilla.redhat.com/show_bug.cgi?id=682286 jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).