public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-ratmice-compile-Wc++-compat: rename all "namespace" identifiers
@ 2010-09-14  1:14 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2010-09-14  1:14 UTC (permalink / raw)
  To: archer-commits

The branch, archer-ratmice-compile-Wc++-compat has been updated
       via  100da71420fcedbc8ce598d723f5658082eedc32 (commit)
       via  6b060214c03dbc68c0ceb876f7b2c21f9e1d7cb1 (commit)
       via  e6da7badf3fcaf1bae0aa12f81d7db3e40f31ab9 (commit)
       via  78d06d2c8920ae45119c9cd453fecf22148cdd34 (commit)
      from  1413af1d4e9706283bb420941af11d59f556ff51 (commit)

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

- Log -----------------------------------------------------------------
commit 100da71420fcedbc8ce598d723f5658082eedc32
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Sep 13 15:21:01 2010 -0600

    rename all "namespace" identifiers

commit 6b060214c03dbc68c0ceb876f7b2c21f9e1d7cb1
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Sep 13 15:13:48 2010 -0600

    change "delete" to "deleter"

commit e6da7badf3fcaf1bae0aa12f81d7db3e40f31ab9
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Sep 13 15:07:34 2010 -0600

    change private to private_data

commit 78d06d2c8920ae45119c9cd453fecf22148cdd34
Author: Tom Tromey <tromey@redhat.com>
Date:   Mon Sep 13 15:07:20 2010 -0600

    add -Wc++-compat

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

