This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] C++ keyword cleanliness, mostly auto-generated
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Feb 2015 17:05:26 -0000
- Subject: [binutils-gdb] C++ keyword cleanliness, mostly auto-generated
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fe978cb071b460b2d4aed2f9a71d895f84efce0e
commit fe978cb071b460b2d4aed2f9a71d895f84efce0e
Author: Pedro Alves <palves@redhat.com>
Date: Fri Feb 27 16:33:07 2015 +0000
C++ keyword cleanliness, mostly auto-generated
This patch renames symbols that happen to have names which are
reserved keywords in C++.
Most of this was generated with Tromey's cxx-conversion.el script.
Some places where later hand massaged a bit, to fix formatting, etc.
And this was rebased several times meanwhile, along with re-running
the script, so re-running the script from scratch probably does not
result in the exact same output. I don't think that matters anyway.
gdb/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
gdb/gdbserver/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
Diff:
---
gdb/ChangeLog | 5 ++
gdb/ada-lang.c | 58 +++++++++---------
gdb/ada-lang.h | 2 +-
gdb/addrmap.c | 56 ++++++++---------
gdb/aix-thread.c | 32 +++++-----
gdb/amd64-tdep.c | 76 +++++++++++------------
gdb/bcache.c | 14 ++---
gdb/block.c | 10 +--
gdb/block.h | 6 +-
gdb/break-catch-throw.c | 14 ++---
gdb/buildsym.c | 18 +++---
gdb/c-exp.y | 42 ++++++-------
gdb/cli/cli-decode.c | 110 ++++++++++++++++-----------------
gdb/cli/cli-decode.h | 2 +-
gdb/cli/cli-script.c | 10 +--
gdb/cli/cli-setshow.c | 20 +++---
gdb/coffread.c | 38 ++++++------
gdb/command.h | 24 ++++----
gdb/common/cleanups.c | 12 ++--
gdb/common/filestuff.c | 9 +--
gdb/common/filestuff.h | 4 +-
gdb/continuations.c | 12 ++--
gdb/cp-name-parser.y | 20 +++---
gdb/cp-namespace.c | 63 +++++++++----------
gdb/cp-support.c | 48 +++++++--------
gdb/cp-support.h | 2 +-
gdb/cp-valprint.c | 4 +-
gdb/d-exp.y | 8 +--
gdb/darwin-nat-info.c | 22 +++----
gdb/darwin-nat.c | 124 +++++++++++++++++++-------------------
gdb/dbxread.c | 41 +++++++------
gdb/dwarf2read.c | 42 ++++++-------
gdb/environ.c | 6 +-
gdb/f-exp.y | 16 ++---
gdb/frame.c | 6 +-
gdb/gdbarch.c | 22 +++----
gdb/gdbarch.sh | 22 +++----
gdb/gdbserver/ChangeLog | 5 ++
gdb/gdbserver/inferiors.h | 2 +-
gdb/gdbserver/linux-aarch64-low.c | 4 +-
gdb/gdbserver/linux-arm-low.c | 10 +--
gdb/gdbserver/linux-low.c | 20 +++---
gdb/gdbserver/linux-mips-low.c | 58 +++++++++---------
gdb/gdbserver/linux-x86-low.c | 10 +--
gdb/gdbserver/lynx-low.c | 12 ++--
gdb/gdbserver/thread-db.c | 42 ++++++-------
gdb/gdbthread.h | 2 +-
gdb/gdbtypes.c | 32 +++++-----
gdb/gnu-v3-abi.c | 26 ++++----
gdb/go-exp.y | 8 +--
gdb/guile/guile-internal.h | 6 +-
gdb/guile/scm-symbol.c | 22 +++----
gdb/guile/scm-utils.c | 12 ++--
gdb/hppa-linux-tdep.c | 14 ++---
gdb/ia64-tdep.c | 30 ++++-----
gdb/inf-ttrace.c | 32 +++++-----
gdb/inferior.c | 2 +-
gdb/inferior.h | 2 +-
gdb/jit.c | 16 ++---
gdb/jv-exp.y | 24 ++++----
gdb/linux-thread-db.c | 52 ++++++++--------
gdb/macrotab.c | 14 ++---
gdb/mdebugread.c | 54 ++++++++---------
gdb/memattr.c | 24 ++++----
gdb/mi/mi-cmd-var.c | 14 ++---
gdb/minsyms.c | 20 +++---
gdb/nat/x86-dregs.c | 4 +-
gdb/nto-procfs.c | 16 ++---
gdb/nto-tdep.c | 6 +-
gdb/objc-lang.c | 68 ++++++++++-----------
gdb/p-exp.y | 10 +--
gdb/p-valprint.c | 6 +-
gdb/parse.c | 10 +--
gdb/parser-defs.h | 2 +-
gdb/printcmd.c | 24 ++++----
gdb/psymtab.c | 24 ++++----
gdb/python/py-symbol.c | 22 +++----
gdb/remote-mips.c | 4 +-
gdb/remote.c | 18 +++---
gdb/solib-darwin.c | 20 +++---
gdb/solib-ia64-hpux.c | 6 +-
gdb/solib-pa64.c | 28 ++++-----
gdb/solib-som.c | 58 +++++++++---------
gdb/solib-spu.c | 24 ++++----
gdb/solib-svr4.c | 86 +++++++++++++-------------
gdb/stabsread.c | 62 +++++++++----------
gdb/symfile-debug.c | 6 +-
gdb/symfile.h | 4 +-
gdb/symtab.c | 48 +++++++--------
gdb/thread.c | 10 +--
gdb/top.c | 2 +-
gdb/tui/tui-windata.c | 2 +-
gdb/typeprint.c | 14 ++---
gdb/ui-file.h | 2 +-
gdb/valarith.c | 6 +-
gdb/value.c | 8 +--
gdb/varobj.c | 44 +++++++-------
gdb/varobj.h | 4 +-
gdb/xcoffread.c | 30 ++++-----
99 files changed, 1140 insertions(+), 1127 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d897031..2ba8a6d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-27 Tom Tromey <tromey@redhat.com>
+ Pedro Alves <palves@redhat.com>
+
+ Rename symbols whose names are reserved C++ keywords throughout.
+
2015-02-27 Pedro Alves <palves@redhat.com>
* Makefile.in (COMPILER): New, get it from autoconf.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 562627a..b016723 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -274,7 +274,7 @@ struct cache_entry
/* The name used to perform the lookup. */
const char *name;
/* The namespace used during the lookup. */
- domain_enum namespace;
+ domain_enum domain;
/* The symbol returned by the lookup, or NULL if no matching symbol
was found. */
struct symbol *sym;
@@ -4426,11 +4426,11 @@ ada_clear_symbol_cache (void)
ada_init_symbol_cache (sym_cache);
}
-/* Search our cache for an entry matching NAME and NAMESPACE.
+/* Search our cache for an entry matching NAME and DOMAIN.
Return it if found, or NULL otherwise. */
static struct cache_entry **
-find_entry (const char *name, domain_enum namespace)
+find_entry (const char *name, domain_enum domain)
{
struct ada_symbol_cache *sym_cache
= ada_get_symbol_cache (current_program_space);
@@ -4439,23 +4439,23 @@ find_entry (const char *name, domain_enum namespace)
for (e = &sym_cache->root[h]; *e != NULL; e = &(*e)->next)
{
- if (namespace == (*e)->namespace && strcmp (name, (*e)->name) == 0)
+ if (domain == (*e)->domain && strcmp (name, (*e)->name) == 0)
return e;
}
return NULL;
}
-/* Search the symbol cache for an entry matching NAME and NAMESPACE.
+/* Search the symbol cache for an entry matching NAME and DOMAIN.
Return 1 if found, 0 otherwise.
If an entry was found and SYM is not NULL, set *SYM to the entry's
SYM. Same principle for BLOCK if not NULL. */
static int
-lookup_cached_symbol (const char *name, domain_enum namespace,
+lookup_cached_symbol (const char *name, domain_enum domain,
struct symbol **sym, const struct block **block)
{
- struct cache_entry **e = find_entry (name, namespace);
+ struct cache_entry **e = find_entry (name, domain);
if (e == NULL)
return 0;
@@ -4467,10 +4467,10 @@ lookup_cached_symbol (const char *name, domain_enum namespace,
}
/* Assuming that (SYM, BLOCK) is the result of the lookup of NAME
- in domain NAMESPACE, save this result in our symbol cache. */
+ in domain DOMAIN, save this result in our symbol cache. */
static void
-cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
+cache_symbol (const char *name, domain_enum domain, struct symbol *sym,
const struct block *block)
{
struct ada_symbol_cache *sym_cache
@@ -4503,7 +4503,7 @@ cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
e->name = copy = obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
strcpy (copy, name);
e->sym = sym;
- e->namespace = namespace;
+ e->domain = domain;
e->block = block;
}
@@ -4725,7 +4725,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_p)
{
}
@@ -5404,7 +5404,7 @@ add_nonlocal_symbols (struct obstack *obstackp, const char *name,
static int
ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
- domain_enum namespace,
+ domain_enum domain,
struct ada_symbol_info **results,
int full_search)
{
@@ -5443,7 +5443,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
if (full_search)
{
ada_add_local_symbols (&symbol_list_obstack, name, block,
- namespace, wild_match_p);
+ domain, wild_match_p);
}
else
{
@@ -5451,7 +5451,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
ada_iterate_over_symbols, and we don't want to search
superblocks. */
ada_add_block_symbols (&symbol_list_obstack, block, name,
- namespace, NULL, wild_match_p);
+ domain, NULL, wild_match_p);
}
if (num_defns_collected (&symbol_list_obstack) > 0 || !full_search)
goto done;
@@ -5461,7 +5461,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
already performed this search before. If we have, then return
the same result. */
- 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);
@@ -5472,14 +5472,14 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
/* Search symbols from all global blocks. */
- add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 1,
+ add_nonlocal_symbols (&symbol_list_obstack, name, domain, 1,
wild_match_p);
/* 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)
- add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 0,
+ add_nonlocal_symbols (&symbol_list_obstack, name, domain, 0,
wild_match_p);
done:
@@ -5489,10 +5489,10 @@ done:
ndefns = remove_extra_symbols (*results, ndefns);
if (ndefns == 0 && full_search && syms_from_global_search)
- cache_symbol (name0, namespace, NULL, NULL);
+ cache_symbol (name0, domain, NULL, NULL);
if (ndefns == 1 && full_search && syms_from_global_search)
- 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);
@@ -5564,7 +5564,7 @@ ada_name_for_lookup (const char *name)
void
ada_lookup_encoded_symbol (const char *name, const struct block *block,
- domain_enum namespace,
+ domain_enum domain,
struct ada_symbol_info *info)
{
struct ada_symbol_info *candidates;
@@ -5573,7 +5573,7 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block,
gdb_assert (info != NULL);
memset (info, 0, sizeof (struct ada_symbol_info));
- n_candidates = ada_lookup_symbol_list (name, block, namespace, &candidates);
+ n_candidates = ada_lookup_symbol_list (name, block, domain, &candidates);
if (n_candidates == 0)
return;
@@ -5589,7 +5589,7 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block,
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)
{
struct ada_symbol_info info;
@@ -5597,7 +5597,7 @@ ada_lookup_symbol (const char *name, const struct block *block0,
*is_a_field_of_this = 0;
ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
- block0, namespace, &info);
+ block0, domain, &info);
return info.sym;
}
@@ -7790,17 +7790,17 @@ struct type *
ada_find_parallel_type (struct type *type, const char *suffix)
{
char *name;
- const char *typename = ada_type_name (type);
+ const char *type_name = ada_type_name (type);
int len;
- if (typename == NULL)
+ if (type_name == NULL)
return NULL;
- len = strlen (typename);
+ len = strlen (type_name);
name = (char *) alloca (len + strlen (suffix) + 1);
- strcpy (name, typename);
+ strcpy (name, type_name);
strcpy (name + len, suffix);
return ada_find_parallel_type_with_name (type, name);
@@ -7863,9 +7863,9 @@ variant_field_index (struct type *type)
/* A record type with no fields. */
static struct type *
-empty_record (struct type *template)
+empty_record (struct type *templ)
{
- struct type *type = alloc_type_copy (template);
+ struct type *type = alloc_type_copy (templ);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
TYPE_NFIELDS (type) = 0;
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index 29409e6..12761bf 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -244,7 +244,7 @@ extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
domain_enum, int *);
extern void ada_lookup_encoded_symbol
- (const char *name, const struct block *block, domain_enum namespace,
+ (const char *name, const struct block *block, domain_enum domain,
struct ada_symbol_info *symbol_info);
extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *);
diff --git a/gdb/addrmap.c b/gdb/addrmap.c
index 9bfcc96..4eb08cd 100644
--- a/gdb/addrmap.c
+++ b/gdb/addrmap.c
@@ -29,14 +29,14 @@
implementation. */
struct addrmap_funcs
{
- void (*set_empty) (struct addrmap *this,
+ void (*set_empty) (struct addrmap *self,
CORE_ADDR start, CORE_ADDR end_inclusive,
void *obj);
- void *(*find) (struct addrmap *this, CORE_ADDR addr);
- struct addrmap *(*create_fixed) (struct addrmap *this,
+ void *(*find) (struct addrmap *self, CORE_ADDR addr);
+ struct addrmap *(*create_fixed) (struct addrmap *self,
struct obstack *obstack);
- void (*relocate) (struct addrmap *this, CORE_ADDR offset);
- int (*foreach) (struct addrmap *this, addrmap_foreach_fn fn, void *data);
+ void (*relocate) (struct addrmap *self, CORE_ADDR offset);
+ int (*foreach) (struct addrmap *self, addrmap_foreach_fn fn, void *data);
};
@@ -113,7 +113,7 @@ struct addrmap_fixed
static void
-addrmap_fixed_set_empty (struct addrmap *this,
+addrmap_fixed_set_empty (struct addrmap *self,
CORE_ADDR start, CORE_ADDR end_inclusive,
void *obj)
{
@@ -124,9 +124,9 @@ addrmap_fixed_set_empty (struct addrmap *this,
static void *
-addrmap_fixed_find (struct addrmap *this, CORE_ADDR addr)
+addrmap_fixed_find (struct addrmap *self, CORE_ADDR addr)
{
- struct addrmap_fixed *map = (struct addrmap_fixed *) this;
+ struct addrmap_fixed *map = (struct addrmap_fixed *) self;
struct addrmap_transition *bottom = &map->transitions[0];
struct addrmap_transition *top = &map->transitions[map->num_transitions - 1];
@@ -157,7 +157,7 @@ addrmap_fixed_find (struct addrmap *this, CORE_ADDR addr)
static struct addrmap *
-addrmap_fixed_create_fixed (struct addrmap *this, struct obstack *obstack)
+addrmap_fixed_create_fixed (struct addrmap *self, struct obstack *obstack)
{
internal_error (__FILE__, __LINE__,
_("addrmap_create_fixed is not implemented yet "
@@ -166,9 +166,9 @@ addrmap_fixed_create_fixed (struct addrmap *this, struct obstack *obstack)
static void
-addrmap_fixed_relocate (struct addrmap *this, CORE_ADDR offset)
+addrmap_fixed_relocate (struct addrmap *self, CORE_ADDR offset)
{
- struct addrmap_fixed *map = (struct addrmap_fixed *) this;
+ struct addrmap_fixed *map = (struct addrmap_fixed *) self;
size_t i;
for (i = 0; i < map->num_transitions; i++)
@@ -177,10 +177,10 @@ addrmap_fixed_relocate (struct addrmap *this, CORE_ADDR offset)
static int
-addrmap_fixed_foreach (struct addrmap *this, addrmap_foreach_fn fn,
+addrmap_fixed_foreach (struct addrmap *self, addrmap_foreach_fn fn,
void *data)
{
- struct addrmap_fixed *map = (struct addrmap_fixed *) this;
+ struct addrmap_fixed *map = (struct addrmap_fixed *) self;
size_t i;
for (i = 0; i < map->num_transitions; i++)
@@ -315,26 +315,26 @@ addrmap_splay_tree_insert (struct addrmap_mutable *map,
tree node at ADDR, even if it would represent a "transition" from
one value to the same value. */
static void
-force_transition (struct addrmap_mutable *this, CORE_ADDR addr)
+force_transition (struct addrmap_mutable *self, CORE_ADDR addr)
{
splay_tree_node n
- = addrmap_splay_tree_lookup (this, addr);
+ = addrmap_splay_tree_lookup (self, addr);
if (! n)
{
- n = addrmap_splay_tree_predecessor (this, addr);
- addrmap_splay_tree_insert (this, addr,
+ n = addrmap_splay_tree_predecessor (self, addr);
+ addrmap_splay_tree_insert (self, addr,
n ? addrmap_node_value (n) : NULL);
}
}
static void
-addrmap_mutable_set_empty (struct addrmap *this,
+addrmap_mutable_set_empty (struct addrmap *self,
CORE_ADDR start, CORE_ADDR end_inclusive,
void *obj)
{
- struct addrmap_mutable *map = (struct addrmap_mutable *) this;
+ struct addrmap_mutable *map = (struct addrmap_mutable *) self;
splay_tree_node n, next;
void *prior_value;
@@ -384,7 +384,7 @@ addrmap_mutable_set_empty (struct addrmap *this,
static void *
-addrmap_mutable_find (struct addrmap *this, CORE_ADDR addr)
+addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
{
/* Not needed yet. */
internal_error (__FILE__, __LINE__,
@@ -422,15 +422,15 @@ splay_foreach_copy (splay_tree_node n, void *closure)
static struct addrmap *
-addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
+addrmap_mutable_create_fixed (struct addrmap *self, struct obstack *obstack)
{
- struct addrmap_mutable *mutable = (struct addrmap_mutable *) this;
+ struct addrmap_mutable *mutable_obj = (struct addrmap_mutable *) self;
struct addrmap_fixed *fixed;
size_t num_transitions;
/* Count the number of transitions in the tree. */
num_transitions = 0;
- splay_tree_foreach (mutable->tree, splay_foreach_count, &num_transitions);
+ splay_tree_foreach (mutable_obj->tree, splay_foreach_count, &num_transitions);
/* Include an extra entry for the transition at zero (which fixed
maps have, but mutable maps do not.) */
@@ -447,7 +447,7 @@ addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
/* Copy all entries from the splay tree to the array, in order
of increasing address. */
- splay_tree_foreach (mutable->tree, splay_foreach_copy, fixed);
+ splay_tree_foreach (mutable_obj->tree, splay_foreach_copy, fixed);
/* We should have filled the array. */
gdb_assert (fixed->num_transitions == num_transitions);
@@ -457,7 +457,7 @@ addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
static void
-addrmap_mutable_relocate (struct addrmap *this, CORE_ADDR offset)
+addrmap_mutable_relocate (struct addrmap *self, CORE_ADDR offset)
{
/* Not needed yet. */
internal_error (__FILE__, __LINE__,
@@ -488,15 +488,15 @@ addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
static int
-addrmap_mutable_foreach (struct addrmap *this, addrmap_foreach_fn fn,
+addrmap_mutable_foreach (struct addrmap *self, addrmap_foreach_fn fn,
void *data)
{
- struct addrmap_mutable *mutable = (struct addrmap_mutable *) this;
+ struct addrmap_mutable *mutable_obj = (struct addrmap_mutable *) self;
struct mutable_foreach_data foreach_data;
foreach_data.fn = fn;
foreach_data.data = data;
- return splay_tree_foreach (mutable->tree, addrmap_mutable_foreach_worker,
+ return splay_tree_foreach (mutable_obj->tree, addrmap_mutable_foreach_worker,
&foreach_data);
}
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index c187ea0..b03716b 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -757,9 +757,9 @@ sync_threadlists (void)
else if (gi == gcount)
{
thread = add_thread (ptid_build (infpid, 0, pbuf[pi].pthid));
- thread->private = xmalloc (sizeof (struct private_thread_info));
- thread->private->pdtid = pbuf[pi].pdtid;
- thread->private->tid = pbuf[pi].tid;
+ thread->priv = xmalloc (sizeof (struct private_thread_info));
+ thread->priv->pdtid = pbuf[pi].pdtid;
+ thread->priv->tid = pbuf[pi].tid;
pi++;
}
else
@@ -776,8 +776,8 @@ sync_threadlists (void)
if (cmp_result == 0)
{
- gbuf[gi]->private->pdtid = pdtid;
- gbuf[gi]->private->tid = tid;
+ gbuf[gi]->priv->pdtid = pdtid;
+ gbuf[gi]->priv->tid = tid;
pi++;
gi++;
}
@@ -789,9 +789,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->priv = xmalloc (sizeof (struct private_thread_info));
+ thread->priv->pdtid = pdtid;
+ thread->priv->tid = tid;
pi++;
}
}
@@ -809,7 +809,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->priv->tid == tid);
}
/* Synchronize libpthdebug's state with the inferior and with GDB,
@@ -999,7 +999,7 @@ aix_thread_resume (struct target_ops *ops,
error (_("aix-thread resume: unknown pthread %ld"),
ptid_get_lwp (ptid));
- tid[0] = thread->private->tid;
+ tid[0] = thread->priv->tid;
if (tid[0] == PTHDB_INVALID_TID)
error (_("aix-thread resume: no tid for pthread %ld"),
ptid_get_lwp (ptid));
@@ -1313,10 +1313,10 @@ aix_thread_fetch_registers (struct target_ops *ops,
else
{
thread = find_thread_ptid (inferior_ptid);
- tid = thread->private->tid;
+ tid = thread->priv->tid;
if (tid == PTHDB_INVALID_TID)
- fetch_regs_user_thread (regcache, thread->private->pdtid);
+ fetch_regs_user_thread (regcache, thread->priv->pdtid);
else
fetch_regs_kernel_thread (regcache, regno, tid);
}
@@ -1667,10 +1667,10 @@ aix_thread_store_registers (struct target_ops *ops,
else
{
thread = find_thread_ptid (inferior_ptid);
- tid = thread->private->tid;
+ tid = thread->priv->tid;
if (tid == PTHDB_INVALID_TID)
- store_regs_user_thread (regcache, thread->private->pdtid);
+ store_regs_user_thread (regcache, thread->priv->pdtid);
else
store_regs_kernel_thread (regcache, regno, tid);
}
@@ -1764,8 +1764,8 @@ aix_thread_extra_thread_info (struct target_ops *self,
buf = mem_fileopen ();
- pdtid = thread->private->pdtid;
- tid = thread->private->tid;
+ pdtid = thread->priv->pdtid;
+ tid = thread->priv->tid;
if (tid != PTHDB_INVALID_TID)
/* i18n: Like "thread-identifier %d, [state] running, suspended" */
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index a661b88..e9de0f6 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -508,7 +508,7 @@ amd64_merge_classes (enum amd64_reg_class class1, enum amd64_reg_class class2)
return AMD64_SSE;
}
-static void amd64_classify (struct type *type, enum amd64_reg_class class[2]);
+static void amd64_classify (struct type *type, enum amd64_reg_class theclass[2]);
/* Return non-zero if TYPE is a non-POD structure or union type. */
@@ -527,19 +527,19 @@ amd64_non_pod_p (struct type *type)
arrays) and union types, and store the result in CLASS. */
static void
-amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
+amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2])
{
/* 1. If the size of an object is larger than two eightbytes, or in
C++, is a non-POD structure or union type, or contains
unaligned fields, it has class memory. */
if (TYPE_LENGTH (type) > 16 || amd64_non_pod_p (type))
{
- class[0] = class[1] = AMD64_MEMORY;
+ theclass[0] = theclass[1] = AMD64_MEMORY;
return;
}
/* 2. Both eightbytes get initialized to class NO_CLASS. */
- class[0] = class[1] = AMD64_NO_CLASS;
+ theclass[0] = theclass[1] = AMD64_NO_CLASS;
/* 3. Each field of an object is classified recursively so that
always two fields are considered. The resulting class is
@@ -551,9 +551,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
struct type *subtype = check_typedef (TYPE_TARGET_TYPE (type));
/* All fields in an array have the same type. */
- amd64_classify (subtype, class);
- if (TYPE_LENGTH (type) > 8 && class[1] == AMD64_NO_CLASS)
- class[1] = class[0];
+ amd64_classify (subtype, theclass);
+ if (TYPE_LENGTH (type) > 8 && theclass[1] == AMD64_NO_CLASS)
+ theclass[1] = theclass[0];
}
else
{
@@ -582,7 +582,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
gdb_assert (pos == 0 || pos == 1);
amd64_classify (subtype, subclass);
- class[pos] = amd64_merge_classes (class[pos], subclass[0]);
+ theclass[pos] = amd64_merge_classes (theclass[pos], subclass[0]);
if (bitsize <= 64 && pos == 0 && endpos == 1)
/* This is a bit of an odd case: We have a field that would
normally fit in one of the two eightbytes, except that
@@ -606,9 +606,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
use up all 16 bytes of the aggregate, and are already
handled just fine (because each portion sits on its own
8-byte). */
- class[1] = amd64_merge_classes (class[1], subclass[0]);
+ theclass[1] = amd64_merge_classes (theclass[1], subclass[0]);
if (pos == 0)
- class[1] = amd64_merge_classes (class[1], subclass[1]);
+ theclass[1] = amd64_merge_classes (theclass[1], subclass[1]);
}
}
@@ -616,26 +616,26 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
/* Rule (a): If one of the classes is MEMORY, the whole argument is
passed in memory. */
- if (class[0] == AMD64_MEMORY || class[1] == AMD64_MEMORY)
- class[0] = class[1] = AMD64_MEMORY;
+ if (theclass[0] == AMD64_MEMORY || theclass[1] == AMD64_MEMORY)
+ theclass[0] = theclass[1] = AMD64_MEMORY;
/* Rule (b): If SSEUP is not preceded by SSE, it is converted to
SSE. */
- if (class[0] == AMD64_SSEUP)
- class[0] = AMD64_SSE;
- if (class[1] == AMD64_SSEUP && class[0] != AMD64_SSE)
- class[1] = AMD64_SSE;
+ if (theclass[0] == AMD64_SSEUP)
+ theclass[0] = AMD64_SSE;
+ if (theclass[1] == AMD64_SSEUP && theclass[0] != AMD64_SSE)
+ theclass[1] = AMD64_SSE;
}
/* Classify TYPE, and store the result in CLASS. */
static void
-amd64_classify (struct type *type, enum amd64_reg_class class[2])
+amd64_classify (struct type *type, enum amd64_reg_class theclass[2])
{
enum type_code code = TYPE_CODE (type);
int len = TYPE_LENGTH (type);
- class[0] = class[1] = AMD64_NO_CLASS;
+ theclass[0] = theclass[1] = AMD64_NO_CLASS;
/* Arguments of types (signed and unsigned) _Bool, char, short, int,
long, long long, and pointers are in the INTEGER class. Similarly,
@@ -646,28 +646,28 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
|| code == TYPE_CODE_CHAR
|| code == TYPE_CODE_PTR || code == TYPE_CODE_REF)
&& (len == 1 || len == 2 || len == 4 || len == 8))
- class[0] = AMD64_INTEGER;
+ theclass[0] = AMD64_INTEGER;
/* Arguments of types float, double, _Decimal32, _Decimal64 and __m64
are in class SSE. */
else if ((code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
&& (len == 4 || len == 8))
/* FIXME: __m64 . */
- class[0] = AMD64_SSE;
+ theclass[0] = AMD64_SSE;
/* Arguments of types __float128, _Decimal128 and __m128 are split into
two halves. The least significant ones belong to class SSE, the most
significant one to class SSEUP. */
else if (code == TYPE_CODE_DECFLOAT && len == 16)
/* FIXME: __float128, __m128. */
- class[0] = AMD64_SSE, class[1] = AMD64_SSEUP;
+ theclass[0] = AMD64_SSE, theclass[1] = AMD64_SSEUP;
/* The 64-bit mantissa of arguments of type long double belongs to
class X87, the 16-bit exponent plus 6 bytes of padding belongs to
class X87UP. */
else if (code == TYPE_CODE_FLT && len == 16)
/* Class X87 and X87UP. */
- class[0] = AMD64_X87, class[1] = AMD64_X87UP;
+ theclass[0] = AMD64_X87, theclass[1] = AMD64_X87UP;
/* Arguments of complex T where T is one of the types float or
double get treated as if they are implemented as:
@@ -679,19 +679,19 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
*/
else if (code == TYPE_CODE_COMPLEX && len == 8)
- class[0] = AMD64_SSE;
+ theclass[0] = AMD64_SSE;
else if (code == TYPE_CODE_COMPLEX && len == 16)
- class[0] = class[1] = AMD64_SSE;
+ theclass[0] = theclass[1] = AMD64_SSE;
/* A variable of type complex long double is classified as type
COMPLEX_X87. */
else if (code == TYPE_CODE_COMPLEX && len == 32)
- class[0] = AMD64_COMPLEX_X87;
+ theclass[0] = AMD64_COMPLEX_X87;
/* Aggregates. */
else if (code == TYPE_CODE_ARRAY || code == TYPE_CODE_STRUCT
|| code == TYPE_CODE_UNION)
- amd64_classify_aggregate (type, class);
+ amd64_classify_aggregate (type, theclass);
}
static enum return_value_convention
@@ -699,7 +699,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *type, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- enum amd64_reg_class class[2];
+ enum amd64_reg_class theclass[2];
int len = TYPE_LENGTH (type);
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
@@ -710,7 +710,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
gdb_assert (!(readbuf && writebuf));
/* 1. Classify the return type with the classification algorithm. */
- amd64_classify (type, class);
+ amd64_classify (type, theclass);
/* 2. If the type has class MEMORY, then the caller provides space
for the return value and passes the address of this storage in
@@ -719,7 +719,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
On return %rax will contain the address that has been passed in
by the caller in %rdi. */
- if (class[0] == AMD64_MEMORY)
+ if (theclass[0] == AMD64_MEMORY)
{
/* As indicated by the comment above, the ABI guarantees that we
can always find the return value just after the function has
@@ -738,7 +738,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
/* 8. If the class is COMPLEX_X87, the real part of the value is
returned in %st0 and the imaginary part in %st1. */
- if (class[0] == AMD64_COMPLEX_X87)
+ if (theclass[0] == AMD64_COMPLEX_X87)
{
if (readbuf)
{
@@ -760,7 +760,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
return RETURN_VALUE_REGISTER_CONVENTION;
}
- gdb_assert (class[1] != AMD64_MEMORY);
+ gdb_assert (theclass[1] != AMD64_MEMORY);
gdb_assert (len <= 16);
for (i = 0; len > 0; i++, len -= 8)
@@ -768,7 +768,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
int regnum = -1;
int offset = 0;
- switch (class[i])
+ switch (theclass[i])
{
case AMD64_INTEGER:
/* 3. If the class is INTEGER, the next available register
@@ -801,7 +801,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
case AMD64_X87UP:
/* 7. If the class is X87UP, the value is returned together
with the previous X87 value in %st0. */
- gdb_assert (i > 0 && class[0] == AMD64_X87);
+ gdb_assert (i > 0 && theclass[0] == AMD64_X87);
regnum = AMD64_ST0_REGNUM;
offset = 8;
len = 2;
@@ -865,21 +865,21 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
{
struct type *type = value_type (args[i]);
int len = TYPE_LENGTH (type);
- enum amd64_reg_class class[2];
+ enum amd64_reg_class theclass[2];
int needed_integer_regs = 0;
int needed_sse_regs = 0;
int j;
/* Classify argument. */
- amd64_classify (type, class);
+ amd64_classify (type, theclass);
/* Calculate the number of integer and SSE registers needed for
this argument. */
for (j = 0; j < 2; j++)
{
- if (class[j] == AMD64_INTEGER)
+ if (theclass[j] == AMD64_INTEGER)
needed_integer_regs++;
- else if (class[j] == AMD64_SSE)
+ else if (theclass[j] == AMD64_SSE)
needed_sse_regs++;
}
@@ -906,7 +906,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
int regnum = -1;
int offset = 0;
- switch (class[j])
+ switch (theclass[j])
{
case AMD64_INTEGER:
regnum = integer_regnum[integer_reg++];
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 78c6d5d..f3abc12 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -264,14 +264,14 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
/* The user's string isn't in the list. Insert it after *ps. */
{
- struct bstring *new
+ struct bstring *newobj
= obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
- memcpy (&new->d.data, addr, length);
- new->length = length;
- new->next = bcache->bucket[hash_index];
- new->half_hash = half_hash;
- bcache->bucket[hash_index] = new;
+ memcpy (&newobj->d.data, addr, length);
+ newobj->length = length;
+ newobj->next = bcache->bucket[hash_index];
+ newobj->half_hash = half_hash;
+ bcache->bucket[hash_index] = newobj;
bcache->unique_count++;
bcache->unique_size += length;
@@ -280,7 +280,7 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
if (added)
*added = 1;
- return &new->d.data;
+ return &newobj->d.data;
}
}
diff --git a/gdb/block.c b/gdb/block.c
index 4175672..00a7012 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -34,7 +34,7 @@
struct block_namespace_info
{
const char *scope;
- struct using_direct *using;
+ struct using_direct *using_decl;
};
static void block_initialize_namespace (struct block *block,
@@ -326,7 +326,7 @@ block_using (const struct block *block)
if (block == NULL || BLOCK_NAMESPACE (block) == NULL)
return NULL;
else
- return BLOCK_NAMESPACE (block)->using;
+ return BLOCK_NAMESPACE (block)->using_decl;
}
/* Set BLOCK's using member to USING; if needed, allocate memory via
@@ -335,12 +335,12 @@ block_using (const struct block *block)
void
block_set_using (struct block *block,
- struct using_direct *using,
+ struct using_direct *using_decl,
struct obstack *obstack)
{
block_initialize_namespace (block, obstack);
- BLOCK_NAMESPACE (block)->using = using;
+ BLOCK_NAMESPACE (block)->using_decl = using_decl;
}
/* If BLOCK_NAMESPACE (block) is NULL, allocate it via OBSTACK and
@@ -354,7 +354,7 @@ block_initialize_namespace (struct block *block, struct obstack *obstack)
BLOCK_NAMESPACE (block)
= obstack_alloc (obstack, sizeof (struct block_namespace_info));
BLOCK_NAMESPACE (block)->scope = NULL;
- BLOCK_NAMESPACE (block)->using = NULL;
+ BLOCK_NAMESPACE (block)->using_decl = NULL;
}
}
diff --git a/gdb/block.h b/gdb/block.h
index e45f445..bdc5888 100644
--- a/gdb/block.h
+++ b/gdb/block.h
@@ -92,7 +92,7 @@ struct block
this block: using directives and the current namespace
scope. */
- struct block_namespace_info *namespace;
+ struct block_namespace_info *the_namespace;
}
cplus_specific;
}
@@ -118,7 +118,7 @@ struct global_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.the_namespace
struct blockvector
{
@@ -176,7 +176,7 @@ extern void block_set_scope (struct block *block, const char *scope,
extern struct using_direct *block_using (const struct block *block);
extern void block_set_using (struct block *block,
- struct using_direct *using,
+ struct using_direct *using_decl,
struct obstack *obstack);
extern const struct block *block_static_block (const struct block *block);
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index fb04932..2baf506 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -162,7 +162,7 @@ check_status_exception_catchpoint (struct bpstats *bs)
{
struct exception_catchpoint *self
= (struct exception_catchpoint *) bs->breakpoint_at;
- char *typename = NULL;
+ char *type_name = NULL;
volatile struct gdb_exception e;
bkpt_breakpoint_ops.check_status (bs);
@@ -178,22 +178,22 @@ check_status_exception_catchpoint (struct bpstats *bs)
char *canon;
fetch_probe_arguments (NULL, &typeinfo_arg);
- typename = cplus_typename_from_type_info (typeinfo_arg);
+ type_name = cplus_typename_from_type_info (typeinfo_arg);
- canon = cp_canonicalize_string (typename);
+ canon = cp_canonicalize_string (type_name);
if (canon != NULL)
{
- xfree (typename);
- typename = canon;
+ xfree (type_name);
+ type_name = canon;
}
}
if (e.reason < 0)
exception_print (gdb_stderr, e);
- else if (regexec (self->pattern, typename, 0, NULL, 0) != 0)
+ else if (regexec (self->pattern, type_name, 0, NULL, 0) != 0)
bs->stop = 0;
- xfree (typename);
+ xfree (type_name);
}
/* Implement the 're_set' method. */
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index bb3ee26..2a24a25 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1622,7 +1622,7 @@ augment_type_symtab (void)
struct context_stack *
push_context (int desc, CORE_ADDR valu)
{
- struct context_stack *new;
+ struct context_stack *newobj;
if (context_stack_depth == context_stack_size)
{
@@ -1632,18 +1632,18 @@ push_context (int desc, CORE_ADDR valu)
(context_stack_size * sizeof (struct context_stack)));
}
- new = &context_stack[context_stack_depth++];
- new->depth = desc;
- new->locals = local_symbols;
- new->old_blocks = pending_blocks;
- new->start_addr = valu;
- new->using_directives = using_directives;
- new->name = NULL;
+ newobj = &context_stack[context_stack_depth++];
+ newobj->depth = desc;
+ newobj->locals = local_symbols;
+ newobj->old_blocks = pending_blocks;
+ newobj->start_addr = valu;
+ newobj->using_directives = using_directives;
+ newobj->name = NULL;
local_symbols = NULL;
using_directives = NULL;
- return new;
+ return newobj;
}
/* Pop a context block. Returns the address of the context block just
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index e6de803..84f3a33 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -164,7 +164,7 @@ static int type_aggregate_p (struct type *);
struct type_stack *type_stack;
- struct objc_class_str class;
+ struct objc_class_str theclass;
}
%{
@@ -215,11 +215,11 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
%token <ssym> UNKNOWN_CPP_NAME
%token <voidval> COMPLETE
%token <tsym> TYPENAME
-%token <class> CLASSNAME /* ObjC Class name */
+%token <theclass> CLASSNAME /* ObjC Class name */
%type <sval> name
%type <svec> string_exp
%type <ssym> name_not_typename
-%type <tsym> typename
+%type <tsym> type_name
/* This is like a '[' token, but is only generated when parsing
Objective C. This lets us reuse the same parser without
@@ -238,7 +238,7 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
%token TEMPLATE
%token ERROR
%token NEW DELETE
-%type <sval> operator
+%type <sval> oper
%token REINTERPRET_CAST DYNAMIC_CAST STATIC_CAST CONST_CAST
%token ENTRY
%token TYPEOF
@@ -479,17 +479,17 @@ exp : exp OBJC_LBRAC exp1 ']'
exp : OBJC_LBRAC TYPENAME
{
- CORE_ADDR class;
+ CORE_ADDR theclass;
- class = lookup_objc_class (parse_gdbarch (pstate),
+ theclass = lookup_objc_class (parse_gdbarch (pstate),
copy_name ($2.stoken));
- if (class == 0)
+ if (theclass == 0)
error (_("%s is not an ObjC Class"),
copy_name ($2.stoken));
write_exp_elt_opcode (pstate, OP_LONG);
write_exp_elt_type (pstate,
parse_type (pstate)->builtin_int);
- write_exp_elt_longcst (pstate, (LONGEST) class);
+ write_exp_elt_longcst (pstate, (LONGEST) theclass);
write_exp_elt_opcode (pstate, OP_LONG);
start_msglist();
}
@@ -505,7 +505,7 @@ exp : OBJC_LBRAC CLASSNAME
write_exp_elt_opcode (pstate, OP_LONG);
write_exp_elt_type (pstate,
parse_type (pstate)->builtin_int);
- write_exp_elt_longcst (pstate, (LONGEST) $2.class);
+ write_exp_elt_longcst (pstate, (LONGEST) $2.theclass);
write_exp_elt_opcode (pstate, OP_LONG);
start_msglist();
}
@@ -1390,7 +1390,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
$2.length);
$$ = NULL;
}
- | UNSIGNED typename
+ | UNSIGNED type_name
{ $$ = lookup_unsigned_typename (parse_language (pstate),
parse_gdbarch (pstate),
TYPE_NAME($2.type)); }
@@ -1398,7 +1398,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
{ $$ = lookup_unsigned_typename (parse_language (pstate),
parse_gdbarch (pstate),
"int"); }
- | SIGNED_KEYWORD typename
+ | SIGNED_KEYWORD type_name
{ $$ = lookup_signed_typename (parse_language (pstate),
parse_gdbarch (pstate),
TYPE_NAME($2.type)); }
@@ -1419,7 +1419,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
{ $$ = follow_types ($1); }
;
-typename: TYPENAME
+type_name: TYPENAME
| INT_KEYWORD
{
$$.stoken.ptr = "int";
@@ -1501,7 +1501,7 @@ const_or_volatile_noopt: const_and_volatile
{ insert_type (tp_volatile); }
;
-operator: OPERATOR NEW
+oper: OPERATOR NEW
{ $$ = operator_stoken (" new"); }
| OPERATOR DELETE
{ $$ = operator_stoken (" delete"); }
@@ -1632,7 +1632,7 @@ name : NAME { $$ = $1.stoken; }
| TYPENAME { $$ = $1.stoken; }
| NAME_OR_INT { $$ = $1.stoken; }
| UNKNOWN_CPP_NAME { $$ = $1.stoken; }
- | operator { $$ = $1; }
+ | oper { $$ = $1; }
;
name_not_typename : NAME
@@ -1644,7 +1644,7 @@ name_not_typename : NAME
context where only a name could occur, this might be useful.
| NAME_OR_INT
*/
- | operator
+ | oper
{
struct field_of_this_result is_a_field_of_this;
@@ -2274,7 +2274,7 @@ enum token_flags
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
enum token_flags flags;
@@ -2493,7 +2493,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
+ if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
{
if ((tokentab3[i].flags & FLAG_CXX) != 0
&& parse_language (par_state)->la_language != language_cplus)
@@ -2506,7 +2506,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
+ if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
{
if ((tokentab2[i].flags & FLAG_CXX) != 0
&& parse_language (par_state)->la_language != language_cplus)
@@ -2803,7 +2803,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
/* Catch specific keywords. */
copy = copy_name (yylval.sval);
for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
- if (strcmp (copy, ident_tokens[i].operator) == 0)
+ if (strcmp (copy, ident_tokens[i].oper) == 0)
{
if ((ident_tokens[i].flags & FLAG_CXX) != 0
&& parse_language (par_state)->la_language != language_cplus)
@@ -2946,10 +2946,10 @@ classify_name (struct parser_state *par_state, const struct block *block,
CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
if (Class)
{
- yylval.class.class = Class;
+ yylval.theclass.theclass = Class;
sym = lookup_struct_typedef (copy, expression_context_block, 1);
if (sym)
- yylval.class.type = SYMBOL_TYPE (sym);
+ yylval.theclass.type = SYMBOL_TYPE (sym);
return CLASSNAME;
}
}
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 4ec6ec0..2ee2ae0 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -189,7 +189,7 @@ set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
of *LIST). */
struct cmd_list_element *
-add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
+add_cmd (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
const char *doc, struct cmd_list_element **list)
{
struct cmd_list_element *c
@@ -228,7 +228,7 @@ add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
}
c->name = name;
- c->class = class;
+ c->theclass = theclass;
set_cmd_cfunc (c, fun);
set_cmd_context (c, NULL);
c->doc = doc;
@@ -283,7 +283,7 @@ deprecate_cmd (struct cmd_list_element *cmd, const char *replacement)
}
struct cmd_list_element *
-add_alias_cmd (const char *name, const char *oldname, enum command_class class,
+add_alias_cmd (const char *name, const char *oldname, enum command_class theclass,
int abbrev_flag, struct cmd_list_element **list)
{
const char *tmp;
@@ -306,7 +306,7 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
return 0;
}
- c = add_cmd (name, class, NULL, old->doc, list);
+ c = add_cmd (name, theclass, NULL, old->doc, list);
/* If OLD->DOC can be freed, we should make another copy. */
if (old->doc_allocated)
@@ -335,13 +335,13 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
containing that list. */
struct cmd_list_element *
-add_prefix_cmd (const char *name, enum command_class class,
+add_prefix_cmd (const char *name, enum command_class theclass,
cmd_cfunc_ftype *fun,
const char *doc, struct cmd_list_element **prefixlist,
const char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
- struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
struct cmd_list_element *p;
c->prefixlist = prefixlist;
@@ -363,13 +363,13 @@ add_prefix_cmd (const char *name, enum command_class class,
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
struct cmd_list_element *
-add_abbrev_prefix_cmd (const char *name, enum command_class class,
+add_abbrev_prefix_cmd (const char *name, enum command_class theclass,
cmd_cfunc_ftype *fun, const char *doc,
struct cmd_list_element **prefixlist,
const char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
- struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
@@ -403,13 +403,13 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
static struct cmd_list_element *
add_set_or_show_cmd (const char *name,
enum cmd_types type,
- enum command_class class,
+ enum command_class theclass,
var_types var_type,
void *var,
const char *doc,
struct cmd_list_element **list)
{
- struct cmd_list_element *c = add_cmd (name, class, NULL, doc, list);
+ struct cmd_list_element *c = add_cmd (name, theclass, NULL, doc, list);
gdb_assert (type == set_cmd || type == show_cmd);
c->type = type;
@@ -432,7 +432,7 @@ add_set_or_show_cmd (const char *name,
static void
add_setshow_cmd_full (const char *name,
- enum command_class class,
+ enum command_class theclass,
var_types var_type, void *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -458,7 +458,7 @@ add_setshow_cmd_full (const char *name,
full_set_doc = xstrdup (set_doc);
full_show_doc = xstrdup (show_doc);
}
- set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
+ set = add_set_or_show_cmd (name, set_cmd, theclass, var_type, var,
full_set_doc, set_list);
set->doc_allocated = 1;
@@ -467,7 +467,7 @@ add_setshow_cmd_full (const char *name,
set_cmd_prefix (set, set_list);
- show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+ show = add_set_or_show_cmd (name, show_cmd, theclass, var_type, var,
full_show_doc, show_list);
show->doc_allocated = 1;
show->show_value_func = show_func;
@@ -485,7 +485,7 @@ add_setshow_cmd_full (const char *name,
void
add_setshow_enum_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
const char *const *enumlist,
const char **var,
const char *set_doc,
@@ -498,7 +498,7 @@ add_setshow_enum_cmd (const char *name,
{
struct cmd_list_element *c;
- add_setshow_cmd_full (name, class, var_enum, var,
+ add_setshow_cmd_full (name, theclass, var_enum, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -514,7 +514,7 @@ const char * const auto_boolean_enums[] = { "on", "off", "auto", NULL };
string. FUNC is the corresponding callback. */
void
add_setshow_auto_boolean_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
enum auto_boolean *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -525,7 +525,7 @@ add_setshow_auto_boolean_cmd (const char *name,
{
struct cmd_list_element *c;
- add_setshow_cmd_full (name, class, var_auto_boolean, var,
+ add_setshow_cmd_full (name, theclass, var_auto_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -538,7 +538,7 @@ add_setshow_auto_boolean_cmd (const char *name,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
+add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
cmd_sfunc_ftype *set_func,
@@ -549,7 +549,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
static const char *boolean_enums[] = { "on", "off", NULL };
struct cmd_list_element *c;
- add_setshow_cmd_full (name, class, var_boolean, var,
+ add_setshow_cmd_full (name, theclass, var_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -560,7 +560,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
-add_setshow_filename_cmd (const char *name, enum command_class class,
+add_setshow_filename_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -571,7 +571,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_result;
- add_setshow_cmd_full (name, class, var_filename, var,
+ add_setshow_cmd_full (name, theclass, var_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -582,7 +582,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
-add_setshow_string_cmd (const char *name, enum command_class class,
+add_setshow_string_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -591,7 +591,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
- add_setshow_cmd_full (name, class, var_string, var,
+ add_setshow_cmd_full (name, theclass, var_string, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -601,7 +601,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
struct cmd_list_element *
-add_setshow_string_noescape_cmd (const char *name, enum command_class class,
+add_setshow_string_noescape_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -612,7 +612,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_cmd;
- add_setshow_cmd_full (name, class, var_string_noescape, var,
+ add_setshow_cmd_full (name, theclass, var_string_noescape, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -623,7 +623,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
-add_setshow_optional_filename_cmd (const char *name, enum command_class class,
+add_setshow_optional_filename_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -634,7 +634,7 @@ add_setshow_optional_filename_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_result;
- add_setshow_cmd_full (name, class, var_optional_filename, var,
+ add_setshow_cmd_full (name, theclass, var_optional_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -666,7 +666,7 @@ integer_unlimited_completer (struct cmd_list_element *ignore,
value. SET_DOC and SHOW_DOC are the documentation strings. This
function is only used in Python API. Please don't use it elsewhere. */
void
-add_setshow_integer_cmd (const char *name, enum command_class class,
+add_setshow_integer_cmd (const char *name, enum command_class theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -677,7 +677,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set;
- add_setshow_cmd_full (name, class, var_integer, var,
+ add_setshow_cmd_full (name, theclass, var_integer, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -691,7 +691,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_uinteger_cmd (const char *name, enum command_class class,
+add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -702,7 +702,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set;
- add_setshow_cmd_full (name, class, var_uinteger, var,
+ add_setshow_cmd_full (name, theclass, var_uinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -716,7 +716,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_zinteger_cmd (const char *name, enum command_class class,
+add_setshow_zinteger_cmd (const char *name, enum command_class theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -725,7 +725,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
- add_setshow_cmd_full (name, class, var_zinteger, var,
+ add_setshow_cmd_full (name, theclass, var_zinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -734,7 +734,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
void
add_setshow_zuinteger_unlimited_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
int *var,
const char *set_doc,
const char *show_doc,
@@ -746,7 +746,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
{
struct cmd_list_element *set;
- add_setshow_cmd_full (name, class, var_zuinteger_unlimited, var,
+ add_setshow_cmd_full (name, theclass, var_zuinteger_unlimited, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -760,7 +760,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
-add_setshow_zuinteger_cmd (const char *name, enum command_class class,
+add_setshow_zuinteger_cmd (const char *name, enum command_class theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -769,7 +769,7 @@ add_setshow_zuinteger_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
- add_setshow_cmd_full (name, class, var_zuinteger, var,
+ add_setshow_cmd_full (name, theclass, var_zuinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -870,19 +870,19 @@ add_info_alias (const char *name, const char *oldname, int abbrev_flag)
/* Add an element to the list of commands. */
struct cmd_list_element *
-add_com (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
+add_com (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
const char *doc)
{
- return add_cmd (name, class, fun, doc, &cmdlist);
+ return add_cmd (name, theclass, fun, doc, &cmdlist);
}
/* Add an alias or abbreviation command to the list of commands. */
struct cmd_list_element *
-add_com_alias (const char *name, const char *oldname, enum command_class class,
+add_com_alias (const char *name, const char *oldname, enum command_class theclass,
int abbrev_flag)
{
- return add_alias_cmd (name, oldname, class, abbrev_flag, &cmdlist);
+ return add_alias_cmd (name, oldname, theclass, abbrev_flag, &cmdlist);
}
/* Recursively walk the commandlist structures, and print out the
@@ -991,7 +991,7 @@ help_cmd (const char *command, struct ui_file *stream)
/* If this is a class name, print all of the commands in the class. */
if (c->func == NULL)
- help_list (cmdlist, "", c->class, stream);
+ help_list (cmdlist, "", c->theclass, stream);
if (c->hook_pre || c->hook_post)
fprintf_filtered (stream,
@@ -1021,7 +1021,7 @@ help_cmd (const char *command, struct ui_file *stream)
*/
void
help_list (struct cmd_list_element *list, const char *cmdtype,
- enum command_class class, struct ui_file *stream)
+ enum command_class theclass, struct ui_file *stream)
{
int len;
char *cmdtype1, *cmdtype2;
@@ -1042,14 +1042,14 @@ help_list (struct cmd_list_element *list, const char *cmdtype,
strcpy (cmdtype2 + len - 1, " sub");
}
- if (class == all_classes)
+ if (theclass == all_classes)
fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2);
else
fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
- help_cmd_list (list, class, cmdtype, (int) class >= 0, stream);
+ help_cmd_list (list, theclass, cmdtype, (int) theclass >= 0, stream);
- if (class == all_classes)
+ if (theclass == all_classes)
{
fprintf_filtered (stream, "\n\
Type \"help%s\" followed by a class name for a list of commands in ",
@@ -1091,7 +1091,7 @@ help_all (struct ui_file *stream)
if (c->func == NULL)
{
fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
- help_cmd_list (cmdlist, c->class, "", 1, stream);
+ help_cmd_list (cmdlist, c->theclass, "", 1, stream);
}
}
@@ -1104,7 +1104,7 @@ help_all (struct ui_file *stream)
if (c->abbrev_flag)
continue;
- if (c->class == no_class)
+ if (c->theclass == no_class)
{
if (!seen_unclassified)
{
@@ -1187,7 +1187,7 @@ print_help_for_command (struct cmd_list_element *c, const char *prefix,
* is at the low level, not the high-level).
*/
void
-help_cmd_list (struct cmd_list_element *list, enum command_class class,
+help_cmd_list (struct cmd_list_element *list, enum command_class theclass,
const char *prefix, int recurse, struct ui_file *stream)
{
struct cmd_list_element *c;
@@ -1195,16 +1195,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class class,
for (c = list; c; c = c->next)
{
if (c->abbrev_flag == 0
- && (class == all_commands
- || (class == all_classes && c->func == NULL)
- || (class == c->class && c->func != NULL)))
+ && (theclass == all_commands
+ || (theclass == all_classes && c->func == NULL)
+ || (theclass == c->theclass && c->func != NULL)))
{
print_help_for_command (c, prefix, recurse, stream);
}
else if (c->abbrev_flag == 0 && recurse
- && class == class_user && c->prefixlist != NULL)
+ && theclass == class_user && c->prefixlist != NULL)
/* User-defined commands may be subcommands. */
- help_cmd_list (*c->prefixlist, class, c->prefixname,
+ help_cmd_list (*c->prefixlist, theclass, c->prefixname,
recurse, stream);
}
}
@@ -1898,6 +1898,6 @@ cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
int
cli_user_command_p (struct cmd_list_element *cmd)
{
- return (cmd->class == class_user
+ return (cmd->theclass == class_user
&& (cmd->func == do_cfunc || cmd->func == do_sfunc));
}
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index ec89325..a669ba6 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -53,7 +53,7 @@ struct cmd_list_element
const char *name;
/* Command class; class values are chosen by application program. */
- enum command_class class;
+ enum command_class theclass;
/* When 1 indicated that this command is deprecated. It may be
removed from gdb's command set in the future. */
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 2989b05..65232da 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1532,7 +1532,7 @@ define_command (char *comname, int from_tty)
{
int q;
- if (c->class == class_user || c->class == class_alias)
+ if (c->theclass == class_user || c->theclass == class_alias)
q = query (_("Redefine command \"%s\"? "), c->name);
else
q = query (_("Really redefine built-in command \"%s\"? "), c->name);
@@ -1584,11 +1584,11 @@ define_command (char *comname, int from_tty)
"Type commands for definition of \"%s\".", comfull);
cmds = read_command_lines (tmpbuf, from_tty, 1, 0, 0);
- if (c && c->class == class_user)
+ if (c && c->theclass == class_user)
free_command_lines (&c->user_commands);
newc = add_cmd (comname, class_user, user_defined_command,
- (c && c->class == class_user)
+ (c && c->theclass == class_user)
? c->doc : xstrdup ("User-defined."), list);
newc->user_commands = cmds;
@@ -1629,7 +1629,7 @@ document_command (char *comname, int from_tty)
tem = comname;
c = lookup_cmd (&tem, *list, "", 0, 1);
- if (c->class != class_user)
+ if (c->theclass != class_user)
error (_("Command \"%s\" is built-in."), comfull);
xsnprintf (tmpbuf, sizeof (tmpbuf), "Type documentation for \"%s\".",
@@ -1739,7 +1739,7 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
const char *prefixname = c->prefixname;
for (c = *c->prefixlist; c != NULL; c = c->next)
- if (c->class == class_user || c->prefixlist != NULL)
+ if (c->theclass == class_user || c->prefixlist != NULL)
show_user_1 (c, prefixname, c->name, gdb_stdout);
return;
}
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 09bf28d..8d01b52 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -37,8 +37,8 @@ notify_command_param_changed_p (int param_changed, struct cmd_list_element *c)
if (param_changed == 0)
return 0;
- if (c->class == class_maintenance || c->class == class_deprecated
- || c->class == class_obscure)
+ if (c->theclass == class_maintenance || c->theclass == class_deprecated
+ || c->theclass == class_obscure)
return 0;
return 1;
@@ -158,16 +158,16 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
{
case var_string:
{
- char *new;
+ char *newobj;
const char *p;
char *q;
int ch;
if (arg == NULL)
arg = "";
- new = (char *) xmalloc (strlen (arg) + 2);
+ newobj = (char *) xmalloc (strlen (arg) + 2);
p = arg;
- q = new;
+ q = newobj;
while ((ch = *p++) != '\000')
{
if (ch == '\\')
@@ -195,18 +195,18 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
*q++ = ' ';
#endif
*q++ = '\0';
- new = (char *) xrealloc (new, q - new);
+ newobj = (char *) xrealloc (newobj, q - newobj);
if (*(char **) c->var == NULL
- || strcmp (*(char **) c->var, new) != 0)
+ || strcmp (*(char **) c->var, newobj) != 0)
{
xfree (*(char **) c->var);
- *(char **) c->var = new;
+ *(char **) c->var = newobj;
option_changed = 1;
}
else
- xfree (new);
+ xfree (newobj);
}
break;
case var_string_noescape:
@@ -693,7 +693,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, const char *prefix)
}
else
{
- if (list->class != no_set_class)
+ if (list->theclass != no_set_class)
{
struct cleanup *option_chain
= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 20c8c5e..366d828 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -773,7 +773,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
struct objfile *objfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct context_stack *new;
+ struct context_stack *newobj;
struct coff_symbol coff_symbol;
struct coff_symbol *cs = &coff_symbol;
static struct internal_syment main_sym;
@@ -1067,9 +1067,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
context_stack_depth is zero, and complain if not. */
depth = 0;
- new = push_context (depth, fcn_start_addr);
+ newobj = push_context (depth, fcn_start_addr);
fcn_cs_saved.c_name = getsymname (&fcn_sym_saved);
- new->name =
+ newobj->name =
process_coff_symbol (&fcn_cs_saved,
&fcn_aux_saved, objfile);
}
@@ -1092,9 +1092,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
}
- new = pop_context ();
+ newobj = pop_context ();
/* Stack must be empty now. */
- if (context_stack_depth > 0 || new == NULL)
+ if (context_stack_depth > 0 || newobj == NULL)
{
complaint (&symfile_complaints,
_("Unmatched .ef symbol(s) ignored "
@@ -1129,8 +1129,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
enter_linenos (fcn_line_ptr, fcn_first_line,
fcn_last_line, objfile);
- finish_block (new->name, &local_symbols,
- new->old_blocks, new->start_addr,
+ finish_block (newobj->name, &local_symbols,
+ newobj->old_blocks, newobj->start_addr,
fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
+ ANOFFSET (objfile->section_offsets,
@@ -1158,8 +1158,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
}
- new = pop_context ();
- if (depth-- != new->depth)
+ newobj = pop_context ();
+ if (depth-- != newobj->depth)
{
complaint (&symfile_complaints,
_("Mismatched .eb symbol ignored "
@@ -1173,11 +1173,11 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
cs->c_value + ANOFFSET (objfile->section_offsets,
SECT_OFF_TEXT (objfile));
/* Make a block for the local symbols within. */
- finish_block (0, &local_symbols, new->old_blocks,
- new->start_addr, tmpaddr);
+ finish_block (0, &local_symbols, newobj->old_blocks,
+ newobj->start_addr, tmpaddr);
}
/* Now pop locals of block just finished. */
- local_symbols = new->locals;
+ local_symbols = newobj->locals;
}
break;
@@ -2060,7 +2060,7 @@ coff_read_struct_type (int index, int length, int lastsym,
struct type *type;
struct nextfield *list = 0;
- struct nextfield *new;
+ struct nextfield *newobj;
int nfields = 0;
int n;
char *name;
@@ -2087,9 +2087,9 @@ coff_read_struct_type (int index, int length, int lastsym,
case C_MOU:
/* Get space to record the next field's data. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
+ newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
+ newobj->next = list;
+ list = newobj;
/* Save the data. */
list->field.name = obstack_copy0 (&objfile->objfile_obstack,
@@ -2104,9 +2104,9 @@ coff_read_struct_type (int index, int length, int lastsym,
case C_FIELD:
/* Get space to record the next field's data. */
- new = (struct nextfield *) alloca (sizeof (struct nextfield));
- new->next = list;
- list = new;
+ newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
+ newobj->next = list;
+ list = newobj;
/* Save the data. */
list->field.name = obstack_copy0 (&objfile->objfile_obstack,
diff --git a/gdb/command.h b/gdb/command.h
index 956eeaa..bdf625b 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -248,7 +248,7 @@ typedef void (show_value_ftype) (struct ui_file *file,
extern show_value_ftype deprecated_show_value_hack;
extern void add_setshow_enum_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
const char *const *enumlist,
const char **var,
const char *set_doc,
@@ -260,7 +260,7 @@ extern void add_setshow_enum_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_auto_boolean_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
enum auto_boolean *var,
const char *set_doc,
const char *show_doc,
@@ -271,7 +271,7 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_boolean_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -281,7 +281,7 @@ extern void add_setshow_boolean_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_filename_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
char **var,
const char *set_doc,
const char *show_doc,
@@ -292,7 +292,7 @@ extern void add_setshow_filename_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_string_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
char **var,
const char *set_doc,
const char *show_doc,
@@ -304,7 +304,7 @@ extern void add_setshow_string_cmd (const char *name,
extern struct cmd_list_element *add_setshow_string_noescape_cmd
(const char *name,
- enum command_class class,
+ enum command_class theclass,
char **var,
const char *set_doc,
const char *show_doc,
@@ -315,7 +315,7 @@ extern struct cmd_list_element *add_setshow_string_noescape_cmd
struct cmd_list_element **show_list);
extern void add_setshow_optional_filename_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
char **var,
const char *set_doc,
const char *show_doc,
@@ -326,7 +326,7 @@ extern void add_setshow_optional_filename_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_integer_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
int *var,
const char *set_doc,
const char *show_doc,
@@ -337,7 +337,7 @@ extern void add_setshow_integer_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_uinteger_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
unsigned int *var,
const char *set_doc,
const char *show_doc,
@@ -348,7 +348,7 @@ extern void add_setshow_uinteger_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_zinteger_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
int *var,
const char *set_doc,
const char *show_doc,
@@ -359,7 +359,7 @@ extern void add_setshow_zinteger_cmd (const char *name,
struct cmd_list_element **show_list);
extern void add_setshow_zuinteger_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
unsigned int *var,
const char *set_doc,
const char *show_doc,
@@ -371,7 +371,7 @@ extern void add_setshow_zuinteger_cmd (const char *name,
extern void
add_setshow_zuinteger_unlimited_cmd (const char *name,
- enum command_class class,
+ enum command_class theclass,
int *var,
const char *set_doc,
const char *show_doc,
diff --git a/gdb/common/cleanups.c b/gdb/common/cleanups.c
index 964df7a..e57e4cc 100644
--- a/gdb/common/cleanups.c
+++ b/gdb/common/cleanups.c
@@ -79,15 +79,15 @@ static struct cleanup *
make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function,
void *arg, void (*free_arg) (void *))
{
- struct cleanup *new
+ struct cleanup *newobj
= (struct cleanup *) xmalloc (sizeof (struct cleanup));
struct cleanup *old_chain = *pmy_chain;
- new->next = *pmy_chain;
- new->function = function;
- new->free_arg = free_arg;
- new->arg = arg;
- *pmy_chain = new;
+ newobj->next = *pmy_chain;
+ newobj->function = function;
+ newobj->free_arg = free_arg;
+ newobj->arg = arg;
+ *pmy_chain = newobj;
gdb_assert (old_chain != NULL);
return old_chain;
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index ef12821..14d6324 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -343,10 +343,11 @@ gdb_fopen_cloexec (const char *filename, const char *opentype)
/* See filestuff.h. */
int
-gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2])
+gdb_socketpair_cloexec (int domain, int style, int protocol,
+ int filedes[2])
{
#ifdef HAVE_SOCKETPAIR
- int result = socketpair (namespace, style | SOCK_CLOEXEC, protocol, filedes);
+ int result = socketpair (domain, style | SOCK_CLOEXEC, protocol, filedes);
if (result != -1)
{
@@ -363,9 +364,9 @@ gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2])
/* See filestuff.h. */
int
-gdb_socket_cloexec (int namespace, int style, int protocol)
+gdb_socket_cloexec (int domain, int style, int protocol)
{
- int result = socket (namespace, style | SOCK_CLOEXEC, protocol);
+ int result = socket (domain, style | SOCK_CLOEXEC, protocol);
if (result != -1)
socket_mark_cloexec (result);
diff --git a/gdb/common/filestuff.h b/gdb/common/filestuff.h
index f44f3b1..98522a6 100644
--- a/gdb/common/filestuff.h
+++ b/gdb/common/filestuff.h
@@ -54,13 +54,13 @@ extern FILE *gdb_fopen_cloexec (const char *filename, const char *opentype);
/* Like 'socketpair', but ensures that the returned file descriptors
have the close-on-exec flag set. */
-extern int gdb_socketpair_cloexec (int namespace, int style, int protocol,
+extern int gdb_socketpair_cloexec (int domain, int style, int protocol,
int filedes[2]);
/* Like 'socket', but ensures that the returned file descriptor has
the close-on-exec flag set. */
-extern int gdb_socket_cloexec (int namespace, int style, int protocol);
+extern int gdb_socket_cloexec (int domain, int style, int protocol);
/* Like 'pipe', but ensures that the returned file descriptors have
the close-on-exec flag set. */
diff --git a/gdb/continuations.c b/gdb/continuations.c
index 412a085..e753dc1 100644
--- a/gdb/continuations.c
+++ b/gdb/continuations.c
@@ -39,13 +39,13 @@ make_continuation (struct continuation **pmy_chain,
continuation_ftype *function,
void *arg, void (*free_arg) (void *))
{
- struct continuation *new = XNEW (struct continuation);
+ struct continuation *newobj = XNEW (struct continuation);
- new->next = *pmy_chain;
- new->function = function;
- new->free_arg = free_arg;
- new->arg = arg;
- *pmy_chain = new;
+ newobj->next = *pmy_chain;
+ newobj->function = function;
+ newobj->free_arg = free_arg;
+ newobj->arg = arg;
+ *pmy_chain = newobj;
}
static void
diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y
index c1e7951..b4690ea 100644
--- a/gdb/cp-name-parser.y
+++ b/gdb/cp-name-parser.y
@@ -277,9 +277,9 @@ make_name (const char *name, int len)
const char *opname;
}
-%type <comp> exp exp1 type start start_opt operator colon_name
+%type <comp> exp exp1 type start start_opt oper colon_name
%type <comp> unqualified_name colon_ext_name
-%type <comp> template template_arg
+%type <comp> templ template_arg
%type <comp> builtin_type
%type <comp> typespec_2 array_indicator
%type <comp> colon_ext_only ext_only_name
@@ -439,7 +439,7 @@ demangler_special
{ $$ = fill_comp (DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, $2, $4); }
;
-operator : OPERATOR NEW
+oper : OPERATOR NEW
{
/* Match the whitespacing of cplus_demangle_operators.
It would abort on unrecognized string otherwise. */
@@ -554,8 +554,8 @@ conversion_op_name
/* DEMANGLE_COMPONENT_NAME */
/* This accepts certain invalid placements of '~'. */
-unqualified_name: operator
- | operator '<' template_params '>'
+unqualified_name: oper
+ | oper '<' template_params '>'
{ $$ = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, $1, $3.comp); }
| '~' NAME
{ $$ = make_dtor (gnu_v3_complete_object_dtor, $2); }
@@ -579,9 +579,9 @@ colon_name : name
name : nested_name NAME %prec NAME
{ $$ = $1.comp; d_right ($1.last) = $2; }
| NAME %prec NAME
- | nested_name template %prec NAME
+ | nested_name templ %prec NAME
{ $$ = $1.comp; d_right ($1.last) = $2; }
- | template %prec NAME
+ | templ %prec NAME
;
colon_ext_name : colon_name
@@ -611,13 +611,13 @@ nested_name : NAME COLONCOLON
d_left ($$.last) = $2;
d_right ($$.last) = NULL;
}
- | template COLONCOLON
+ | templ COLONCOLON
{ $$.comp = make_empty (DEMANGLE_COMPONENT_QUAL_NAME);
d_left ($$.comp) = $1;
d_right ($$.comp) = NULL;
$$.last = $$.comp;
}
- | nested_name template COLONCOLON
+ | nested_name templ COLONCOLON
{ $$.comp = $1.comp;
d_right ($1.last) = make_empty (DEMANGLE_COMPONENT_QUAL_NAME);
$$.last = d_right ($1.last);
@@ -628,7 +628,7 @@ nested_name : NAME COLONCOLON
/* DEMANGLE_COMPONENT_TEMPLATE */
/* DEMANGLE_COMPONENT_TEMPLATE_ARGLIST */
-template : NAME '<' template_params '>'
+templ : NAME '<' template_params '>'
{ $$ = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, $1, $3.comp); }
;
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index e278189..4f68432 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -126,7 +126,7 @@ cp_add_using_directive (const char *dest,
struct obstack *obstack)
{
struct using_direct *current;
- struct using_direct *new;
+ struct using_direct *newobj;
/* Has it already been added? */
@@ -163,39 +163,39 @@ cp_add_using_directive (const char *dest,
return;
}
- new = obstack_alloc (obstack, (sizeof (*new)
+ newobj = obstack_alloc (obstack, (sizeof (*newobj)
+ (VEC_length (const_char_ptr, excludes)
- * sizeof (*new->excludes))));
- memset (new, 0, sizeof (*new));
+ * sizeof (*newobj->excludes))));
+ memset (newobj, 0, sizeof (*newobj));
if (copy_names)
{
- new->import_src = obstack_copy0 (obstack, src, strlen (src));
- new->import_dest = obstack_copy0 (obstack, dest, strlen (dest));
+ newobj->import_src = obstack_copy0 (obstack, src, strlen (src));
+ newobj->import_dest = obstack_copy0 (obstack, dest, strlen (dest));
}
else
{
- new->import_src = src;
- new->import_dest = dest;
+ newobj->import_src = src;
+ newobj->import_dest = dest;
}
if (alias != NULL && copy_names)
- new->alias = obstack_copy0 (obstack, alias, strlen (alias));
+ newobj->alias = obstack_copy0 (obstack, alias, strlen (alias));
else
- new->alias = alias;
+ newobj->alias = alias;
if (declaration != NULL && copy_names)
- new->declaration = obstack_copy0 (obstack,
+ newobj->declaration = obstack_copy0 (obstack,
declaration, strlen (declaration));
else
- new->declaration = declaration;
+ newobj->declaration = declaration;
- memcpy (new->excludes, VEC_address (const_char_ptr, excludes),
- VEC_length (const_char_ptr, excludes) * sizeof (*new->excludes));
- new->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
+ memcpy (newobj->excludes, VEC_address (const_char_ptr, excludes),
+ VEC_length (const_char_ptr, excludes) * sizeof (*newobj->excludes));
+ newobj->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
- new->next = using_directives;
- using_directives = new;
+ newobj->next = using_directives;
+ using_directives = newobj;
}
/* Test whether or not NAMESPACE looks like it mentions an anonymous
@@ -293,14 +293,14 @@ cp_lookup_bare_symbol (const struct language_defn *langdef,
if (search)
{
- struct symbol *this;
+ struct symbol *lang_this;
struct type *type;
- this = lookup_language_this (language_def (language_cplus), block);
- if (this == NULL)
+ lang_this = lookup_language_this (language_def (language_cplus), block);
+ if (lang_this == NULL)
return NULL;
- type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (this)));
+ type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this)));
/* If TYPE_NAME is NULL, abandon trying to find this symbol.
This can happen for lambda functions compiled with clang++,
which outputs no name for the container class. */
@@ -384,7 +384,7 @@ cp_search_static_and_baseclasses (const char *name,
"this" if we can compute it. */
static struct symbol *
-cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
+cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name,
const struct block *block,
const domain_enum domain, int search)
{
@@ -393,11 +393,11 @@ cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
unsigned int prefix_len;
struct symbol *sym;
- if (namespace[0] != '\0')
+ if (the_namespace[0] != '\0')
{
- concatenated_name = alloca (strlen (namespace) + 2
+ concatenated_name = alloca (strlen (the_namespace) + 2
+ strlen (name) + 1);
- strcpy (concatenated_name, namespace);
+ strcpy (concatenated_name, the_namespace);
strcat (concatenated_name, "::");
strcat (concatenated_name, name);
name = concatenated_name;
@@ -412,7 +412,8 @@ cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
class/namespace. Since we're only searching static and global blocks
there's often no need to first do that lookup. */
- is_in_anonymous = namespace[0] != '\0' && cp_is_in_anonymous (namespace);
+ is_in_anonymous
+ = the_namespace[0] != '\0' && cp_is_in_anonymous (the_namespace);
sym = cp_basic_lookup_symbol (name, block, domain, is_in_anonymous);
if (sym != NULL)
return sym;
@@ -786,7 +787,7 @@ lookup_namespace_scope (const struct language_defn *langdef,
const char *scope,
int scope_len)
{
- char *namespace;
+ char *the_namespace;
if (scope[scope_len] != '\0')
{
@@ -822,10 +823,10 @@ lookup_namespace_scope (const struct language_defn *langdef,
if (scope_len == 0 && strchr (name, ':') == NULL)
return cp_lookup_bare_symbol (langdef, name, block, domain, 1);
- namespace = alloca (scope_len + 1);
- strncpy (namespace, scope, scope_len);
- namespace[scope_len] = '\0';
- return cp_lookup_symbol_in_namespace (namespace, name,
+ the_namespace = alloca (scope_len + 1);
+ strncpy (the_namespace, scope, scope_len);
+ the_namespace[scope_len] = '\0';
+ return cp_lookup_symbol_in_namespace (the_namespace, name,
block, domain, 1);
}
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 59463e3..260601f 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -56,7 +56,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 *the_namespace);
static void make_symbol_overload_list_qualified (const char *func_name);
@@ -326,15 +326,15 @@ replace_typedefs_qualified_name (struct demangle_parse_info *info,
{
if (d_left (comp)->type == DEMANGLE_COMPONENT_NAME)
{
- struct demangle_component new;
+ struct demangle_component newobj;
ui_file_write (buf, d_left (comp)->u.s_name.s,
d_left (comp)->u.s_name.len);
name = ui_file_obsavestring (buf, &info->obstack, &len);
- new.type = DEMANGLE_COMPONENT_NAME;
- new.u.s_name.s = name;
- new.u.s_name.len = len;
- if (inspect_type (info, &new, finder, data))
+ newobj.type = DEMANGLE_COMPONENT_NAME;
+ newobj.u.s_name.s = name;
+ newobj.u.s_name.len = len;
+ if (inspect_type (info, &newobj, finder, data))
{
char *n, *s;
long slen;
@@ -344,7 +344,7 @@ replace_typedefs_qualified_name (struct demangle_parse_info *info,
node. */
ui_file_rewind (buf);
- n = cp_comp_to_string (&new, 100);
+ n = cp_comp_to_string (&newobj, 100);
if (n == NULL)
{
/* If something went astray, abort typedef substitutions. */
@@ -1174,7 +1174,7 @@ overload_list_add_symbol (struct symbol *sym,
struct symbol **
make_symbol_overload_list (const char *func_name,
- const char *namespace)
+ const char *the_namespace)
{
struct cleanup *old_cleanups;
const char *name;
@@ -1187,15 +1187,15 @@ 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, the_namespace);
- if (namespace[0] == '\0')
+ if (the_namespace[0] == '\0')
name = func_name;
else
{
char *concatenated_name
- = alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
- strcpy (concatenated_name, namespace);
+ = alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
+ strcpy (concatenated_name, the_namespace);
strcat (concatenated_name, "::");
strcat (concatenated_name, func_name);
name = concatenated_name;
@@ -1226,19 +1226,19 @@ make_symbol_overload_list_block (const char *name,
static void
make_symbol_overload_list_namespace (const char *func_name,
- const char *namespace)
+ const char *the_namespace)
{
const char *name;
const struct block *block = NULL;
- if (namespace[0] == '\0')
+ if (the_namespace[0] == '\0')
name = func_name;
else
{
char *concatenated_name
- = alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
+ = alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
- strcpy (concatenated_name, namespace);
+ strcpy (concatenated_name, the_namespace);
strcat (concatenated_name, "::");
strcat (concatenated_name, func_name);
name = concatenated_name;
@@ -1263,7 +1263,7 @@ static void
make_symbol_overload_list_adl_namespace (struct type *type,
const char *func_name)
{
- char *namespace;
+ char *the_namespace;
const char *type_name;
int i, prefix_len;
@@ -1287,11 +1287,11 @@ make_symbol_overload_list_adl_namespace (struct type *type,
if (prefix_len != 0)
{
- namespace = alloca (prefix_len + 1);
- strncpy (namespace, type_name, prefix_len);
- namespace[prefix_len] = '\0';
+ the_namespace = alloca (prefix_len + 1);
+ strncpy (the_namespace, type_name, prefix_len);
+ the_namespace[prefix_len] = '\0';
- make_symbol_overload_list_namespace (func_name, namespace);
+ make_symbol_overload_list_namespace (func_name, the_namespace);
}
/* Check public base type */
@@ -1340,7 +1340,7 @@ reset_directive_searched (void *data)
static void
make_symbol_overload_list_using (const char *func_name,
- const char *namespace)
+ const char *the_namespace)
{
struct using_direct *current;
const struct block *block;
@@ -1365,7 +1365,7 @@ make_symbol_overload_list_using (const char *func_name,
if (current->alias != NULL || current->declaration != NULL)
continue;
- if (strcmp (namespace, current->import_dest) == 0)
+ if (strcmp (the_namespace, current->import_dest) == 0)
{
/* Mark this import as searched so that the recursive call
does not search it again. */
@@ -1383,7 +1383,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, the_namespace);
}
/* This does the bulk of the work of finding overloaded symbols.
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 407da62..cbff610 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -198,7 +198,7 @@ extern struct symbol *cp_lookup_symbol_nonlocal
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 *the_namespace,
const char *name,
const struct block *block,
const domain_enum domain);
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 624976b..93f4c1b 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -96,9 +96,9 @@ const char vtbl_ptr_name[] = "__vtbl_ptr_type";
int
cp_is_vtbl_ptr_type (struct type *type)
{
- const char *typename = type_name_no_tag (type);
+ const char *type_name = type_name_no_tag (type);
- return (typename != NULL && !strcmp (typename, vtbl_ptr_name));
+ return (type_name != NULL && !strcmp (type_name, vtbl_ptr_name));
}
/* Return truth value for the assertion that TYPE is of the type
diff --git a/gdb/d-exp.y b/gdb/d-exp.y
index c6543ca..9936b6b 100644
--- a/gdb/d-exp.y
+++ b/gdb/d-exp.y
@@ -946,7 +946,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
struct token
{
- char *operator;
+ char *oper;
int token;
enum exp_opcode opcode;
};
@@ -1330,7 +1330,7 @@ yylex (void)
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
+ if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -1339,7 +1339,7 @@ yylex (void)
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
+ if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
@@ -1565,7 +1565,7 @@ yylex (void)
/* Catch specific keywords. */
copy = copy_name (yylval.sval);
for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
- if (strcmp (copy, ident_tokens[i].operator) == 0)
+ if (strcmp (copy, ident_tokens[i].oper) == 0)
{
/* It is ok to always set this, even though we don't always
strictly need to. */
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 53ca1ea..90e61da 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -118,7 +118,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 ()->priv->task;
}
if (strcmp (args, "gdb") == 0)
return mach_task_self ();
@@ -258,32 +258,32 @@ info_mach_ports_command (char *args, int from_tty)
{
struct inferior *inf = current_inferior ();
- if (port == inf->private->task)
+ if (port == inf->priv->task)
printf_unfiltered (_(" inferior-task"));
- else if (port == inf->private->notify_port)
+ else if (port == inf->priv->notify_port)
printf_unfiltered (_(" inferior-notify"));
else
{
int k;
darwin_thread_t *t;
- for (k = 0; k < inf->private->exception_info.count; k++)
- if (port == inf->private->exception_info.ports[k])
+ for (k = 0; k < inf->priv->exception_info.count; k++)
+ if (port == inf->priv->exception_info.ports[k])
{
printf_unfiltered (_(" inferior-excp-port"));
break;
}
- if (inf->private->threads)
+ if (inf->priv->threads)
{
for (k = 0;
VEC_iterate(darwin_thread_t,
- inf->private->threads, k, t);
+ inf->priv->threads, k, t);
k++)
if (port == t->gdb_port)
{
printf_unfiltered (_(" inferior-thread for 0x%x"),
- inf->private->task);
+ inf->priv->task);
break;
}
}
@@ -742,7 +742,7 @@ info_mach_region_command (char *exp, int from_tty)
error (_("Inferior not available"));
inf = current_inferior ();
- darwin_debug_region (inf->private->task, address);
+ darwin_debug_region (inf->priv->task, address);
}
static void
@@ -811,7 +811,7 @@ info_mach_exceptions_command (char *args, int from_tty)
{
if (ptid_equal (inferior_ptid, null_ptid))
printf_unfiltered (_("No inferior running\n"));
- disp_exception (¤t_inferior ()->private->exception_info);
+ disp_exception (¤t_inferior ()->priv->exception_info);
return;
}
else if (strcmp (args, "host") == 0)
@@ -835,7 +835,7 @@ info_mach_exceptions_command (char *args, int from_tty)
inf = current_inferior ();
kret = task_get_exception_ports
- (inf->private->task, EXC_MASK_ALL, info.masks,
+ (inf->priv->task, EXC_MASK_ALL, info.masks,
&info.count, info.ports, info.behaviors, info.flavors);
MACH_CHECK_ERROR (kret);
disp_exception (&info);
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index dfce179..070f307 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -277,7 +277,7 @@ darwin_check_new_threads (struct inferior *inf)
unsigned int new_nbr;
unsigned int old_nbr;
unsigned int new_ix, old_ix;
- darwin_inferior *darwin_inf = inf->private;
+ darwin_inferior *darwin_inf = inf->priv;
VEC (darwin_thread_t) *thread_vec;
/* Get list of threads. */
@@ -372,7 +372,7 @@ darwin_check_new_threads (struct inferior *inf)
{
tp = find_thread_ptid (ptid_build (inf->pid, 0, 0));
gdb_assert (tp);
- tp->private = pti;
+ tp->priv = pti;
}
VEC_safe_push (darwin_thread_t, thread_vec, pti);
new_ix++;
@@ -403,13 +403,13 @@ darwin_check_new_threads (struct inferior *inf)
static int
find_inferior_task_it (struct inferior *inf, void *port_ptr)
{
- return inf->private->task == *(task_t*)port_ptr;
+ return inf->priv->task == *(task_t*)port_ptr;
}
static int
find_inferior_notify_it (struct inferior *inf, void *port_ptr)
{
- return inf->private->notify_port == *(task_t*)port_ptr;
+ return inf->priv->notify_port == *(task_t*)port_ptr;
}
/* Return an inferior by task port. */
@@ -434,7 +434,7 @@ darwin_find_thread (struct inferior *inf, thread_t thread)
int k;
for (k = 0;
- VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
+ VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
k++)
if (t->gdb_port == thread)
return t;
@@ -446,14 +446,14 @@ darwin_find_thread (struct inferior *inf, thread_t thread)
static void
darwin_suspend_inferior (struct inferior *inf)
{
- if (!inf->private->suspended)
+ if (!inf->priv->suspended)
{
kern_return_t kret;
- kret = task_suspend (inf->private->task);
+ kret = task_suspend (inf->priv->task);
MACH_CHECK_ERROR (kret);
- inf->private->suspended = 1;
+ inf->priv->suspended = 1;
}
}
@@ -462,14 +462,14 @@ darwin_suspend_inferior (struct inferior *inf)
static void
darwin_resume_inferior (struct inferior *inf)
{
- if (inf->private->suspended)
+ if (inf->priv->suspended)
{
kern_return_t kret;
- kret = task_resume (inf->private->task);
+ kret = task_resume (inf->priv->task);
MACH_CHECK_ERROR (kret);
- inf->private->suspended = 0;
+ [...]
[diff truncated at 100000 bytes]