aboutsummaryrefslogtreecommitdiff
path: root/binutils/stabs.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-10 13:40:44 +0000
committerNick Clifton <nickc@redhat.com>2009-09-10 13:40:44 +0000
commit3f5e193bd6e036c43af9326d777aed6cfc14fbcb (patch)
treeca5ab96592667cbb90238e7b707b8655b9afbf00 /binutils/stabs.c
parentc8676ae4523f210705553322445efeae9df702b0 (diff)
downloadgdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.zip
gdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.tar.gz
gdb-3f5e193bd6e036c43af9326d777aed6cfc14fbcb.tar.bz2
Updated soruces in binutils/* to compile cleanly with -Wc++-compat.
* binutils/addr2line.c (slurp_symtab): Fix casts. Introduce variable minisyms to avoid aliasing varning. * binutils/ar.c: Add casts. (normalize): Use name del instead of delete. (display_target_list,display_info_table): Change loop counter variable a to int. * binutils/bucomm.c: Add casts. * binutils/debug.c: Update function to use new names. (struct debug_baseclass): Rename member from virtual to is_virtual. (struct debug_type_s,struct debug_field_s,struct debug_baseclass_s,struct debug_method_s,struct debug_method_variant_s,struct debug_type_s): Rename struct from avoid name collision. * /binutils/debug.h: Use new struct names. * binutils/dwarf.c: Add casts. (free_debug_memory): Change loop counter variable a to int. * binutils/ieee.c: Add casts. (enum ieee_var_kind): Move to top level. (ieee_class_baseclass): Rename parameter virtual to is_virtual. (ieee_class_method_var): Rename variable virtual to is_virtual. * binutils/nm.c: Add casts. * binutils/objcopy.c: Add casts. (copy_archive): Rename variable delete to del. * binutils/objdump.c: Add casts. (dump_dwarf_section): Change loop counter variable i to int. * binutils/prdbg.c: Add casts. (pr_class_baseclass,tg_class_baseclass): Rename parameters virtual to is_virtual. * binutils/readelf.c: Add casts. (struct ia64_unw_table_entry,struct hppa_unw_table_entry): Move to top level. * binutils/size.c: Add casts. * binutils/stabs.c (parse_stab_type, parse_stab_range_type) (parse_stab_cpp_abbrev): Rename parameter from typename to type_name. (parse_stab_baseclasses): Rename variable virtual to is_virtual. * binutils/strings.c: Add casts. * binutils/wrstabs.c (stab_class_baseclass): Rename parameter virtual to is_virtual.
Diffstat (limited to 'binutils/stabs.c')
-rw-r--r--binutils/stabs.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/binutils/stabs.c b/binutils/stabs.c
index b40a095..c2bb266 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -1,6 +1,6 @@
/* stabs.c -- Parse stabs debugging information
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -1142,7 +1142,7 @@ parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
store the slot used if the type is being defined. */
static debug_type
-parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, debug_type **slotp)
+parse_stab_type (void *dhandle, struct stab_handle *info, const char *type_name, const char **pp, debug_type **slotp)
{
const char *orig;
int typenums[2];
@@ -1306,9 +1306,9 @@ parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename,
fleep:T20=xsfleep:
which define structures in terms of themselves. We need to
tell the caller to avoid building a circular structure. */
- if (typename != NULL
- && strncmp (typename, *pp, p - *pp) == 0
- && typename[p - *pp] == '\0')
+ if (type_name != NULL
+ && strncmp (type_name, *pp, p - *pp) == 0
+ && type_name[p - *pp] == '\0')
info->self_crossref = TRUE;
dtype = stab_find_tagged_type (dhandle, info, *pp, p - *pp, code);
@@ -1539,7 +1539,7 @@ parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename,
case 'r':
/* Range type. */
- dtype = parse_stab_range_type (dhandle, info, typename, pp, typenums);
+ dtype = parse_stab_range_type (dhandle, info, type_name, pp, typenums);
break;
case 'b':
@@ -1561,7 +1561,7 @@ parse_stab_type (void *dhandle, struct stab_handle *info, const char *typename,
case 's':
case 'u':
/* Struct or union type. */
- dtype = parse_stab_struct_type (dhandle, info, typename, pp,
+ dtype = parse_stab_struct_type (dhandle, info, type_name, pp,
descriptor == 's', typenums);
break;
@@ -1651,7 +1651,7 @@ parse_stab_type_number (const char **pp, int *typenums)
/* Parse a range type. */
static debug_type
-parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *typename, const char **pp, const int *typenums)
+parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *type_name, const char **pp, const int *typenums)
{
const char *orig;
int rangenums[2];
@@ -1750,11 +1750,11 @@ parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *type
long long int:t6=r1;0;-1;
long long unsigned int:t7=r1;0;-1;
We hack here to handle this reasonably. */
- if (typename != NULL)
+ if (type_name != NULL)
{
- if (strcmp (typename, "long long int") == 0)
+ if (strcmp (type_name, "long long int") == 0)
return debug_make_int_type (dhandle, 8, FALSE);
- else if (strcmp (typename, "long long unsigned int") == 0)
+ else if (strcmp (type_name, "long long unsigned int") == 0)
return debug_make_int_type (dhandle, 8, TRUE);
}
/* FIXME: The size here really depends upon the target. */
@@ -2117,7 +2117,7 @@ parse_stab_baseclasses (void *dhandle, struct stab_handle *info,
for (i = 0; i < c; i++)
{
- bfd_boolean virtual;
+ bfd_boolean is_virtual;
enum debug_visibility visibility;
bfd_vma bitpos;
debug_type type;
@@ -2125,14 +2125,14 @@ parse_stab_baseclasses (void *dhandle, struct stab_handle *info,
switch (**pp)
{
case '0':
- virtual = FALSE;
+ is_virtual = FALSE;
break;
case '1':
- virtual = TRUE;
+ is_virtual = TRUE;
break;
default:
warn_stab (orig, _("unknown virtual character for baseclass"));
- virtual = FALSE;
+ is_virtual = FALSE;
break;
}
++*pp;
@@ -2171,7 +2171,7 @@ parse_stab_baseclasses (void *dhandle, struct stab_handle *info,
if (type == DEBUG_TYPE_NULL)
return FALSE;
- classes[i] = debug_make_baseclass (dhandle, type, bitpos, virtual,
+ classes[i] = debug_make_baseclass (dhandle, type, bitpos, is_virtual,
visibility);
if (classes[i] == DEBUG_BASECLASS_NULL)
return FALSE;
@@ -2296,7 +2296,7 @@ parse_stab_cpp_abbrev (void *dhandle, struct stab_handle *info,
int cpp_abbrev;
debug_type context;
const char *name;
- const char *typename;
+ const char *type_name;
debug_type type;
bfd_vma bitpos;
@@ -2332,13 +2332,13 @@ parse_stab_cpp_abbrev (void *dhandle, struct stab_handle *info,
break;
case 'b':
/* $vb -- a virtual bsomethingorother */
- typename = debug_get_type_name (dhandle, context);
- if (typename == NULL)
+ type_name = debug_get_type_name (dhandle, context);
+ if (type_name == NULL)
{
warn_stab (orig, _("unnamed $vb type"));
- typename = "FOO";
+ type_name = "FOO";
}
- name = concat ("_vb$", typename, (const char *) NULL);
+ name = concat ("_vb$", type_name, (const char *) NULL);
break;
default:
warn_stab (orig, _("unrecognized C++ abbreviation"));