public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-python: Remove the PR 10966 workaround as the Bug is fixed now.
@ 2010-07-22  7:56 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-07-22  7:56 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-python has been updated
       via  e3a81ea4b30cb527412960526ddc67e4e26f15a2 (commit)
       via  397042847c40f0287c252e35d18224885cb782a9 (commit)
       via  7539479d6de7869b2beb835398904ae71d885426 (commit)
       via  b64c078f58de7582e1f58de29648a76ee95c6cfd (commit)
      from  f12152d739d851e1d28b59daf2a2b1ed7b769a38 (commit)

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

- Log -----------------------------------------------------------------
commit e3a81ea4b30cb527412960526ddc67e4e26f15a2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 22 09:53:58 2010 +0200

    Remove the PR 10966 workaround as the Bug is fixed now.

commit 397042847c40f0287c252e35d18224885cb782a9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 22 09:51:59 2010 +0200

    More clutter removal.

commit 7539479d6de7869b2beb835398904ae71d885426
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 22 09:49:57 2010 +0200

    Reduce the diff clutter against master.

commit b64c078f58de7582e1f58de29648a76ee95c6cfd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 22 09:40:49 2010 +0200

    Remove reference counting.

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

Summary of changes:
 gdb/breakpoint.h             |    3 -
 gdb/coffread.c               |    2 +-
 gdb/configure.ac             |    5 +
 gdb/dwarf2read.c             |    8 +-
 gdb/expression.h             |    1 -
 gdb/findcmd.c                |    2 +-
 gdb/gdbthread.h              |    3 -
 gdb/gdbtypes.c               |  308 +++---------------------------------------
 gdb/gdbtypes.h               |    6 +-
 gdb/jv-lang.c                |    2 +-
 gdb/linespec.c               |    5 +-
 gdb/mdebugread.c             |    2 +-
 gdb/python/py-prettyprint.c  |    5 -
 gdb/python/py-type.c         |    7 -
 gdb/python/python-internal.h |    1 -
 gdb/stabsread.c              |    4 +-
 gdb/target.h                 |    2 -
 gdb/thread.c                 |    3 +-
 gdb/valops.c                 |    4 +
 gdb/valprint.c               |    3 +-
 gdb/value.c                  |   46 +------
 21 files changed, 47 insertions(+), 375 deletions(-)

First 500 lines of diff:
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 5f39064..6f5d050 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1042,9 +1042,6 @@ extern int catching_syscall_number (int syscall_number);
 /* Tell a breakpoint to be quiet.  */
 extern void make_breakpoint_silent (struct breakpoint *);
 
-/* Set break condition of breakpoint B to EXP.  */
-extern void set_breakpoint_condition (struct breakpoint *b, char *exp, int from_tty);
-
 /* Return a tracepoint with the given number if found.  */
 extern struct breakpoint *get_tracepoint (int num);
 
diff --git a/gdb/coffread.c b/gdb/coffread.c
index ad1cc68..52417b2 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -350,7 +350,7 @@ coff_alloc_type (int index)
      We will fill it in later if we find out how.  */
   if (type == NULL)
     {
-      type = alloc_type (current_objfile, NULL);
+      type = alloc_type (current_objfile);
       *type_addr = type;
     }
   return type;
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 380473a..8dd62b6 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1758,6 +1758,11 @@ AC_ARG_ENABLE(werror,
      *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
    esac])
 
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+    ERROR_ON_WARNING=yes
+fi
+
 WERROR_CFLAGS=""
 if test "${ERROR_ON_WARNING}" = yes ; then
     WERROR_CFLAGS="-Werror"
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index f3a7219..e4ab034 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4896,7 +4896,7 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
   /* The name is already allocated along with this objfile, so we don't
      need to duplicate it for the type.  */
   fnp->physname = physname ? physname : "";