Summary of changes:
 gdb/ada-lang.c        |   28 ++++++------
 gdb/ada-lang.h        |    2 +-
 gdb/aix-thread.c      |   32 ++++++------
 gdb/block.h           |    5 +-
 gdb/configure         |    2 +-
 gdb/configure.ac      |    2 +-
 gdb/cp-namespace.c    |   24 +++++-----
 gdb/cp-support.c      |   30 ++++++------
 gdb/cp-support.h      |    4 +-
 gdb/darwin-nat-info.c |   22 ++++----
 gdb/darwin-nat.c      |  122 ++++++++++++++++++++++++------------------------
 gdb/gdbthread.h       |    2 +-
 gdb/inf-ttrace.c      |   28 ++++++------
 gdb/inferior.c        |    2 +-
 gdb/inferior.h        |    2 +-
 gdb/linux-thread-db.c |   40 ++++++++--------
 gdb/nto-procfs.c      |   16 +++---
 gdb/nto-tdep.c        |    6 +-
 gdb/psymtab.c         |   12 ++--
 gdb/remote.c          |   20 ++++----
 gdb/symfile.h         |    2 +-
 gdb/thread.c          |   10 ++--
 gdb/ui-file.c         |    4 +-
 gdb/ui-file.h         |    2 +-
 24 files changed, 210 insertions(+), 209 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 0a7e271..a9a8136 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4082,14 +4082,14 @@ make_array_descriptor (struct type *type, struct value *arr,
  * used in the public sources. */
 
 static int
-lookup_cached_symbol (const char *name, domain_enum namespace,
+lookup_cached_symbol (const char *name, domain_enum domain,
                       struct symbol **sym, struct block **block)
 {
   return 0;
 }
 
 static void
-cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
+cache_symbol (const char *name, domain_enum domain, struct symbol *sym,
               struct block *block)
 {
 }
@@ -4289,7 +4289,7 @@ ada_lookup_simple_minsym (const char *name)
 
 static void
 add_symbols_from_enclosing_procs (struct obstack *obstackp,
-                                  const char *name, domain_enum namespace,
+                                  const char *name, domain_enum domain,
                                   int wild_match)
 {
 }
@@ -4701,7 +4701,7 @@ ada_add_non_local_symbols (struct obstack *obstackp, const char *name,
 
 int
 ada_lookup_symbol_list (const char *name0, const struct block *block0,
-                        domain_enum namespace,
+                        domain_enum domain,
                         struct ada_symbol_info **results)
 {
   struct symbol *sym;
@@ -4740,7 +4740,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
 
   /* Check the non-global symbols.  If we have ANY match, then we're done.  */
 
-  ada_add_local_symbols (&symbol_list_obstack, name, block, namespace,
+  ada_add_local_symbols (&symbol_list_obstack, name, block, domain,
                          wild_match);
   if (num_defns_collected (&symbol_list_obstack) > 0)
     goto done;
@@ -4750,7 +4750,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
      the same result.  */
 
   cacheIfUnique = 1;
-  if (lookup_cached_symbol (name0, namespace, &sym, &block))
+  if (lookup_cached_symbol (name0, domain, &sym, &block))
     {
       if (sym != NULL)
         add_defn_to_vec (&symbol_list_obstack, sym, block);
@@ -4759,14 +4759,14 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0,
 
   /* Search symbols from all global blocks.  */
  
-  ada_add_non_local_symbols (&symbol_list_obstack, name, namespace, 1,
+  ada_add_non_local_symbols (&symbol_list_obstack, name, domain, 1,
                              wild_match);
 
   /* Now add symbols from all per-file blocks if we've gotten no hits
      (not strictly correct, but perhaps better than an error).  */
 
   if (num_defns_collected (&symbol_list_obstack) == 0)
-    ada_add_non_local_symbols (&symbol_list_obstack, name, namespace, 0,
+    ada_add_non_local_symbols (&symbol_list_obstack, name, domain, 0,
                                wild_match);
 
 done:
@@ -4776,10 +4776,10 @@ done:
   ndefns = remove_extra_symbols (*results, ndefns);
 
   if (ndefns == 0)
-    cache_symbol (name0, namespace, NULL, NULL);
+    cache_symbol (name0, domain, NULL, NULL);
 
   if (ndefns == 1 && cacheIfUnique)
-    cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block);
+    cache_symbol (name0, domain, (*results)[0].sym, (*results)[0].block);
 
   ndefns = remove_irrelevant_renamings (*results, ndefns, block0);
 
@@ -4788,12 +4788,12 @@ done:
 
 struct symbol *
 ada_lookup_encoded_symbol (const char *name, const struct block *block0,
-			   domain_enum namespace, struct block **block_found)
+			   domain_enum domain, struct block **block_found)
 {
   struct ada_symbol_info *candidates;
   int n_candidates;
 
-  n_candidates = ada_lookup_symbol_list (name, block0, namespace, &candidates);
+  n_candidates = ada_lookup_symbol_list (name, block0, domain, &candidates);
 
   if (n_candidates == 0)
     return NULL;
@@ -4813,14 +4813,14 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block0,
    assignments occur only if the pointers are non-null).  */
 struct symbol *
 ada_lookup_symbol (const char *name, const struct block *block0,
-                   domain_enum namespace, int *is_a_field_of_this)
+                   domain_enum domain, int *is_a_field_of_this)
 {
   if (is_a_field_of_this != NULL)
     *is_a_field_of_this = 0;
 
   return
     ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
-			       block0, namespace, NULL);
+			       block0, domain, NULL);
 }
 
 static struct symbol *
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index f6b613f..8f97f64 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -225,7 +225,7 @@ extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
 
 extern struct symbol *
 ada_lookup_encoded_symbol (const char *, const struct block *,
-			   domain_enum namespace, struct block **);
+			   domain_enum domain, struct block **);
 
 extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);
 
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index cbdb099..21d5c6d 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -747,9 +747,9 @@ sync_threadlists (void)
       else if (gi == gcount)
 	{
 	  thread = add_thread (BUILD_THREAD (pbuf[pi].pthid, infpid));
-	  thread->private = xmalloc (sizeof (struct private_thread_info));
-	  thread->private->pdtid = pbuf[pi].pdtid;
-	  thread->private->tid = pbuf[pi].tid;
+	  thread->private_data = xmalloc (sizeof (struct private_thread_info));
+	  thread->private_data->pdtid = pbuf[pi].pdtid;
+	  thread->private_data->tid = pbuf[pi].tid;
 	  pi++;
 	}
       else
@@ -766,8 +766,8 @@ sync_threadlists (void)
 
 	  if (cmp_result == 0)
 	    {
-	      gbuf[gi]->private->pdtid = pdtid;
-	      gbuf[gi]->private->tid = tid;
+	      gbuf[gi]->private_data->pdtid = pdtid;
+	      gbuf[gi]->private_data->tid = tid;
 	      pi++;
 	      gi++;
 	    }
@@ -779,9 +779,9 @@ sync_threadlists (void)
 	  else
 	    {
 	      thread = add_thread (pptid);
-	      thread->private = xmalloc (sizeof (struct private_thread_info));
-	      thread->private->pdtid = pdtid;
-	      thread->private->tid = tid;
+	      thread->private_data = xmalloc (sizeof (struct private_thread_info));
+	      thread->private_data->pdtid = pdtid;
+	      thread->private_data->tid = tid;
 	      pi++;
 	    }
 	}
