aboutsummaryrefslogtreecommitdiff
path: root/binutils/ieee.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/ieee.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/ieee.c')
-rw-r--r--binutils/ieee.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 7755478..fd8374b 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -59,6 +59,16 @@ struct ieee_blockstack
/* This structure holds information for a variable. */
+enum ieee_var_kind
+ {
+ IEEE_UNKNOWN,
+ IEEE_EXTERNAL,
+ IEEE_GLOBAL,
+ IEEE_STATIC,
+ IEEE_LOCAL,
+ IEEE_FUNCTION
+ };
+
struct ieee_var
{
/* Start of name. */
@@ -70,15 +80,7 @@ struct ieee_var
/* Slot if we make an indirect type. */
debug_type *pslot;
/* Kind of variable or function. */
- enum
- {
- IEEE_UNKNOWN,
- IEEE_EXTERNAL,
- IEEE_GLOBAL,
- IEEE_STATIC,
- IEEE_LOCAL,
- IEEE_FUNCTION
- } kind;
+ enum ieee_var_kind kind;
};
/* This structure holds all the variables. */
@@ -5451,7 +5453,7 @@ ieee_pointer_type (void *p)
if (! localp)
{
- m = ieee_get_modified_info (p, indx);
+ m = ieee_get_modified_info ((struct ieee_handle *) p, indx);
if (m == NULL)
return FALSE;
@@ -5509,7 +5511,7 @@ ieee_function_type (void *p, int argcount, bfd_boolean varargs)
m = NULL;
if (argcount < 0 && ! localp)
{
- m = ieee_get_modified_info (p, retindx);
+ m = ieee_get_modified_info ((struct ieee_handle *) p, retindx);
if (m == NULL)
return FALSE;
@@ -6199,7 +6201,7 @@ ieee_class_static_member (void *p, const char *name, const char *physname,
/* Add a base class to a class. */
static bfd_boolean
-ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual,
enum debug_visibility visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -6225,7 +6227,7 @@ ieee_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
class. The stabs debugging reader will create a field named
_vb$CLASS for a virtual base class, so we just use that. FIXME:
we should not depend upon a detail of stabs debugging. */
- if (virtual)
+ if (is_virtual)
{
fname = (char *) xmalloc (strlen (bname) + sizeof "_vb$");
sprintf (fname, "_vb$%s", bname);
@@ -6293,7 +6295,7 @@ ieee_class_method_var (struct ieee_handle *info, const char *physname,
{
unsigned int flags;
unsigned int nindx;
- bfd_boolean virtual;
+ bfd_boolean is_virtual;
/* We don't need the type of the method. An IEEE consumer which
wants the type must track down the function by the physical name
@@ -6323,18 +6325,18 @@ ieee_class_method_var (struct ieee_handle *info, const char *physname,
nindx = info->type_stack->type.classdef->indx;
- virtual = context || voffset > 0;
+ is_virtual = context || voffset > 0;
if (! ieee_change_buffer (info,
&info->type_stack->type.classdef->pmiscbuf)
- || ! ieee_write_asn (info, nindx, virtual ? 'v' : 'm')
+ || ! ieee_write_asn (info, nindx, is_virtual ? 'v' : 'm')
|| ! ieee_write_asn (info, nindx, flags)
|| ! ieee_write_atn65 (info, nindx,
info->type_stack->type.classdef->method)
|| ! ieee_write_atn65 (info, nindx, physname))
return FALSE;
- if (virtual)
+ if (is_virtual)
{
if (voffset > info->type_stack->type.classdef->voffset)
info->type_stack->type.classdef->voffset = voffset;