-  fnp->type = alloc_type (objfile, NULL);
+  fnp->type = alloc_type (objfile);
   this_type = read_type_die (die, cu);
   if (this_type && TYPE_CODE (this_type) == TYPE_CODE_FUNC)
     {
@@ -5109,7 +5109,7 @@ quirk_gcc_member_function_pointer (struct type *type, struct objfile *objfile)
     return;
 
   domain_type = TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (pfn_type, 0));
-  new_type = alloc_type (objfile, NULL);
+  new_type = alloc_type (objfile);
   smash_to_method_type (new_type, domain_type, TYPE_TARGET_TYPE (pfn_type),
 			TYPE_FIELDS (pfn_type), TYPE_NFIELDS (pfn_type),
 			TYPE_VARARGS (pfn_type));
@@ -5160,7 +5160,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu)
 
   back_to = make_cleanup (null_cleanup, 0);
 
-  type = alloc_type (objfile, NULL);
+  type = alloc_type (objfile);
   INIT_CPLUS_SPECIFIC (type);
 
   name = dwarf2_name (die, cu);
@@ -5427,7 +5427,7 @@ read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu)
       return set_die_type (die, type, cu);
     }
 
-  type = alloc_type (objfile, NULL);
+  type = alloc_type (objfile);
 
   TYPE_CODE (type) = TYPE_CODE_ENUM;
   name = dwarf2_full_name (NULL, die, cu);
diff --git a/gdb/expression.h b/gdb/expression.h
index 8006f02..a6f966a 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -450,5 +450,4 @@ extern char *op_string (enum exp_opcode);
 extern void dump_raw_expression (struct expression *, struct ui_file *, char *);
 extern void dump_prefix_expression (struct expression *, struct ui_file *);
 
-
 #endif /* !defined (EXPRESSION_H) */
diff --git a/gdb/findcmd.c b/gdb/findcmd.c
index 802d491..e9ba45c 100644
--- a/gdb/findcmd.c
+++ b/gdb/findcmd.c
@@ -27,7 +27,7 @@
 
 /* Copied from bfd_put_bits.  */
 
-void
+static void
 put_bits (bfd_uint64_t data, char *buf, int bits, bfd_boolean big_p)
 {
   int i;
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 82a3521..cd24eaf 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -257,9 +257,6 @@ extern struct thread_info *any_live_thread_of_process (int pid);
 /* Change the ptid of thread OLD_PTID to NEW_PTID.  */
 void thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid);
 
-/* Prune dead threads from the list of threads.  */
-extern void prune_threads (void);
-
 /* Iterator function to call a user-provided callback function
    once for each known thread.  */
 typedef int (*thread_callback_func) (struct thread_info *, void *);
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index f7722c8..443f6f7 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -122,23 +122,6 @@ static void print_bit_vector (B_TYPE *, int);
 static void print_arg_types (struct field *, int, int);
 static void dump_fn_fieldlists (struct type *, int);
 static void print_cplus_stuff (struct type *, int);
-static void type_init_refc (struct type *new_type, struct type *parent_type);
-
-/* A reference count structure for the type reference count map.  Each
-   type in a hierarchy of types is mapped to the same reference
-   count.  */
-struct type_refc_entry
-{
-  /* One type in the hierarchy.  Each type in the hierarchy gets its
-     own slot.  */
-  struct type *type;
-
-  /* A pointer to the shared reference count.  */
-  int *refc;
-};
-
-/* The hash table holding all reference counts.  */
-static htab_t type_refc_table;
 
 
 /* Allocate a new OBJFILE-associated type structure and fill it
@@ -146,7 +129,7 @@ static htab_t type_refc_table;
    on the objfile's objfile_obstack.  */
 
 struct type *
-alloc_type (struct objfile *objfile, struct type *parent)
+alloc_type (struct objfile *objfile)
 {
   struct type *type;
 
@@ -167,9 +150,6 @@ alloc_type (struct objfile *objfile, struct type *parent)
   TYPE_VPTR_FIELDNO (type) = -1;
   TYPE_CHAIN (type) = type;	/* Chain back to itself.  */
 
-  if (objfile == NULL)
-    type_init_refc (type, parent);
-
   return type;
 }
 