@@ -799,7 +799,7 @@ iter_tid (struct thread_info *thread, void *tidp)
 {
   const pthdb_tid_t tid = *(pthdb_tid_t *)tidp;
 
-  return (thread->private->tid == tid);
+  return (thread->private_data->tid == tid);
 }
 
 /* Synchronize libpthdebug's state with the inferior and with GDB,
@@ -991,7 +991,7 @@ aix_thread_resume (struct target_ops *ops,
 	error (_("aix-thread resume: unknown pthread %ld"),
 	       TIDGET (ptid));
 
-      tid[0] = thread->private->tid;
+      tid[0] = thread->private_data->tid;
       if (tid[0] == PTHDB_INVALID_TID)
 	error (_("aix-thread resume: no tid for pthread %ld"),
 	       TIDGET (ptid));
@@ -1303,10 +1303,10 @@ aix_thread_fetch_registers (struct target_ops *ops,
   else
     {
       thread = find_thread_ptid (inferior_ptid);
-      tid = thread->private->tid;
+      tid = thread->private_data->tid;
 
       if (tid == PTHDB_INVALID_TID)
-	fetch_regs_user_thread (regcache, thread->private->pdtid);
+	fetch_regs_user_thread (regcache, thread->private_data->pdtid);
       else
 	fetch_regs_kernel_thread (regcache, regno, tid);
     }
@@ -1644,10 +1644,10 @@ aix_thread_store_registers (struct target_ops *ops,
   else
     {
       thread = find_thread_ptid (inferior_ptid);
-      tid = thread->private->tid;
+      tid = thread->private_data->tid;
 
       if (tid == PTHDB_INVALID_TID)
-	store_regs_user_thread (regcache, thread->private->pdtid);
+	store_regs_user_thread (regcache, thread->private_data->pdtid);
       else
 	store_regs_kernel_thread (regcache, regno, tid);
     }
@@ -1741,8 +1741,8 @@ aix_thread_extra_thread_info (struct thread_info *thread)
 
   buf = mem_fileopen ();
 
-  pdtid = thread->private->pdtid;
-  tid = thread->private->tid;
+  pdtid = thread->private_data->pdtid;
+  tid = thread->private_data->tid;
 
   if (tid != PTHDB_INVALID_TID)
     /* i18n: Like "thread-identifier %d, [state] running, suspended" */
diff --git a/gdb/block.h b/gdb/block.h
index 7eedb6c..aa0e8a6 100644
--- a/gdb/block.h
+++ b/gdb/block.h
@@ -91,7 +91,7 @@ struct block
 	 this block: using directives and the current namespace
 	 scope.  */
       
-      struct block_namespace_info *namespace;
+      struct block_namespace_info *namespace_info;
     }
     cplus_specific;
   }
@@ -103,7 +103,8 @@ struct block
 #define BLOCK_FUNCTION(bl)	(bl)->function
 #define BLOCK_SUPERBLOCK(bl)	(bl)->superblock
 #define BLOCK_DICT(bl)		(bl)->dict
-#define BLOCK_NAMESPACE(bl)   (bl)->language_specific.cplus_specific.namespace
+#define BLOCK_NAMESPACE(bl) \
+  (bl)->language_specific.cplus_specific.namespace_info
 
 /* Macro to loop through all symbols in a block BL, in no particular
    order.  ITER helps keep track of the iteration, and should be a
diff --git a/gdb/configure b/gdb/configure
index bae0b5b..f92b916 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -14737,7 +14737,7 @@ fi
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wformat-nonliteral -Wno-pointer-sign \
 -Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts"
+-Wno-switch -Wno-char-subscripts -Wc++-compat"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d65fd49..158bccc 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1710,7 +1710,7 @@ fi
 build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wformat-nonliteral -Wno-pointer-sign \
 -Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts"
+-Wno-switch -Wno-char-subscripts -Wc++-compat"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 04790df..9045ce6 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -219,9 +219,9 @@ cp_set_block_scope (const struct symbol *symbol,
    namespace; return nonzero if so.  */
 
 int
