public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-ratmice-compile-Wc++-compat: rename all "new" variables.
@ 2010-09-16 12:35 ratmice
0 siblings, 0 replies; only message in thread
From: ratmice @ 2010-09-16 12:35 UTC (permalink / raw)
To: archer-commits
The branch, archer-ratmice-compile-Wc++-compat has been updated
via 01aeffa7670159686da36a511d38394d5f78b585 (commit)
from 07cac3aae40f7ea8594d18eca62222a6c50666b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 01aeffa7670159686da36a511d38394d5f78b585
Author: matt rice <ratmice@gmail.com>
Date: Thu Sep 16 05:34:21 2010 -0700
rename all "new" variables.
-----------------------------------------------------------------------
Summary of changes:
gdb/bcache.c | 14 ++++----
gdb/buildsym.c | 20 +++++-----
gdb/cli/cli-setshow.c | 10 +++---
gdb/coffread.c | 39 ++++++++++----------
gdb/cp-namespace.c | 19 +++++-----
gdb/dbxread.c | 48 ++++++++++++------------
gdb/dwarf2loc.c | 2 +-
gdb/dwarf2read.c | 34 +++++++++---------
gdb/environ.c | 6 ++--
gdb/gdbtypes.c | 14 ++++----
gdb/jv-exp.y | 21 ++++++-----
gdb/macrotab.c | 14 ++++----
gdb/mdebugread.c | 18 +++++-----
gdb/memattr.c | 24 ++++++------
gdb/mi/mi-cmd-var.c | 8 ++--
gdb/minsyms.c | 22 ++++++------
gdb/objc-lang.c | 10 +++---
gdb/parse.c | 10 +++---
gdb/printcmd.c | 24 ++++++------
gdb/solib-darwin.c | 20 +++++-----
gdb/solib-irix.c | 25 +++++++------
gdb/solib-som.c | 65 ++++++++++++++++++---------------
gdb/solib-spu.c | 25 +++++++------
gdb/solib-svr4.c | 94 +++++++++++++++++++++++++------------------------
gdb/stabsread.c | 58 +++++++++++++++--------------
gdb/symtab.c | 41 +++++++++++----------
gdb/typeprint.c | 7 ++--
gdb/utils.c | 12 +++---
gdb/value.c | 10 +++---
gdb/varobj.c | 31 ++++++++--------
gdb/varobj.h | 2 +-
gdb/xcoffread.c | 32 +++++++++--------
32 files changed, 399 insertions(+), 380 deletions(-)
First 500 lines of diff:
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 2af1dbf..0493b8a 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -270,15 +270,15 @@ 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 *new_bstr
= (struct bstring *) 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 (&new_bstr->d.data, addr, length);
+ new_bstr->length = length;
+ new_bstr->next = bcache->bucket[hash_index];
+ new_bstr->half_hash = half_hash;
+ bcache->bucket[hash_index] = new_bstr;
bcache->unique_count++;
bcache->unique_size += length;
@@ -287,7 +287,7 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
if (added)
*added = 1;
- return &new->d.data;
+ return &new_bstr->d.data;
}
}
\f
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index b0bee14..928d9bc 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1223,7 +1223,7 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
struct context_stack *
push_context (int desc, CORE_ADDR valu)
{
- struct context_stack *new;
+ struct context_stack *new_ctxt;
if (context_stack_depth == context_stack_size)
{
@@ -1233,20 +1233,20 @@ 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->params = param_symbols;
- new->old_blocks = pending_blocks;
- new->start_addr = valu;
- new->using_directives = using_directives;
- new->name = NULL;
+ new_ctxt = &context_stack[context_stack_depth++];
+ new_ctxt->depth = desc;
+ new_ctxt->locals = local_symbols;
+ new_ctxt->params = param_symbols;
+ new_ctxt->old_blocks = pending_blocks;
+ new_ctxt->start_addr = valu;
+ new_ctxt->using_directives = using_directives;
+ new_ctxt->name = NULL;
local_symbols = NULL;
param_symbols = NULL;
using_directives = NULL;
- return new;
+ return new_ctxt;
}
/* Pop a context block. Returns the address of the context block just
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index f2cf15c..95ccc64 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -131,16 +131,16 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
{
case var_string:
{
- char *new;
+ char *new_val;
char *p;
char *q;
int ch;
if (arg == NULL)
arg = "";
- new = (char *) xmalloc (strlen (arg) + 2);
+ new_val = (char *) xmalloc (strlen (arg) + 2);
p = arg;
- q = new;
+ q = new_val;
while ((ch = *p++) != '\000')
{
if (ch == '\\')
@@ -168,10 +168,10 @@ do_setshow_command (char *arg, int from_tty, struct cmd_list_element *c)
*q++ = ' ';
#endif
*q++ = '\0';
- new = (char *) xrealloc (new, q - new);
+ new_val = (char *) xrealloc (new_val, q - new_val);
if (*(char **) c->var != NULL)
xfree (*(char **) c->var);
- *(char **) c->var = new;
+ *(char **) c->var = new_val;
}
break;
case var_string_noescape:
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 85e8140..242bb93 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -691,7 +691,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 *new_ctxt;
struct coff_symbol coff_symbol;
struct coff_symbol *cs = &coff_symbol;
static struct internal_syment main_sym;
@@ -983,9 +983,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);
+ new_ctxt = push_context (depth, fcn_start_addr);
fcn_cs_saved.c_name = getsymname (&fcn_sym_saved);
- new->name =
+ new_ctxt->name =
process_coff_symbol (&fcn_cs_saved, &fcn_aux_saved, objfile);
}
else if (strcmp (cs->c_name, ".ef") == 0)
@@ -1006,9 +1006,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
}
- new = pop_context ();
+ new_ctxt = pop_context ();
/* Stack must be empty now. */
- if (context_stack_depth > 0 || new == NULL)
+ if (context_stack_depth > 0 || new_ctxt == NULL)
{
complaint (&symfile_complaints,
_("Unmatched .ef symbol(s) ignored starting at symnum %d"),
@@ -1040,8 +1040,9 @@ 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 (new_ctxt->name, &local_symbols,
+ new_ctxt->old_blocks,
+ new_ctxt->start_addr,
fcn_cs_saved.c_value
+ fcn_aux_saved.x_sym.x_misc.x_fsize
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)),
@@ -1068,8 +1069,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
break;
}
- new = pop_context ();
- if (depth-- != new->depth)
+ new_ctxt = pop_context ();
+ if (depth-- != new_ctxt->depth)
{
complaint (&symfile_complaints,
_("Mismatched .eb symbol ignored starting at symnum %d"),
@@ -1081,11 +1082,11 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
tmpaddr =
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, objfile);
+ finish_block (0, &local_symbols, new_ctxt->old_blocks,
+ new_ctxt->start_addr, tmpaddr, objfile);
}
/* Now pop locals of block just finished. */
- local_symbols = new->locals;
+ local_symbols = new_ctxt->locals;
}
break;
@@ -1937,7 +1938,7 @@ coff_read_struct_type (int index, int length, int lastsym,
struct type *type;
struct nextfield *list = 0;
- struct nextfield *new;
+ struct nextfield *new_field;
int nfields = 0;
int n;
char *name;
@@ -1964,9 +1965,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;
+ new_field = (struct nextfield *) alloca (sizeof (struct nextfield));
+ new_field->next = list;
+ list = new_field;
/* Save the data. */
list->field.name =
@@ -1981,9 +1982,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;
+ new_field = (struct nextfield *) alloca (sizeof (struct nextfield));
+ new_field->next = list;
+ list = new_field;
/* Save the data. */
list->field.name =
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 5026b32..28c71ff 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -145,7 +145,7 @@ cp_add_using_directive (const char *dest,
struct obstack *obstack)
{
struct using_direct *current;
- struct using_direct *new;
+ struct using_direct *new_directive;
/* Has it already been added? */
@@ -162,20 +162,21 @@ cp_add_using_directive (const char *dest,
return;
}
- new = (struct using_direct *) OBSTACK_ZALLOC (obstack, struct using_direct);
+ new_directive
+ = (struct using_direct *) OBSTACK_ZALLOC (obstack, struct using_direct);
- new->import_src = obsavestring (src, strlen (src), obstack);
- new->import_dest = obsavestring (dest, strlen (dest), obstack);
+ new_directive->import_src = obsavestring (src, strlen (src), obstack);
+ new_directive->import_dest = obsavestring (dest, strlen (dest), obstack);
if (alias != NULL)
- new->alias = obsavestring (alias, strlen (alias), obstack);
+ new_directive->alias = obsavestring (alias, strlen (alias), obstack);
if (declaration != NULL)
- new->declaration = obsavestring (declaration, strlen (declaration),
- obstack);
+ new_directive->declaration = obsavestring (declaration,
+ strlen (declaration), obstack);
- new->next = using_directives;
- using_directives = new;
+ new_directive->next = using_directives;
+ using_directives = new_directive;
}
/* Record the namespace that the function defined by SYMBOL was
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 14fd761..c340fc8 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -2727,7 +2727,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
struct objfile *objfile)
{
struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct context_stack *new;
+ struct context_stack *new_ctxt;
/* This remembers the address of the start of a function. It is
used because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries
are relative to the current function's start address. On systems
@@ -2804,17 +2804,17 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
}
within_function = 0;
- new = pop_context ();
+ new_ctxt = pop_context ();
/* Make a block for the local symbols within. */
- block = finish_block (new->name, &local_symbols, new->old_blocks,
- new->start_addr, new->start_addr + valu,
- objfile);
+ block = finish_block (new_ctxt->name, &local_symbols,
+ new_ctxt->old_blocks, new_ctxt->start_addr,
+ new_ctxt->start_addr + valu, objfile);
/* For C++, set the block's scope. */
- if (SYMBOL_LANGUAGE (new->name) == language_cplus)
- cp_set_block_scope (new->name, block, &objfile->objfile_obstack,
- "", 0);
+ if (SYMBOL_LANGUAGE (new_ctxt->name) == language_cplus)
+ cp_set_block_scope (new_ctxt->name, block,
+ &objfile->objfile_obstack, "", 0);
/* May be switching to an assembler file which may not be using
block relative stabs, so reset the offset. */
@@ -2849,7 +2849,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
N_SO, the linker did not relocate them (sigh). */
valu += last_source_start_addr;
- new = push_context (desc, valu);
+ new_ctxt = push_context (desc, valu);
break;
case N_RBRAC:
@@ -2874,8 +2874,8 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
break;
}
- new = pop_context ();
- if (desc != new->depth)
+ new_ctxt = pop_context ();
+ if (desc != new_ctxt->depth)
lbrac_mismatch_complaint (symnum);
if (local_symbols != NULL)
@@ -2888,7 +2888,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
misplaced N_LBRAC entry; discarding local symbols which have \
no enclosing block"));
}
- local_symbols = new->locals;
+ local_symbols = new_ctxt->locals;
if (context_stack_depth > 1)
{
@@ -2903,15 +2903,15 @@ no enclosing block"));
/* Muzzle a compiler bug that makes end < start.
??? Which compilers? Is this ever harmful?. */
- if (new->start_addr > valu)
+ if (new_ctxt->start_addr > valu)
{
complaint (&symfile_complaints,
_("block start larger than block end"));
- new->start_addr = valu;
+ new_ctxt->start_addr = valu;
}
/* Make a block for the local symbols within. */
- finish_block (0, &local_symbols, new->old_blocks,
- new->start_addr, valu, objfile);
+ finish_block (0, &local_symbols, new_ctxt->old_blocks,
+ new_ctxt->start_addr, valu, objfile);
}
}
else
@@ -3209,21 +3209,21 @@ no enclosing block"));
{
struct block *block;
- new = pop_context ();
+ new_ctxt = pop_context ();
/* Make a block for the local symbols within. */
- block = finish_block (new->name, &local_symbols,
- new->old_blocks, new->start_addr,
- valu, objfile);
+ block = finish_block (new_ctxt->name, &local_symbols,
+ new_ctxt->old_blocks,
+ new_ctxt->start_addr, valu, objfile);
/* For C++, set the block's scope. */
- if (SYMBOL_LANGUAGE (new->name) == language_cplus)
- cp_set_block_scope (new->name, block,
+ if (SYMBOL_LANGUAGE (new_ctxt->name) == language_cplus)
+ cp_set_block_scope (new_ctxt->name, block,
&objfile->objfile_obstack,
"", 0);
}
- new = push_context (0, valu);
- new->name = define_symbol (valu, name, desc, type, objfile);
+ new_ctxt = push_context (0, valu);
+ new_ctxt->name = define_symbol (valu, name, desc, type, objfile);
break;
default:
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 7701593..3163985 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -260,7 +260,7 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset,
static void
dwarf_expr_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset)
{
- struct dwarf_expr_baton *debaton = (struct dwarf2_expr_baton *) ctx->baton;
+ struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) ctx->baton;
return per_cu_dwarf_call (ctx, die_offset, debaton->per_cu);
}
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 814f161..3941ecc 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -5437,7 +5437,7 @@ static void
read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->objfile;
- struct context_stack *new;
+ struct context_stack *new_ctxt;
CORE_ADDR lowpc;
CORE_ADDR highpc;
struct die_info *child_die;
@@ -5508,9 +5508,9 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
}
}
- new = push_context (0, lowpc);
- new->name = new_symbol_full (die, read_type_die (die, cu), cu,
- (struct symbol *) templ_func);
+ new_ctxt = push_context (0, lowpc);
+ new_ctxt->name = new_symbol_full (die, read_type_die (die, cu), cu,
+ (struct symbol *) templ_func);
/* If there is a location expression for DW_AT_frame_base, record
it. */
@@ -5525,7 +5525,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
has nothing to do with the location of the function, ouch! The
relationship should be: a function's symbol has-a frame base; a
frame-base has-a location expression. */
- dwarf2_symbol_mark_computed (attr, new->name, cu);
+ dwarf2_symbol_mark_computed (attr, new_ctxt->name, cu);
cu->list_in_scope = &local_symbols;
@@ -5574,14 +5574,14 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
}
}
- new = pop_context ();
+ new_ctxt = pop_context ();
/* Make a block for the local symbols within. */
- block = finish_block (new->name, &local_symbols, new->old_blocks,
+ block = finish_block (new_ctxt->name, &local_symbols, new_ctxt->old_blocks,
lowpc, highpc, objfile);
/* For C++, set the block's scope. */
if (cu->language == language_cplus || cu->language == language_fortran)
- cp_set_block_scope (new->name, block, &objfile->objfile_obstack,
+ cp_set_block_scope (new_ctxt->name, block, &objfile->objfile_obstack,
determine_prefix (die, cu),
processing_has_namespace_info);
@@ -5608,9 +5608,9 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
a function declares a class that has methods). This means that
when we finish processing a function scope, we may need to go
back to building a containing block's symbol lists. */
- local_symbols = new->locals;
- param_symbols = new->params;
- using_directives = new->using_directives;
+ local_symbols = new_ctxt->locals;
+ param_symbols = new_ctxt->params;
+ using_directives = new_ctxt->using_directives;
/* If we've finished processing a top-level function, subsequent
symbols go in the file symbol list. */
@@ -5625,7 +5625,7 @@ static void
read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->objfile;
- struct context_stack *new;
+ struct context_stack *new_ctxt;
CORE_ADDR lowpc, highpc;
struct die_info *child_die;
CORE_ADDR baseaddr;
@@ -5652,13 +5652,13 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
child_die = sibling_die (child_die);
}
}
- new = pop_context ();
+ new_ctxt = pop_context ();
if (local_symbols != NULL || using_directives != NULL)
{
struct block *block
- = finish_block (0, &local_symbols, new->old_blocks, new->start_addr,
- highpc, objfile);
+ = finish_block (0, &local_symbols, new_ctxt->old_blocks,
+ new_ctxt->start_addr, highpc, objfile);
/* Note that recording ranges after traversing children, as we
do here, means that recording a parent's ranges entails
@@ -5672,8 +5672,8 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
to do. */
dwarf2_record_block_ranges (die, block, baseaddr, cu);
}
- local_symbols = new->locals;
- using_directives = new->using_directives;
+ local_symbols = new_ctxt->locals;
+ using_directives = new_ctxt->using_directives;
}
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-16 12:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 12:35 [SCM] archer-ratmice-compile-Wc++-compat: rename all "new" variables ratmice
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).