@@ -198,8 +178,6 @@ alloc_type_arch (struct gdbarch *gdbarch)
   TYPE_VPTR_FIELDNO (type) = -1;
   TYPE_CHAIN (type) = type;	/* Chain back to itself.  */
 
-  type_init_refc (type, NULL);
-
   return type;
 }
 
@@ -211,7 +189,7 @@ struct type *
 alloc_type_copy (const struct type *type)
 {
   if (TYPE_OBJFILE_OWNED (type))
-    return alloc_type (TYPE_OWNER (type).objfile, (struct type *) type);
+    return alloc_type (TYPE_OWNER (type).objfile);
   else
     return alloc_type_arch (TYPE_OWNER (type).gdbarch);
 }
@@ -250,9 +228,6 @@ alloc_type_instance (struct type *oldtype)
 
   TYPE_CHAIN (type) = type;	/* Chain back to itself for now.  */
 
-  if (TYPE_OBJFILE (oldtype) == NULL)
-    type_init_refc (type, oldtype);
-
   return type;
 }
 
@@ -1807,7 +1782,7 @@ init_type (enum type_code code, int length, int flags,
 {
   struct type *type;
 
-  type = alloc_type (objfile, NULL);
+  type = alloc_type (objfile);
   TYPE_CODE (type) = code;
   TYPE_LENGTH (type) = length;
 
@@ -1860,10 +1835,6 @@ init_type (enum type_code code, int length, int flags,
         TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_CALLING_CONVENTION;
         break;
     }
-
-  if (!objfile)
-    type_incref (type);
-
   return type;
 }
 
@@ -3047,17 +3018,15 @@ create_copied_types_hash (struct objfile *objfile)
 			       dummy_obstack_deallocate);
 }
 
-/* A helper for copy_type_recursive.  This does all the work.
-   REPRESENTATIVE is a pointer to a type.  This is used to register
-   newly-created types in the type_refc_table.  Initially it pointer
-   to a NULL pointer, but it is filled in the first time a type is
-   copied.  */
+/* Recursively copy (deep copy) TYPE, if it is associated with
+   OBJFILE.  Return a new type allocated using malloc, a saved type if
+   we have already visited TYPE (using COPIED_TYPES), or TYPE if it is
+   not associated with OBJFILE.  */
 