-cp_is_anonymous (const char *namespace)
+cp_is_anonymous (const char *namespace_name)
 {
-  return (strstr (namespace, "(anonymous namespace)")
+  return (strstr (namespace_name, "(anonymous namespace)")
 	  != NULL);
 }
 
@@ -251,25 +251,25 @@ cp_lookup_symbol_nonlocal (const char *name,
    cp_lookup_symbol_nonlocal.  */
 
 static struct symbol *
-cp_lookup_symbol_in_namespace (const char *namespace,
+cp_lookup_symbol_in_namespace (const char *namespace_name,
                                const char *name,
                                const struct block *block,
                                const domain_enum domain)
 {
-  if (namespace[0] == '\0')
+  if (namespace_name[0] == '\0')
     {
       return lookup_symbol_file (name, block, domain, 0);
     }
   else
     {
-      char *concatenated_name = (char *) alloca (strlen (namespace) + 2 +
+      char *concatenated_name = (char *) alloca (strlen (namespace_name) + 2 +
 						 strlen (name) + 1);
 
-      strcpy (concatenated_name, namespace);
+      strcpy (concatenated_name, namespace_name);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, name);
       return lookup_symbol_file (concatenated_name, block,
-				 domain, cp_is_anonymous (namespace));
+				 domain, cp_is_anonymous (namespace_name));
     }
 }
 
@@ -465,7 +465,7 @@ lookup_namespace_scope (const char *name,
 			const char *scope,
 			int scope_len)
 {
-  char *namespace;
+  char *namespace_name;
 
   if (scope[scope_len] != '\0')
     {
@@ -489,10 +489,10 @@ lookup_namespace_scope (const char *name,
   /* Okay, we didn't find a match in our children, so look for the
      name in the current namespace.  */
 
-  namespace = (char *) alloca (scope_len + 1);
-  strncpy (namespace, scope, scope_len);
-  namespace[scope_len] = '\0';
-  return cp_lookup_symbol_in_namespace (namespace, name, block, domain);
+  namespace_name = (char *) alloca (scope_len + 1);
+  strncpy (namespace_name, scope, scope_len);
+  namespace_name[scope_len] = '\0';
+  return cp_lookup_symbol_in_namespace (namespace_name, name, block, domain);
 }
 
 /* Look up NAME in BLOCK's static block and in global blocks.  If
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 1f497b8..149cc2b 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -60,7 +60,7 @@ static void overload_list_add_symbol (struct symbol *sym,
 				      const char *oload_name);
 
 static void make_symbol_overload_list_using (const char *func_name,
-					     const char *namespace);
+					     const char *namespace_name);
 
 static void make_symbol_overload_list_qualified (const char *func_name);
 
@@ -690,7 +690,7 @@ overload_list_add_symbol (struct symbol *sym, const char *oload_name)
 
 struct symbol **
 make_symbol_overload_list (const char *func_name,
-			   const char *namespace)
+			   const char *namespace_name)
 {
   struct cleanup *old_cleanups;
 
@@ -702,7 +702,7 @@ make_symbol_overload_list (const char *func_name,
 
   old_cleanups = make_cleanup (xfree, sym_return_val);
 
-  make_symbol_overload_list_using (func_name, namespace);
+  make_symbol_overload_list_using (func_name, namespace_name);
 
   discard_cleanups (old_cleanups);
 
@@ -713,16 +713,16 @@ make_symbol_overload_list (const char *func_name,
 
 static void
 make_symbol_overload_list_namespace (const char *func_name,
-                                     const char *namespace)
+                                     const char *namespace_name)
 {
-  if (namespace[0] == '\0')
+  if (namespace_name[0] == '\0')
     make_symbol_overload_list_qualified (func_name);
   else
     {
       char *concatenated_name
-	= (char *) alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
+	= (char *) alloca (strlen (namespace_name) + 2 + strlen (func_name) + 1);
 
-      strcpy (concatenated_name, namespace);
+      strcpy (concatenated_name, namespace_name);
       strcat (concatenated_name, "::");
       strcat (concatenated_name, func_name);
       make_symbol_overload_list_qualified (concatenated_name);
@@ -736,7 +736,7 @@ static void
 make_symbol_overload_list_adl_namespace (struct type *type,
                                          const char *func_name)
 {
-  char *namespace;
+  char *namespace_name;
   char *type_name;
   int i, prefix_len;
 
@@ -759,11 +759,11 @@ make_symbol_overload_list_adl_namespace (struct type *type,
 
   if (prefix_len != 0)
     {
-      namespace = (char *) alloca (prefix_len + 1);
-      strncpy (namespace, type_name, prefix_len);
-      namespace[prefix_len] = '\0';
+      namespace_name = (char *) alloca (prefix_len + 1);
+      strncpy (namespace_name, type_name, prefix_len);
+      namespace_name[prefix_len] = '\0';
 
-      make_symbol_overload_list_namespace (func_name, namespace);
+      make_symbol_overload_list_namespace (func_name, namespace_name);
     }
 
   /* Check public base type */
@@ -800,7 +800,7 @@ make_symbol_overload_list_adl (struct type **arg_types, int nargs,
 
 static void
 make_symbol_overload_list_using (const char *func_name,
-				 const char *namespace)
+				 const char *namespace_name)
 {
   const struct using_direct *current;
 
@@ -812,7 +812,7 @@ make_symbol_overload_list_using (const char *func_name,
        current != NULL;
        current = current->next)
     {
-      if (strcmp (namespace, current->import_dest) == 0)
+      if (strcmp (namespace_name, current->import_dest) == 0)
 	{
 	  make_symbol_overload_list_using (func_name,
 					   current->import_src);
@@ -820,7 +820,7 @@ make_symbol_overload_list_using (const char *func_name,
     }
 
   /* Now, add names for this namespace.  */
-  make_symbol_overload_list_namespace (func_name, namespace);
+  make_symbol_overload_list_namespace (func_name, namespace_name);
 }
 
 /* This does the bulk of the work of finding overloaded symbols.
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index ddc4c93..6105ae6 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -121,7 +121,7 @@ extern int cp_validate_operator (const char *input);
 
 /* Functions/variables from cp-namespace.c.  */
 
-extern int cp_is_anonymous (const char *namespace);
+extern int cp_is_anonymous (const char *namespace_name);
 
 extern void cp_add_using_directive (const char *dest,
                                     const char *src,
@@ -146,7 +146,7 @@ extern struct symbol *cp_lookup_symbol_nonlocal (const char *name,
 						 const struct block *block,
 						 const domain_enum domain);
 
-extern struct symbol *cp_lookup_symbol_namespace (const char *namespace,
+extern struct symbol *cp_lookup_symbol_namespace (const char *namespace_name,
 						  const char *name,
 						  const struct block *block,
 						  const domain_enum domain);
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 4bcb88a..5e6724d 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -120,7 +120,7 @@ get_task_from_args (char *args)
     {
       if (ptid_equal (inferior_ptid, null_ptid))
 	printf_unfiltered (_("No inferior running\n"));
-      return current_inferior ()->private->task;
+      return current_inferior ()->private_data->task;
     }
   if (strcmp (args, "gdb") == 0)
     return mach_task_self ();
@@ -260,32 +260,32 @@ info_mach_ports_command (char *args, int from_tty)
 	    {
 	      struct inferior *inf = current_inferior ();
 
-	      if (port == inf->private->task)
+	      if (port == inf->private_data->task)
 		printf_unfiltered (_(" inferior-task"));
-	      else if (port == inf->private->notify_port)
+	      else if (port == inf->private_data->notify_port)
 		printf_unfiltered (_(" inferior-notify"));
 	      else
 		{
 		  int k;


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


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

only message in thread, other threads:[~2010-09-14  1:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-14  1:14 [SCM] archer-ratmice-compile-Wc++-compat: rename all "namespace" identifiers tromey

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).