-static struct type *
-copy_type_recursive_1 (struct objfile *objfile, 
-		       struct type *type,
-		       htab_t copied_types,
-		       struct type **representative)
+struct type *
+copy_type_recursive (struct objfile *objfile, 
+		     struct type *type,
+		     htab_t copied_types)
 {
   struct type_pair *stored, pair;
   void **slot;
@@ -3112,8 +3081,8 @@ copy_type_recursive_1 (struct objfile *objfile,
 	  TYPE_FIELD_BITSIZE (new_type, i) = TYPE_FIELD_BITSIZE (type, i);
 	  if (TYPE_FIELD_TYPE (type, i))
 	    TYPE_FIELD_TYPE (new_type, i)
-	      = copy_type_recursive_1 (objfile, TYPE_FIELD_TYPE (type, i),
-				       copied_types, representative);
+	      = copy_type_recursive (objfile, TYPE_FIELD_TYPE (type, i),
+				     copied_types);
 	  if (TYPE_FIELD_NAME (type, i))
 	    TYPE_FIELD_NAME (new_type, i) = 
 	      xstrdup (TYPE_FIELD_NAME (type, i));
@@ -3150,16 +3119,14 @@ copy_type_recursive_1 (struct objfile *objfile,
   /* Copy pointers to other types.  */
   if (TYPE_TARGET_TYPE (type))
     TYPE_TARGET_TYPE (new_type) = 
-      copy_type_recursive_1 (objfile, 
-			     TYPE_TARGET_TYPE (type),
-			     copied_types,
-			     representative);
+      copy_type_recursive (objfile, 
+			   TYPE_TARGET_TYPE (type),
+			   copied_types);
   if (TYPE_VPTR_BASETYPE (type))
     TYPE_VPTR_BASETYPE (new_type) = 
-      copy_type_recursive_1 (objfile,
-			     TYPE_VPTR_BASETYPE (type),
-			     copied_types,
-			     representative);
+      copy_type_recursive (objfile,
+			   TYPE_VPTR_BASETYPE (type),
+			   copied_types);
   /* Maybe copy the type_specific bits.
 
      NOTE drow/2005-12-09: We do not copy the C++-specific bits like
@@ -3176,21 +3143,6 @@ copy_type_recursive_1 (struct objfile *objfile,
   return new_type;
 }
 
-/* Recursively copy (deep copy) TYPE, if it is associated with
-   OBJFILE.  Return a new type allocated using malloc, a saved type if
-   we have already visited TYPE (using COPIED_TYPES), or TYPE if it is
-   not associated with OBJFILE.  */
-
-struct type *
-copy_type_recursive (struct objfile *objfile, 
-		     struct type *type,
-		     htab_t copied_types)
-{
-  struct type *representative = NULL;
-
-  return copy_type_recursive_1 (objfile, type, copied_types, &representative);
-}
-
 /* Make a copy of the given TYPE, except that the pointer & reference
    types are not preserved.
    
@@ -3213,225 +3165,6 @@ copy_type (const struct type *type)
   return new_type;
 }
 
-#if 0
-
-/* Allocate a hash table which is used when freeing a struct type.  */
-
-static htab_t
-create_deleted_types_hash (void)
-{
-  return htab_create (1, htab_hash_pointer, htab_eq_pointer, NULL);
-}
-
-#endif
-
-static void delete_type_recursive (struct type *type, htab_t deleted_types);
-
-/* A helper for delete_type_recursive which deletes a main_type and
-   the things to which it refers.  TYPE is a type whose main_type we
-   wish to destroy.  DELETED_TYPES is a hash holding already-seen
-   pointers; see delete_type_recursive.  */
-
-static void
-delete_main_type (struct type *type, htab_t deleted_types)
-{
-  int i;
-  void **slot;
-
-  if (!type)
-    return;
-
-  /* Multiple types might share a single main_type.  So, we must
-     check to make sure this is not happening.  */
-  slot = htab_find_slot (deleted_types, TYPE_MAIN_TYPE (type), INSERT);
-  if (*slot != NULL)
-    return;
-  *slot = TYPE_MAIN_TYPE (type);
-
-  xfree (TYPE_NAME (type));
-  xfree (TYPE_TAG_NAME (type));
-
-  delete_type_recursive (TYPE_TARGET_TYPE (type), deleted_types);
-  delete_type_recursive (TYPE_VPTR_BASETYPE (type), deleted_types);
-
-  for (i = 0; i < TYPE_NFIELDS (type); ++i)
-    {
-      delete_type_recursive (TYPE_FIELD_TYPE (type, i), deleted_types);
-      xfree (TYPE_FIELD_NAME (type, i));
-
-      if (TYPE_FIELD_LOC_KIND (type, i) == FIELD_LOC_KIND_PHYSNAME)
-	xfree (TYPE_FIELD_STATIC_PHYSNAME (type, i));
-    }
-  xfree (TYPE_FIELDS (type));
-
-  gdb_assert (!HAVE_CPLUS_STRUCT (type));
-
-  xfree (TYPE_MAIN_TYPE (type));
-}
-
-/* Recursively delete TYPE and things it references.  TYPE must have
-   been allocated using xmalloc -- not using an objfile.
-   DELETED_TYPES is a hash table, allocated using
-   create_deleted_types_hash, which is used for checking whether a
-   type has already been deleted.  */
-
-static void
-delete_type_recursive (struct type *type, htab_t deleted_types)
-{
-  void **slot;
-
-  if (!type)
-    return;
-
-  slot = htab_find_slot (deleted_types, type, INSERT);
-  if (*slot != NULL)
-    return;
-  gdb_assert (!TYPE_OBJFILE (type));
-  *slot = type;
-
-  delete_main_type (type, deleted_types);
-  delete_type_recursive (TYPE_POINTER_TYPE (type), deleted_types);
-  delete_type_recursive (TYPE_REFERENCE_TYPE (type), deleted_types);
-
-  /* It is somewhat inefficient to free the chain recursively.
-     However, the list is typically short, and this avoid duplicating
-     the deletion checking code.  */
-  delete_type_recursive (TYPE_CHAIN (type), deleted_types);
-
-  xfree (type);
-}
-
-/* Hash function for type_refc_table.  */
-
-static hashval_t
-type_refc_hash (const void *p)
-{
-  const struct type_refc_entry *entry = p;
-  return htab_hash_pointer (entry->type);
-}
-
-/* Equality function for type_refc_table.  */
-
-static int
-type_refc_equal (const void *a, const void *b)
-{
-  const struct type_refc_entry *left = a;
-  const struct type_refc_entry *right = b;
-  return left->type == right->type;
-}
-
-/* Insert the new type NEW_TYPE into the table.  Does nothing if
-   NEW_TYPE has an objfile.  If PARENT_TYPE is not NULL, then NEW_TYPE
-   will be inserted into the same hierarchy as PARENT_TYPE.  In this
-   case, PARENT_TYPE must already exist in the reference count map.
-   If PARENT_TYPE is NULL, a new reference count is allocated and set
-   to one.  */
-
-static void
-type_init_refc (struct type *new_type, struct type *parent_type)
-{
-  int *refc;
-  void **slot;
-  struct type_refc_entry *new_entry;
-
-  if (TYPE_OBJFILE (new_type))
-    return;
-
-  if (parent_type)
-    {
-      struct type_refc_entry entry, *found;
-      entry.type = parent_type;
-      found = htab_find (type_refc_table, &entry);
-      gdb_assert (found);
-      refc = found->refc;
-    }
-  else
-    {
-      refc = xmalloc (sizeof (int));
-      *refc = 0;
-    }
-
-  new_entry = XNEW (struct type_refc_entry);
-  new_entry->type = new_type;
-  new_entry->refc = refc;
-
-  slot = htab_find_slot (type_refc_table, new_entry, INSERT);
-  gdb_assert (!*slot);
-  *slot = new_entry;
-}
-
-/* Increment the reference count for TYPE.  */
-
-void
-type_incref (struct type *type)
-{
-  struct type_refc_entry entry, *found;
-
-  if (TYPE_OBJFILE (type))
-    return;
-
-  entry.type = type;
-  found = htab_find (type_refc_table, &entry);
-  gdb_assert (found);
-  ++*(found->refc);
-}
-
-#if 0
-
-/* A traverse callback for type_refc_table which removes any entry
-   whose reference count pointer is REFC.  */
-
-static int
-type_refc_remove (void **slot, void *refc)
-{
-  struct type_refc_entry *entry = *slot;
-
-  if (entry->refc == refc)
-    {
-      xfree (entry);
-      htab_clear_slot (type_refc_table, slot);
-    }
-
-  return 1;
-}
-
-#endif
-
-/* Decrement the reference count for TYPE.  If TYPE has no more
-   references, delete it.  */
-
-void
-type_decref (struct type *type)
-{
-  struct type_refc_entry entry, *found;
-
-  if (TYPE_OBJFILE (type))
-    return;
-
-  entry.type = type;
-  found = htab_find (type_refc_table, &entry);
-#if 0 /* We'll be replacing this with type GC soon.  */
-  gdb_assert (found);


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


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

only message in thread, other threads:[~2010-07-22  7:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-22  7:56 [SCM] archer-tromey-python: Remove the PR 10966 workaround as the Bug is fixed now 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).