+2009-09-10 Martin Thuresson <martin@mtme.org>
+
+ Update soruces to compile cleanly with -Wc++-compat:
+
+ * addr2line.c (slurp_symtab): Fix casts. Introduce variable
+ minisyms to avoid aliasing varning.
+ * ar.c: Add casts.
+ (normalize): Use name del instead of delete.
+ (display_target_list,display_info_table): Change loop counter
+ variable a to int.
+ * bucomm.c: Add casts.
+ * 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.
+ * debug.h: Use new struct names.
+ * dwarf.c: Add casts.
+ (free_debug_memory): Change loop counter variable a to int.
+ * 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.
+ * nm.c: Add casts.
+ * objcopy.c: Add casts.
+ (copy_archive): Rename variable delete to del.
+ * objdump.c: Add casts.
+ (dump_dwarf_section): Change loop counter variable i to int.
+ * prdbg.c: Add casts.
+ (pr_class_baseclass,tg_class_baseclass): Rename parameters virtual
+ to is_virtual.
+ * readelf.c: Add casts.
+ (struct ia64_unw_table_entry,struct hppa_unw_table_entry): Move to
+ top level.
+ * size.c: Add casts.
+ * 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.
+ * strings.c: Add casts.
+ * wrstabs.c (stab_class_baseclass): Rename parameter virtual to
+ is_virtual.
+
2009-09-09 Nick Clifton <nickc@redhat.com>
PR 10478:
Cleanup code related to --identify option.
- * binutils/dlltool.c (file scope): Removed globals identify_ms,
+ * dlltool.c (file scope): Removed globals identify_ms,
identify_member_contains_symname_result,
identify_dll_name_list_head, and identify_dll_name_list_tail.
Renamed existing typedef dll_name_list_type to
/* addr2line.c -- convert addresses to line number and function name
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2009 Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
This file is part of GNU Binutils.
{
long symcount;
unsigned int size;
+ void *minisyms = &syms;
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
return;
- symcount = bfd_read_minisymbols (abfd, FALSE, (void *) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, FALSE, &minisyms, &size);
if (symcount == 0)
- symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (void *) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, &minisyms, &size);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
char *s;
/* Space leak. */
- s = xmalloc (abfd->xvec->ar_max_namelen + 1);
+ s = (char *) xmalloc (abfd->xvec->ar_max_namelen + 1);
memcpy (s, filename, abfd->xvec->ar_max_namelen);
s[abfd->xvec->ar_max_namelen] = '\0';
filename = s;
char c;
enum
{
- none = 0, delete, replace, print_table,
+ none = 0, del, replace, print_table,
print_files, extract, move, quick_append
} operation = none;
int arg_index;
switch (c)
{
case 'd':
- operation = delete;
+ operation = del;
operation_alters_arch = TRUE;
break;
case 'm':
if (counted_name_mode)
{
- if (operation != extract && operation != delete)
+ if (operation != extract && operation != del)
fatal (_("`N' is only meaningful with the `x' and `d' options."));
counted_name_counter = atoi (argv[arg_index++]);
if (counted_name_counter <= 0)
map_over_members (arch, extract_file, files, file_count);
break;
- case delete:
+ case del:
if (files != NULL)
delete_members (arch, files);
else
print_contents (bfd *abfd)
{
size_t ncopied = 0;
- char *cbuf = xmalloc (BUFSIZE);
+ char *cbuf = (char *) xmalloc (BUFSIZE);
struct stat buf;
size_t size;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
extract_file (bfd *abfd)
{
FILE *ostream;
- char *cbuf = xmalloc (BUFSIZE);
+ char *cbuf = (char *) xmalloc (BUFSIZE);
size_t nread, tocopy;
size_t ncopied = 0;
size_t size;
char *old_name, *new_name;
bfd *contents_head = iarch->archive_next;
- old_name = xmalloc (strlen (bfd_get_filename (iarch)) + 1);
+ old_name = (char *) xmalloc (strlen (bfd_get_filename (iarch)) + 1);
strcpy (old_name, bfd_get_filename (iarch));
new_name = make_tempname (old_name);
{
const bfd_target *p = bfd_target_vector[t];
bfd *abfd = bfd_openw (dummy_name, p->name);
- enum bfd_architecture a;
+ int a;
printf ("%s\n (header %s, data %s)\n", p->name,
endian_string (p->header_byteorder),
int t;
int ret = 1;
char *dummy_name;
- enum bfd_architecture a;
+ int a;
/* Print heading of target names. */
printf ("\n%*s", (int) LONGEST_ARCH, " ");
dummy_name = make_temp_file (NULL);
for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
- if (strcmp (bfd_printable_arch_mach (a, 0), "UNKNOWN!") != 0)
+ if (strcmp (bfd_printable_arch_mach ((enum bfd_architecture) a, 0),
+ "UNKNOWN!") != 0)
{
printf ("%*s ", (int) LONGEST_ARCH - 1,
- bfd_printable_arch_mach (a, 0));
+ bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
for (t = first; t < last && bfd_target_vector[t]; t++)
{
const bfd_target *p = bfd_target_vector[t];
if (ok)
{
- if (! bfd_set_arch_mach (abfd, a, 0))
+ if (! bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
ok = FALSE;
}
if (slash != (char *) NULL)
{
len = slash - path;
- tmpname = xmalloc (len + sizeof (template) + 2);
+ tmpname = (char *) xmalloc (len + sizeof (template) + 2);
memcpy (tmpname, path, len);
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
}
else
{
- tmpname = xmalloc (sizeof (template));
+ tmpname = (char *) xmalloc (sizeof (template));
len = 0;
}
if (curr)
free (buf);
curr = needed + (needed >> 1);
- buf = bfd_malloc (curr);
+ buf = (char *) bfd_malloc (curr);
/* If we can't malloc, fail safe by returning just the file name.
This function is only used when building error messages. */
if (!buf)
/* debug.c -- Handle generic debugging information.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2007,
+ 2009 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
/* A type. */
-struct debug_type
+struct debug_type_s
{
/* Kind of type. */
enum debug_type_kind kind;
/* DEBUG_KIND_ENUM. */
struct debug_enum_type *kenum;
/* DEBUG_KIND_POINTER. */
- struct debug_type *kpointer;
+ struct debug_type_s *kpointer;
/* DEBUG_KIND_FUNCTION. */
struct debug_function_type *kfunction;
/* DEBUG_KIND_REFERENCE. */
- struct debug_type *kreference;
+ struct debug_type_s *kreference;
/* DEBUG_KIND_RANGE. */
struct debug_range_type *krange;
/* DEBUG_KIND_ARRAY. */
/* DEBUG_KIND_METHOD. */
struct debug_method_type *kmethod;
/* DEBUG_KIND_CONST. */
- struct debug_type *kconst;
+ struct debug_type_s *kconst;
/* DEBUG_KIND_VOLATILE. */
- struct debug_type *kvolatile;
+ struct debug_type_s *kvolatile;
/* DEBUG_KIND_NAMED, DEBUG_KIND_TAGGED. */
struct debug_named_type *knamed;
} u;
/* A field in a struct or union. */
-struct debug_field
+struct debug_field_s
{
/* Name of the field. */
const char *name;
/* Type of the field. */
- struct debug_type *type;
+ struct debug_type_s *type;
/* Visibility of the field. */
enum debug_visibility visibility;
/* Whether this is a static member. */
/* A base class for an object. */
-struct debug_baseclass
+struct debug_baseclass_s
{
/* Type of the base class. */
- struct debug_type *type;
+ struct debug_type_s *type;
/* Bit position of the base class in the object. */
unsigned int bitpos;
/* Whether the base class is virtual. */
- bfd_boolean virtual;
+ bfd_boolean is_virtual;
/* Visibility of the base class. */
enum debug_visibility visibility;
};
/* A method of an object. */
-struct debug_method
+struct debug_method_s
{
/* The name of the method. */
const char *name;
/* A NULL terminated array of different types of variants. */
- struct debug_method_variant **variants;
+ struct debug_method_variant_s **variants;
};
/* The variants of a method function of an object. These indicate
which method to run. */
-struct debug_method_variant
+struct debug_method_variant_s
{
/* The physical name of the function. */
const char *physname;
/* The type of the function. */
- struct debug_type *type;
+ struct debug_type_s *type;
/* The visibility of the function. */
enum debug_visibility visibility;
/* Whether the function is const. */
/* If voffset is VOFFSET_STATIC_METHOD, this is a static method. */
#define VOFFSET_STATIC_METHOD ((bfd_vma) -1)
/* Context of a virtual method function. */
- struct debug_type *context;
+ struct debug_type_s *context;
};
/* A variable. This is the information we keep for a variable object.
union
{
/* DEBUG_OBJECT_TYPE. */
- struct debug_type *type;
+ struct debug_type_s *type;
/* DEBUG_OBJECT_TAG. */
- struct debug_type *tag;
+ struct debug_type_s *tag;
/* DEBUG_OBJECT_VARIABLE. */
struct debug_variable *variable;
/* DEBUG_OBJECT_FUNCTION. */
/* Next ID number. */
struct debug_class_id *next;
/* The type with the ID. */
- struct debug_type *type;
+ struct debug_type_s *type;
/* The tag; NULL if no tag. */
const char *tag;
};
/* Next type on list. */
struct debug_type_compare_list *next;
/* The types we are comparing. */
- struct debug_type *t1;
- struct debug_type *t2;
+ struct debug_type_s *t1;
+ struct debug_type_s *t2;
};
/* During debug_get_real_type, a linked list of these structures is
/* Next type on list. */
struct debug_type_real_list *next;
/* The type we are checking. */
- struct debug_type *t;
+ struct debug_type_s *t;
};
/* Local functions. */
static struct debug_name *debug_add_to_current_namespace
(struct debug_handle *, const char *, enum debug_object_kind,
enum debug_object_linkage);
-static struct debug_type *debug_make_type
+static struct debug_type_s *debug_make_type
(struct debug_handle *, enum debug_type_kind, unsigned int);
-static struct debug_type *debug_get_real_type
+static struct debug_type_s *debug_get_real_type
(void *, debug_type, struct debug_type_real_list *);
static bfd_boolean debug_write_name
(struct debug_handle *, const struct debug_write_fns *, void *,
struct debug_name *);
static bfd_boolean debug_write_type
(struct debug_handle *, const struct debug_write_fns *, void *,
- struct debug_type *, struct debug_name *);
+ struct debug_type_s *, struct debug_name *);
static bfd_boolean debug_write_class_type
(struct debug_handle *, const struct debug_write_fns *, void *,
- struct debug_type *, const char *);
+ struct debug_type_s *, const char *);
static bfd_boolean debug_write_function
(struct debug_handle *, const struct debug_write_fns *, void *,
const char *, enum debug_object_linkage, struct debug_function *);
static bfd_boolean debug_write_linenos
(struct debug_handle *, const struct debug_write_fns *, void *, bfd_vma);
static bfd_boolean debug_set_class_id
- (struct debug_handle *, const char *, struct debug_type *);
+ (struct debug_handle *, const char *, struct debug_type_s *);
static bfd_boolean debug_type_samep
- (struct debug_handle *, struct debug_type *, struct debug_type *);
+ (struct debug_handle *, struct debug_type_s *, struct debug_type_s *);
static bfd_boolean debug_class_type_samep
- (struct debug_handle *, struct debug_type *, struct debug_type *);
+ (struct debug_handle *, struct debug_type_s *, struct debug_type_s *);
\f
/* Issue an error message. */
/* Make a type with a given kind and size. */
-static struct debug_type *
+static struct debug_type_s *
debug_make_type (struct debug_handle *info ATTRIBUTE_UNUSED,
enum debug_type_kind kind, unsigned int size)
{
- struct debug_type *t;
+ struct debug_type_s *t;
- t = (struct debug_type *) xmalloc (sizeof *t);
+ t = (struct debug_type_s *) xmalloc (sizeof *t);
memset (t, 0, sizeof *t);
t->kind = kind;
debug_make_indirect_type (void *handle, debug_type *slot, const char *tag)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_indirect_type *i;
t = debug_make_type (info, DEBUG_KIND_INDIRECT, 0);
debug_make_int_type (void *handle, unsigned int size, bfd_boolean unsignedp)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
t = debug_make_type (info, DEBUG_KIND_INT, size);
if (t == NULL)
debug_field *fields)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_class_type *c;
t = debug_make_type (info,
bfd_boolean ownvptr)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_class_type *c;
t = debug_make_type (info,
bfd_signed_vma *values)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_enum_type *e;
t = debug_make_type (info, DEBUG_KIND_ENUM, 0);
debug_make_pointer_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
if (type == NULL)
return DEBUG_TYPE_NULL;
debug_type *arg_types, bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_function_type *f;
if (type == NULL)
debug_make_reference_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
if (type == NULL)
return DEBUG_TYPE_NULL;
bfd_signed_vma upper)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_range_type *r;
if (type == NULL)
bfd_signed_vma upper, bfd_boolean stringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_array_type *a;
if (element_type == NULL || range_type == NULL)
debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_set_type *s;
if (type == NULL)
debug_type target_type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_offset_type *o;
if (base_type == NULL || target_type == NULL)
bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_method_type *m;
if (return_type == NULL)
debug_make_const_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
if (type == NULL)
return DEBUG_TYPE_NULL;
debug_make_volatile_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
if (type == NULL)
return DEBUG_TYPE_NULL;
enum debug_type_kind kind)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
if (name == NULL)
return DEBUG_TYPE_NULL;
debug_baseclass
debug_make_baseclass (void *handle ATTRIBUTE_UNUSED, debug_type type,
- bfd_vma bitpos, bfd_boolean virtual,
+ bfd_vma bitpos, bfd_boolean is_virtual,
enum debug_visibility visibility)
{
- struct debug_baseclass *b;
+ struct debug_baseclass_s *b;
- b = (struct debug_baseclass *) xmalloc (sizeof *b);
+ b = (struct debug_baseclass_s *) xmalloc (sizeof *b);
memset (b, 0, sizeof *b);
b->type = type;
b->bitpos = bitpos;
- b->virtual = virtual;
+ b->is_virtual = is_virtual;
b->visibility = visibility;
return b;
debug_type type, bfd_vma bitpos, bfd_vma bitsize,
enum debug_visibility visibility)
{
- struct debug_field *f;
+ struct debug_field_s *f;
- f = (struct debug_field *) xmalloc (sizeof *f);
+ f = (struct debug_field_s *) xmalloc (sizeof *f);
memset (f, 0, sizeof *f);
f->name = name;
debug_type type, const char *physname,
enum debug_visibility visibility)
{
- struct debug_field *f;
+ struct debug_field_s *f;
- f = (struct debug_field *) xmalloc (sizeof *f);
+ f = (struct debug_field_s *) xmalloc (sizeof *f);
memset (f, 0, sizeof *f);
f->name = name;
debug_make_method (void *handle ATTRIBUTE_UNUSED, const char *name,
debug_method_variant *variants)
{
- struct debug_method *m;
+ struct debug_method_s *m;
- m = (struct debug_method *) xmalloc (sizeof *m);
+ m = (struct debug_method_s *) xmalloc (sizeof *m);
memset (m, 0, sizeof *m);
m->name = name;
bfd_boolean constp, bfd_boolean volatilep,
bfd_vma voffset, debug_type context)
{
- struct debug_method_variant *m;
+ struct debug_method_variant_s *m;
- m = (struct debug_method_variant *) xmalloc (sizeof *m);
+ m = (struct debug_method_variant_s *) xmalloc (sizeof *m);
memset (m, 0, sizeof *m);
m->physname = physname;
enum debug_visibility visibility,
bfd_boolean constp, bfd_boolean volatilep)
{
- struct debug_method_variant *m;
+ struct debug_method_variant_s *m;
- m = (struct debug_method_variant *) xmalloc (sizeof *m);
+ m = (struct debug_method_variant_s *) xmalloc (sizeof *m);
memset (m, 0, sizeof *m);
m->physname = physname;
debug_name_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_named_type *n;
struct debug_name *nm;
debug_tag_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
- struct debug_type *t;
+ struct debug_type_s *t;
struct debug_named_type *n;
struct debug_name *nm;
/* Get a base type. We build a linked list on the stack to avoid
crashing if the type is defined circularly. */
-static struct debug_type *
+static struct debug_type_s *
debug_get_real_type (void *handle, debug_type type,
struct debug_type_real_list *list)
{
static bfd_boolean
debug_write_type (struct debug_handle *info,
const struct debug_write_fns *fns, void *fhandle,
- struct debug_type *type, struct debug_name *name)
+ struct debug_type_s *type, struct debug_name *name)
{
unsigned int i;
int is;
return (*fns->typedef_type) (fhandle, type->u.knamed->name->name);
else
{
- struct debug_type *real;
+ struct debug_type_s *real;
unsigned int id;
real = debug_get_real_type ((void *) info, type, NULL);
{
for (i = 0; type->u.kclass->fields[i] != NULL; i++)
{
- struct debug_field *f;
+ struct debug_field_s *f;
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
static bfd_boolean
debug_write_class_type (struct debug_handle *info,
const struct debug_write_fns *fns, void *fhandle,
- struct debug_type *type, const char *tag)
+ struct debug_type_s *type, const char *tag)
{
unsigned int i;
unsigned int id;
- struct debug_type *vptrbase;
+ struct debug_type_s *vptrbase;
if (type->u.kclass == NULL)
{
{
for (i = 0; type->u.kclass->fields[i] != NULL; i++)
{
- struct debug_field *f;
+ struct debug_field_s *f;
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
{
for (i = 0; type->u.kclass->baseclasses[i] != NULL; i++)
{
- struct debug_baseclass *b;
+ struct debug_baseclass_s *b;
b = type->u.kclass->baseclasses[i];
if (! debug_write_type (info, fns, fhandle, b->type,
(struct debug_name *) NULL))
return FALSE;
- if (! (*fns->class_baseclass) (fhandle, b->bitpos, b->virtual,
+ if (! (*fns->class_baseclass) (fhandle, b->bitpos, b->is_virtual,
b->visibility))
return FALSE;
}
{
for (i = 0; type->u.kclass->methods[i] != NULL; i++)
{
- struct debug_method *m;
+ struct debug_method_s *m;
unsigned int j;
m = type->u.kclass->methods[i];
return FALSE;
for (j = 0; m->variants[j] != NULL; j++)
{
- struct debug_method_variant *v;
+ struct debug_method_variant_s *v;
v = m->variants[j];
if (v->context != NULL)
static bfd_boolean
debug_set_class_id (struct debug_handle *info, const char *tag,
- struct debug_type *type)
+ struct debug_type_s *type)
{
struct debug_class_type *c;
struct debug_class_id *l;
tags and the like. */
static bfd_boolean
-debug_type_samep (struct debug_handle *info, struct debug_type *t1,
- struct debug_type *t2)
+debug_type_samep (struct debug_handle *info, struct debug_type_s *t1,
+ struct debug_type_s *t2)
{
struct debug_type_compare_list *l;
struct debug_type_compare_list top;
ret = TRUE;
else
{
- struct debug_type **a1, **a2;
+ struct debug_type_s **a1, **a2;
a1 = t1->u.kfunction->arg_types;
a2 = t2->u.kfunction->arg_types;
ret = TRUE;
else
{
- struct debug_type **a1, **a2;
+ struct debug_type_s **a1, **a2;
a1 = t1->u.kmethod->arg_types;
a2 = t2->u.kmethod->arg_types;
debug_type_samep. */
static bfd_boolean
-debug_class_type_samep (struct debug_handle *info, struct debug_type *t1,
- struct debug_type *t2)
+debug_class_type_samep (struct debug_handle *info, struct debug_type_s *t1,
+ struct debug_type_s *t2)
{
struct debug_class_type *c1, *c2;
if (c1->fields != NULL)
{
- struct debug_field **pf1, **pf2;
+ struct debug_field_s **pf1, **pf2;
for (pf1 = c1->fields, pf2 = c2->fields;
*pf1 != NULL && *pf2 != NULL;
pf1++, pf2++)
{
- struct debug_field *f1, *f2;
+ struct debug_field_s *f1, *f2;
f1 = *pf1;
f2 = *pf2;
if (c1->baseclasses != NULL)
{
- struct debug_baseclass **pb1, **pb2;
+ struct debug_baseclass_s **pb1, **pb2;
for (pb1 = c1->baseclasses, pb2 = c2->baseclasses;
*pb1 != NULL && *pb2 != NULL;
++pb1, ++pb2)
{
- struct debug_baseclass *b1, *b2;
+ struct debug_baseclass_s *b1, *b2;
b1 = *pb1;
b2 = *pb2;
if (b1->bitpos != b2->bitpos
- || b1->virtual != b2->virtual
+ || b1->is_virtual != b2->is_virtual
|| b1->visibility != b2->visibility
|| ! debug_type_samep (info, b1->type, b2->type))
return FALSE;
if (c1->methods != NULL)
{
- struct debug_method **pm1, **pm2;
+ struct debug_method_s **pm1, **pm2;
for (pm1 = c1->methods, pm2 = c2->methods;
*pm1 != NULL && *pm2 != NULL;
++pm1, ++pm2)
{
- struct debug_method *m1, *m2;
+ struct debug_method_s *m1, *m2;
m1 = *pm1;
m2 = *pm2;
return FALSE;
if (m1->variants == NULL)
{
- struct debug_method_variant **pv1, **pv2;
+ struct debug_method_variant_s **pv1, **pv2;
for (pv1 = m1->variants, pv2 = m2->variants;
*pv1 != NULL && *pv2 != NULL;
++pv1, ++pv2)
{
- struct debug_method_variant *v1, *v2;
+ struct debug_method_variant_s *v1, *v2;
v1 = *pv1;
v2 = *pv2;
/* debug.h -- Describe generic debugging information.
- Copyright 1995, 1996, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2009
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
/* A type. */
-typedef struct debug_type *debug_type;
+typedef struct debug_type_s *debug_type;
#define DEBUG_TYPE_NULL ((debug_type) NULL)
/* A field in a struct or union. */
-typedef struct debug_field *debug_field;
+typedef struct debug_field_s *debug_field;
#define DEBUG_FIELD_NULL ((debug_field) NULL)
/* A base class for an object. */
-typedef struct debug_baseclass *debug_baseclass;
+typedef struct debug_baseclass_s *debug_baseclass;
#define DEBUG_BASECLASS_NULL ((debug_baseclass) NULL)
/* A method of an object. */
-typedef struct debug_method *debug_method;
+typedef struct debug_method_s *debug_method;
#define DEBUG_METHOD_NULL ((debug_method) NULL)
/* The arguments to a method function of an object. These indicate
which method to run. */
-typedef struct debug_method_variant *debug_method_variant;
+typedef struct debug_method_variant_s *debug_method_variant;
#define DEBUG_METHOD_VARIANT_NULL ((debug_method_variant) NULL)
{
abbrev_entry *entry;
- entry = malloc (sizeof (*entry));
+ entry = (abbrev_entry *) malloc (sizeof (*entry));
if (entry == NULL)
/* ugg */
{
abbrev_attr *attr;
- attr = malloc (sizeof (*attr));
+ attr = (abbrev_attr *) malloc (sizeof (*attr));
if (attr == NULL)
/* ugg */
if (max == 0 || num >= max)
{
max += 1024;
- debug_info_p->loc_offsets
- = xcrealloc (debug_info_p->loc_offsets,
+ debug_info_p->loc_offsets = (long unsigned int *)
+ xcrealloc (debug_info_p->loc_offsets,
max, sizeof (*debug_info_p->loc_offsets));
- debug_info_p->have_frame_base
- = xcrealloc (debug_info_p->have_frame_base,
+ debug_info_p->have_frame_base = (int *)
+ xcrealloc (debug_info_p->have_frame_base,
max, sizeof (*debug_info_p->have_frame_base));
debug_info_p->max_loc_offsets = max;
}
if (max == 0 || num >= max)
{
max += 1024;
- debug_info_p->range_lists
- = xcrealloc (debug_info_p->range_lists,
+ debug_info_p->range_lists = (long unsigned int *)
+ xcrealloc (debug_info_p->range_lists,
max, sizeof (*debug_info_p->range_lists));
debug_info_p->max_range_lists = max;
}
}
/* Then allocate an array to hold the information. */
- debug_information = cmalloc (num_units,
- sizeof (* debug_information));
+ debug_information = (debug_info *) cmalloc (num_units,
+ sizeof (* debug_information));
if (debug_information == NULL)
{
error (_("Not enough memory for a debug info array of %u entries"),
}
/* Go through the directory table again to save the directories. */
- directory_table = xmalloc (n_directories * sizeof (unsigned char *));
+ directory_table = (unsigned char **)
+ xmalloc (n_directories * sizeof (unsigned char *));
i = 0;
while (*ptr_directory_table != 0)
}
/* Go through the file table again to save the strings. */
- file_table = xmalloc (n_files * sizeof (File_Entry));
+ file_table = (File_Entry *) xmalloc (n_files * sizeof (File_Entry));
i = 0;
while (*ptr_file_name_table != 0)
if ((fileNameLength > MAX_FILENAME_LENGTH) && (!do_wide))
{
- newFileName = xmalloc (MAX_FILENAME_LENGTH + 1);
+ newFileName = (char *) xmalloc (MAX_FILENAME_LENGTH + 1);
/* Truncate file name */
strncpy (newFileName,
fileName + fileNameLength - MAX_FILENAME_LENGTH,
}
else
{
- newFileName = xmalloc (fileNameLength + 1);
+ newFileName = (char *) xmalloc (fileNameLength + 1);
strncpy (newFileName, fileName, fileNameLength + 1);
}
unsigned int lineno;
const char *string;
- op = *curr;
+ op = (enum dwarf_macinfo_record_type) *curr;
curr++;
switch (op)
static int
range_entry_compar (const void *ap, const void *bp)
{
- const struct range_entry *a_re = ap;
- const struct range_entry *b_re = bp;
+ const struct range_entry *a_re = (const struct range_entry *) ap;
+ const struct range_entry *b_re = (const struct range_entry *) bp;
const unsigned long a = a_re->ranges_offset;
const unsigned long b = b_re->ranges_offset;
if (num_range_list == 0)
error (_("No range lists in .debug_info section!\n"));
- range_entries = xmalloc (sizeof (*range_entries) * num_range_list);
+ range_entries = (struct range_entry *)
+ xmalloc (sizeof (*range_entries) * num_range_list);
range_entry_fill = range_entries;
for (i = 0; i < num_debug_info_entries; i++)
return -1;
fc->ncols = reg + 1;
- fc->col_type = xcrealloc (fc->col_type, fc->ncols, sizeof (short int));
- fc->col_offset = xcrealloc (fc->col_offset, fc->ncols, sizeof (int));
+ fc->col_type = (short int *) xcrealloc (fc->col_type, fc->ncols,
+ sizeof (short int));
+ fc->col_offset = (int *) xcrealloc (fc->col_offset, fc->ncols, sizeof (int));
while (prev < fc->ncols)
{
{
int version;
- fc = xmalloc (sizeof (Frame_Chunk));
+ fc = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
memset (fc, 0, sizeof (Frame_Chunk));
fc->next = chunks;
chunks = fc;
fc->chunk_start = saved_start;
fc->ncols = 0;
- fc->col_type = xmalloc (sizeof (short int));
- fc->col_offset = xmalloc (sizeof (int));
+ fc->col_type = (short int *) xmalloc (sizeof (short int));
+ fc->col_offset = (int *) xmalloc (sizeof (int));
frame_need_space (fc, max_regs - 1);
version = *start++;
warn ("Invalid CIE pointer %#08lx in FDE at %#08lx\n",
cie_id, (unsigned long)(saved_start - section_start));
fc->ncols = 0;
- fc->col_type = xmalloc (sizeof (short int));
- fc->col_offset = xmalloc (sizeof (int));
+ fc->col_type = (short int *) xmalloc (sizeof (short int));
+ fc->col_offset = (int *) xmalloc (sizeof (int));
frame_need_space (fc, max_regs - 1);
cie = fc;
fc->augmentation = "";
else
{
fc->ncols = cie->ncols;
- fc->col_type = xcmalloc (fc->ncols, sizeof (short int));
- fc->col_offset = xcmalloc (fc->ncols, sizeof (int));
+ fc->col_type = (short int *) xcmalloc (fc->ncols, sizeof (short int));
+ fc->col_offset = (int *) xcmalloc (fc->ncols, sizeof (int));
memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int));
memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int));
fc->augmentation = cie->augmentation;
case DW_CFA_remember_state:
if (! do_debug_frames_interp)
printf (" DW_CFA_remember_state\n");
- rs = xmalloc (sizeof (Frame_Chunk));
+ rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk));
rs->ncols = fc->ncols;
- rs->col_type = xcmalloc (rs->ncols, sizeof (short int));
- rs->col_offset = xcmalloc (rs->ncols, sizeof (int));
+ rs->col_type = (short int *) xcmalloc (rs->ncols,
+ sizeof (short int));
+ rs->col_offset = (int *) xcmalloc (rs->ncols, sizeof (int));
memcpy (rs->col_type, fc->col_type, rs->ncols);
memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int));
rs->next = remembered_state;
void
free_debug_memory (void)
{
- enum dwarf_section_display_enum i;
+ unsigned int i;
free_abbrevs ();
for (i = 0; i < max; i++)
- free_debug_section (i);
+ free_debug_section ((enum dwarf_section_display_enum) i);
if (debug_information != NULL)
{
/* 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. */
/* 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. */
if (! localp)
{
- m = ieee_get_modified_info (p, indx);
+ m = ieee_get_modified_info ((struct ieee_handle *) p, indx);
if (m == NULL)
return FALSE;
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;
/* 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;
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);
{
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
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;
/* We are going to return a special set of symbols and sizes to
print. */
- symsizes = xmalloc (symcount * sizeof (struct size_sym));
+ symsizes = (struct size_sym *) xmalloc (symcount * sizeof (struct size_sym));
*symsizesp = symsizes;
/* Note that filter_symbols has already removed all absolute and
if (relsize < 0)
bfd_fatal (bfd_get_filename (abfd));
- *data->relocs = xmalloc (relsize);
+ *data->relocs = (arelent **) xmalloc (relsize);
*data->relcount = bfd_canonicalize_reloc (abfd, sec, *data->relocs,
data->syms);
if (*data->relcount < 0)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
bfd_fatal (bfd_get_filename (abfd));
- syms = xmalloc (symsize);
+ syms = (asymbol **) xmalloc (symsize);
symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
seccount = bfd_count_sections (abfd);
- secs = xmalloc (seccount * sizeof *secs);
- relocs = xmalloc (seccount * sizeof *relocs);
- relcount = xmalloc (seccount * sizeof *relcount);
+ secs = (asection **) xmalloc (seccount * sizeof *secs);
+ relocs = (arelent ***) xmalloc (seccount * sizeof *relocs);
+ relcount = (long *) xmalloc (seccount * sizeof *relcount);
info.secs = secs;
info.relocs = relocs;
if (dynamic)
{
dyn_count = symcount;
- dyn_syms = minisyms;
+ dyn_syms = (asymbol **) minisyms;
}
else
{
long storage = bfd_get_dynamic_symtab_upper_bound (abfd);
static_count = symcount;
- static_syms = minisyms;
+ static_syms = (asymbol **) minisyms;
if (storage > 0)
{
- dyn_syms = xmalloc (storage);
+ dyn_syms = (asymbol **) xmalloc (storage);
dyn_count = bfd_canonicalize_dynamic_symtab (abfd, dyn_syms);
if (dyn_count < 0)
bfd_fatal (bfd_get_filename (abfd));
long i;
new_mini = xmalloc ((symcount + synth_count + 1) * sizeof (*symp));
- symp = new_mini;
+ symp = (asymbol **) new_mini;
memcpy (symp, minisyms, symcount * sizeof (*symp));
symp += symcount;
for (i = 0; i < synth_count; i++)
{
char *copy;
- copy = xmalloc (len + 1);
+ copy = (char *) xmalloc (len + 1);
strncpy (copy, s, len);
copy[len] = '\0';
non_fatal (_("unrecognized section flag `%s'"), copy);
if (! add)
return NULL;
- p = xmalloc (sizeof (struct section_list));
+ p = (struct section_list *) xmalloc (sizeof (struct section_list));
p->name = name;
p->used = FALSE;
p->remove = FALSE;
static int
eq_string (const void *s1, const void *s2)
{
- return strcmp (s1, s2) == 0;
+ return strcmp ((const char *) s1, (const char *) s2) == 0;
}
static htab_t
return;
}
- buffer = xmalloc (size + 2);
+ buffer = (char *) xmalloc (size + 2);
f = fopen (filename, FOPEN_RT);
if (f == NULL)
fatal (_("cannot open '%s': %s"), filename, strerror (errno));
static int
is_specified_symbol_predicate (void **slot, void *data)
{
- struct is_specified_symbol_predicate_data *d = data;
- const char *slot_name = *slot;
+ struct is_specified_symbol_predicate_data *d =
+ (struct is_specified_symbol_predicate_data *) data;
+ const char *slot_name = (char *) *slot;
if (*slot_name != '!')
{
{
char *n, *ptr;
- ptr = n = xmalloc (1 + strlen (prefix_symbols_string)
- + strlen (name) + 1);
+ ptr = n = (char *) xmalloc (1 + strlen (prefix_symbols_string)
+ + strlen (name) + 1);
if (add_leading_char)
*ptr++ = bfd_get_symbol_leading_char (obfd);
cause, target);
}
- new_node = xmalloc (sizeof (struct redefine_node));
+ new_node = (struct redefine_node *) xmalloc (sizeof (struct redefine_node));
new_node->source = strdup (source);
new_node->target = strdup (target);
filename, strerror (errno));
bufsize = 100;
- buf = xmalloc (bufsize);
+ buf = (char *) xmalloc (bufsize);
lineno = 1;
c = getc (file);
if (len >= bufsize)
{
bufsize *= 2;
- buf = xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize);
}
c = getc (file);
}
if (len >= bufsize)
{
bufsize *= 2;
- buf = xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize);
}
c = getc (file);
}
printf (_("copy from `%s' [unknown] to `%s' [unknown]\n"),
bfd_get_archive_filename (ibfd), bfd_get_filename (obfd));
- cbuf = xmalloc (BUFSIZE);
+ cbuf = (char *) xmalloc (BUFSIZE);
ncopied = 0;
while (ncopied < size)
{
return FALSE;
}
- osympp = isympp = xmalloc (symsize);
+ osympp = isympp = (asymbol **) xmalloc (symsize);
symcount = bfd_canonicalize_symtab (ibfd, isympp);
if (symcount < 0)
{
We write out the gap contents below. */
c = bfd_count_sections (obfd);
- osections = xmalloc (c * sizeof (asection *));
+ osections = (asection **) xmalloc (c * sizeof (asection *));
set = osections;
bfd_map_over_sections (obfd, get_sections, &set);
qsort (osections, c, sizeof (asection *), compare_section_lma);
- gaps = xmalloc (c * sizeof (bfd_size_type));
+ gaps = (bfd_size_type *) xmalloc (c * sizeof (bfd_size_type));
memset (gaps, 0, c * sizeof (bfd_size_type));
if (gap_fill_set)
bfd_map_over_sections (ibfd,
mark_symbols_used_in_relocations,
isympp);
- osympp = xmalloc ((symcount + 1) * sizeof (asymbol *));
+ osympp = (asymbol **) xmalloc ((symcount + 1) * sizeof (asymbol *));
symcount = filter_symbols (ibfd, obfd, osympp, isympp, symcount);
}
/* Fill in the gaps. */
if (max_gap > 8192)
max_gap = 8192;
- buf = xmalloc (max_gap);
+ buf = (bfd_byte *) xmalloc (max_gap);
memset (buf, gap_fill, max_gap);
c = bfd_count_sections (obfd);
bfd *last_element;
struct stat buf;
int stat_status = 0;
- bfd_boolean delete = TRUE;
+ bfd_boolean del = TRUE;
/* Create an output file for this member. */
output_name = concat (dir, "/",
fatal (_("cannot create tempdir for archive copying (error: %s)"),
strerror (errno));
- l = xmalloc (sizeof (struct name_list));
+ l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
l->obfd = NULL;
bfd_get_filename (this_element));
}
- l = xmalloc (sizeof (struct name_list));
+ l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
l->obfd = NULL;
return;
}
- delete = ! copy_object (this_element, output_bfd);
+ del = ! copy_object (this_element, output_bfd);
- if (! delete
+ if (! del
|| bfd_get_arch (this_element) != bfd_arch_unknown)
{
if (!bfd_close (output_bfd))
output_bfd = bfd_openw (output_name, output_target);
copy_unknown_element:
- delete = !copy_unknown_object (this_element, output_bfd);
+ del = !copy_unknown_object (this_element, output_bfd);
if (!bfd_close_all_done (output_bfd))
{
bfd_nonfatal_message (output_name, NULL, NULL, NULL);
}
}
- if (delete)
+ if (del)
{
unlink (output_name);
status = 1;
fatal (_("Multiple renames of section %s"), old_name);
}
- rename = xmalloc (sizeof (* rename));
+ rename = (section_rename *) xmalloc (sizeof (* rename));
rename->old_name = old_name;
rename->new_name = new_name;
static void
setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
{
- bfd *obfd = obfdarg;
+ bfd *obfd = (bfd *) obfdarg;
struct section_list *p;
sec_ptr osection;
bfd_size_type size;
{
char *n;
- n = xmalloc (strlen (prefix) + strlen (name) + 1);
+ n = (char *) xmalloc (strlen (prefix) + strlen (name) + 1);
strcpy (n, prefix);
strcat (n, name);
name = n;
static void
copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
{
- bfd *obfd = obfdarg;
+ bfd *obfd = (bfd *) obfdarg;
struct section_list *p;
arelent **relpp;
long relcount;
bfd_set_reloc (obfd, osection, NULL, 0);
else
{
- relpp = xmalloc (relsize);
+ relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp);
if (relcount < 0)
{
long temp_relcount = 0;
long i;
- temp_relpp = xmalloc (relsize);
+ temp_relpp = (arelent **) xmalloc (relsize);
for (i = 0; i < relcount; i++)
if (is_specified_symbol (bfd_asymbol_name (*relpp[i]->sym_ptr_ptr),
keep_specific_htab))
{
/* Keep only every `copy_byte'th byte in MEMHUNK. */
char *from = (char *) memhunk + copy_byte;
- char *to = memhunk;
+ char *to = (char *) memhunk;
char *end = (char *) memhunk + size;
for (; from < end; from += interleave)
static void
get_sections (bfd *obfd ATTRIBUTE_UNUSED, asection *osection, void *secppparg)
{
- asection ***secppp = secppparg;
+ asection ***secppp = (asection ***) secppparg;
**secppp = osection;
++(*secppp);
static int
compare_section_lma (const void *arg1, const void *arg2)
{
- const asection *const *sec1 = arg1;
- const asection *const *sec2 = arg2;
+ const asection *const *sec1 = (const asection * const *) arg1;
+ const asection *const *sec2 = (const asection * const *) arg2;
flagword flags1, flags2;
/* Sort non loadable sections to the front. */
static void
mark_symbols_used_in_relocations (bfd *ibfd, sec_ptr isection, void *symbolsarg)
{
- asymbol **symbols = symbolsarg;
+ asymbol **symbols = (asymbol **) symbolsarg;
long relsize;
arelent **relpp;
long relcount, i;
if (relsize == 0)
return;
- relpp = xmalloc (relsize);
+ relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, symbols);
if (relcount < 0)
bfd_fatal (bfd_get_filename (ibfd));
break;
}
- pa = xmalloc (sizeof (struct section_add));
+ pa = (struct section_add *) xmalloc (sizeof (struct section_add));
len = s - optarg;
- name = xmalloc (len + 1);
+ name = (char *) xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
pa->name = name;
pa->filename = s + 1;
pa->size = size;
- pa->contents = xmalloc (size);
+ pa->contents = (bfd_byte *) xmalloc (size);
f = fopen (pa->filename, FOPEN_RB);
}
len = s - optarg;
- name = xmalloc (len + 1);
+ name = (char *) xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
fatal (_("bad format for %s"), "--redefine-sym");
len = s - optarg;
- source = xmalloc (len + 1);
+ source = (char *) xmalloc (len + 1);
strncpy (source, optarg, len);
source[len] = '\0';
nextarg = s + 1;
len = strlen (nextarg);
- target = xmalloc (len + 1);
+ target = (char *) xmalloc (len + 1);
strcpy (target, nextarg);
redefine_list_append ("--redefine-sym", source, target);
fatal (_("bad format for %s"), "--set-section-flags");
len = s - optarg;
- name = xmalloc (len + 1);
+ name = (char *) xmalloc (len + 1);
strncpy (name, optarg, len);
name[len] = '\0';
if (len == 0)
fatal (_("bad format for %s"), "--rename-section");
- old_name = xmalloc (len + 1);
+ old_name = (char *) xmalloc (len + 1);
strncpy (old_name, optarg, len);
old_name[len] = 0;
if (len == 0)
fatal (_("bad format for %s"), "--rename-section");
- new_name = xmalloc (len + 1);
+ new_name = (char *) xmalloc (len + 1);
strncpy (new_name, eq, len);
new_name[len] = 0;
if (storage < 0)
bfd_fatal (bfd_get_filename (abfd));
if (storage)
- sy = xmalloc (storage);
+ sy = (asymbol **) xmalloc (storage);
symcount = bfd_canonicalize_symtab (abfd, sy);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
}
if (storage)
- sy = xmalloc (storage);
+ sy = (asymbol **) xmalloc (storage);
dynsymcount = bfd_canonicalize_dynamic_symtab (abfd, sy);
if (dynsymcount < 0)
return map;
}
#endif
- map = malloc (*size);
+ map = (const char *) malloc (*size);
if (!map || (size_t) read (fd, (char *)map, *size) != *size)
{
free ((void *)map);
if (line_map_size < lineno + 1)
line_map_size = lineno + 1;
newsize = line_map_size * sizeof (char *);
- linemap = xrealloc (linemap, newsize);
+ linemap = (const char **) xrealloc (linemap, newsize);
}
linemap[lineno++] = lstart;
{
struct print_file_list *p;
- p = xmalloc (sizeof (struct print_file_list));
+ p = (struct print_file_list *) xmalloc (sizeof (struct print_file_list));
p->map = slurp_file (modname, &p->mapsize);
if (p->map == NULL)
{
if (prev_functionname != NULL)
free (prev_functionname);
- prev_functionname = xmalloc (strlen (functionname) + 1);
+ prev_functionname = (char *) xmalloc (strlen (functionname) + 1);
strcpy (prev_functionname, functionname);
}
break;
f->alloc = (f->alloc + n) * 2;
- f->buffer = xrealloc (f->buffer, f->alloc);
+ f->buffer = (char *) xrealloc (f->buffer, f->alloc);
}
f->pos += n;
section = aux->sec;
sfile.alloc = 120;
- sfile.buffer = xmalloc (sfile.alloc);
+ sfile.buffer = (char *) xmalloc (sfile.alloc);
sfile.pos = 0;
if (insn_width)
if (relsize > 0)
{
- rel_ppstart = rel_pp = xmalloc (relsize);
+ rel_ppstart = rel_pp = (arelent **) xmalloc (relsize);
rel_count = bfd_canonicalize_reloc (abfd, section, rel_pp, syms);
if (rel_count < 0)
bfd_fatal (bfd_get_filename (abfd));
}
rel_ppend = rel_pp + rel_count;
- data = xmalloc (datasize);
+ data = (bfd_byte *) xmalloc (datasize);
bfd_get_section_contents (abfd, section, data, 0, datasize);
/* Find the nearest symbol forwards from our current position. */
paux->require_sec = TRUE;
- sym = find_symbol_for_address (section->vma + addr_offset, info, &place);
+ sym = (asymbol *) find_symbol_for_address (section->vma + addr_offset,
+ (struct disassemble_info *) info,
+ &place);
paux->require_sec = FALSE;
/* PR 9774: If the target used signed 32-bit addresses then we must make
/* We make a copy of syms to sort. We don't want to sort syms
because that will screw up the relocs. */
sorted_symcount = symcount ? symcount : dynsymcount;
- sorted_syms = xmalloc ((sorted_symcount + synthcount) * sizeof (asymbol *));
+ sorted_syms = (asymbol **) xmalloc ((sorted_symcount + synthcount)
+ * sizeof (asymbol *));
memcpy (sorted_syms, symcount ? syms : dynsyms,
sorted_symcount * sizeof (asymbol *));
{
struct bfd_target *xvec;
- xvec = xmalloc (sizeof (struct bfd_target));
+ xvec = (struct bfd_target *) xmalloc (sizeof (struct bfd_target));
memcpy (xvec, abfd->xvec, sizeof (struct bfd_target));
xvec->byteorder = endian;
abfd->xvec = xvec;
if (relsize > 0)
{
- aux.dynrelbuf = xmalloc (relsize);
+ aux.dynrelbuf = (arelent **) xmalloc (relsize);
aux.dynrelcount = bfd_canonicalize_dynamic_reloc (abfd,
aux.dynrelbuf,
dynsyms);
asection *sec, void *file)
{
struct dwarf_section *section = &debug_displays [debug].section;
- bfd *abfd = file;
+ bfd *abfd = (bfd *) file;
bfd_boolean ret;
int section_is_compressed;
section->address = 0;
section->size = bfd_get_section_size (sec);
- section->start = xmalloc (section->size);
+ section->start = (unsigned char *) xmalloc (section->size);
if (is_relocatable && debug_displays [debug].relocate)
ret = bfd_simple_get_relocated_section_contents (abfd,
load_debug_section (enum dwarf_section_display_enum debug, void *file)
{
struct dwarf_section *section = &debug_displays [debug].section;
- bfd *abfd = file;
+ bfd *abfd = (bfd *) file;
asection *sec;
/* If it is already loaded, do nothing. */
{
const char *name = bfd_get_section_name (abfd, section);
const char *match;
- enum dwarf_section_display_enum i;
+ int i;
if (CONST_STRNEQ (name, ".gnu.linkonce.wi."))
match = ".debug_info";
sec->name = sec->uncompressed_name;
else
sec->name = sec->compressed_name;
- if (load_specific_debug_section (i, section, abfd))
+ if (load_specific_debug_section ((enum dwarf_section_display_enum) i,
+ section, abfd))
{
debug_displays [i].display (sec, abfd);
if (i != info && i != abbrev)
- free_debug_section (i);
+ free_debug_section ((enum dwarf_section_display_enum) i);
}
break;
}
}
size = bfd_section_size (abfd, stabsect);
- contents = xmalloc (size);
+ contents = (char *) xmalloc (size);
if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size))
{
(unsigned long) (section->filepos + start_offset));
printf ("\n");
- data = xmalloc (datasize);
+ data = (bfd_byte *) xmalloc (datasize);
bfd_get_section_contents (abfd, section, data, 0, datasize);
return;
}
- relpp = xmalloc (relsize);
+ relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
if (relcount < 0)
printf (" (none)\n\n");
else
{
- relpp = xmalloc (relsize);
+ relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_dynamic_reloc (abfd, relpp, dynsyms);
if (relcount < 0)
if (path[0] == 0)
return;
include_path_count++;
- include_paths = xrealloc (include_paths,
- include_path_count * sizeof (*include_paths));
+ include_paths = (const char **)
+ xrealloc (include_paths, include_path_count * sizeof (*include_paths));
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
if (path[1] == ':' && path[2] == 0)
path = concat (path, ".", (const char *) 0);
if (only_used == only_size)
{
only_size += 8;
- only = xrealloc (only, only_size * sizeof (char *));
+ only = (char **) xrealloc (only, only_size * sizeof (char *));
}
only [only_used++] = optarg;
break;
/* prdbg.c -- Print out generic debugging information.
- Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
Tags style generation written by Salvador E. Tropea <set@computer.org>.
info.filename = NULL;
info.abfd = abfd;
info.syms = syms;
- info.demangler = demangler;
+ info.demangler = (char * (*)(struct bfd *, const char *, int)) demangler;
if (as_tags)
{
/* Now the return type is on the top of the stack. */
- s = xmalloc (len);
+ s = (char *) xmalloc (len);
LITSTRCPY (s, "(|) (");
if (argcount < 0)
/* Add a base class to a class. */
static bfd_boolean
-pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual,
enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
if (! push_type (info, t))
return FALSE;
- if (virtual)
+ if (is_virtual)
{
if (! prepend_type (info, "virtual "))
return FALSE;
len_var = strlen (name);
len_class = strlen (info->stack->next->type);
- full_name = xmalloc (len_var + len_class + 3);
+ full_name = (char *) xmalloc (len_var + len_class + 3);
if (! full_name)
return FALSE;
sprintf (full_name, "%s::%s", info->stack->next->type, name);
static bfd_boolean
tg_class_baseclass (void *p, bfd_vma bitpos ATTRIBUTE_UNUSED,
- bfd_boolean virtual, enum debug_visibility visibility)
+ bfd_boolean is_virtual, enum debug_visibility visibility)
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
if (! push_type (info, t))
return FALSE;
- if (virtual)
+ if (is_virtual)
{
if (! prepend_type (info, "virtual "))
return FALSE;
{
Elf32_External_Rela * erelas;
- erelas = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
+ erelas = (Elf32_External_Rela *) get_data (NULL, file, rel_offset, 1,
+ rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf32_External_Rela);
- relas = cmalloc (nrelas, sizeof (Elf_Internal_Rela));
+ relas = (Elf_Internal_Rela *) cmalloc (nrelas,
+ sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
{
Elf64_External_Rela * erelas;
- erelas = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
+ erelas = (Elf64_External_Rela *) get_data (NULL, file, rel_offset, 1,
+ rel_size, _("relocs"));
if (!erelas)
return 0;
nrelas = rel_size / sizeof (Elf64_External_Rela);
- relas = cmalloc (nrelas, sizeof (Elf_Internal_Rela));
+ relas = (Elf_Internal_Rela *) cmalloc (nrelas,
+ sizeof (Elf_Internal_Rela));
if (relas == NULL)
{
{
Elf32_External_Rel * erels;
- erels = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
+ erels = (Elf32_External_Rel *) get_data (NULL, file, rel_offset, 1,
+ rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf32_External_Rel);
- rels = cmalloc (nrels, sizeof (Elf_Internal_Rela));
+ rels = (Elf_Internal_Rela *) cmalloc (nrels, sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
{
Elf64_External_Rel * erels;
- erels = get_data (NULL, file, rel_offset, 1, rel_size, _("relocs"));
+ erels = (Elf64_External_Rel *) get_data (NULL, file, rel_offset, 1,
+ rel_size, _("relocs"));
if (!erels)
return 0;
nrels = rel_size / sizeof (Elf64_External_Rel);
- rels = cmalloc (nrels, sizeof (Elf_Internal_Rela));
+ rels = (Elf_Internal_Rela *) cmalloc (nrels, sizeof (Elf_Internal_Rela));
if (rels == NULL)
{
{
dump_type * new_dump_sects;
- new_dump_sects = calloc (section + 1, sizeof (* dump_sects));
+ new_dump_sects = (dump_type *) calloc (section + 1,
+ sizeof (* dump_sects));
if (new_dump_sects == NULL)
error (_("Out of memory allocating dump request table.\n"));
{
struct dump_list_entry * new_request;
- new_request = malloc (sizeof (struct dump_list_entry));
+ new_request = (struct dump_list_entry *)
+ malloc (sizeof (struct dump_list_entry));
if (!new_request)
error (_("Out of memory allocating dump request table.\n"));
Elf_Internal_Phdr * internal;
unsigned int i;
- phdrs = get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize, elf_header.e_phnum,
- _("program headers"));
+ phdrs = (Elf32_External_Phdr *) get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize,
+ elf_header.e_phnum,
+ _("program headers"));
if (!phdrs)
return 0;
Elf_Internal_Phdr * internal;
unsigned int i;
- phdrs = get_data (NULL, file, elf_header.e_phoff,
- elf_header.e_phentsize, elf_header.e_phnum,
- _("program headers"));
+ phdrs = (Elf64_External_Phdr *) get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize,
+ elf_header.e_phnum,
+ _("program headers"));
if (!phdrs)
return 0;
if (program_headers != NULL)
return 1;
- phdrs = cmalloc (elf_header.e_phnum, sizeof (Elf_Internal_Phdr));
+ phdrs = (Elf_Internal_Phdr *) cmalloc (elf_header.e_phnum,
+ sizeof (Elf_Internal_Phdr));
if (phdrs == NULL)
{
Elf_Internal_Shdr * internal;
unsigned int i;
- shdrs = get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize, num, _("section headers"));
+ shdrs = (Elf32_External_Shdr *) get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize, num,
+ _("section headers"));
if (!shdrs)
return 0;
- section_headers = cmalloc (num, sizeof (Elf_Internal_Shdr));
+ section_headers = (Elf_Internal_Shdr *) cmalloc (num,
+ sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
Elf_Internal_Shdr * internal;
unsigned int i;
- shdrs = get_data (NULL, file, elf_header.e_shoff,
- elf_header.e_shentsize, num, _("section headers"));
+ shdrs = (Elf64_External_Shdr *) get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize, num,
+ _("section headers"));
if (!shdrs)
return 0;
- section_headers = cmalloc (num, sizeof (Elf_Internal_Shdr));
+ section_headers = (Elf_Internal_Shdr *) cmalloc (num,
+ sizeof (Elf_Internal_Shdr));
if (section_headers == NULL)
{
Elf_Internal_Sym * psym;
unsigned int j;
- esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
- _("symbols"));
+ esyms = (Elf32_External_Sym *) get_data (NULL, file, section->sh_offset, 1,
+ section->sh_size, _("symbols"));
if (!esyms)
return NULL;
&& (symtab_shndx_hdr->sh_link
== (unsigned long) (section - section_headers)))
{
- shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- 1, symtab_shndx_hdr->sh_size, _("symtab shndx"));
+ shndx = (Elf_External_Sym_Shndx *) get_data (NULL, file,
+ symtab_shndx_hdr->sh_offset,
+ 1, symtab_shndx_hdr->sh_size,
+ _("symtab shndx"));
if (!shndx)
{
free (esyms);
}
number = section->sh_size / section->sh_entsize;
- isyms = cmalloc (number, sizeof (Elf_Internal_Sym));
+ isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
Elf_Internal_Sym * psym;
unsigned int j;
- esyms = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
- _("symbols"));
+ esyms = (Elf64_External_Sym *) get_data (NULL, file, section->sh_offset, 1,
+ section->sh_size, _("symbols"));
if (!esyms)
return NULL;
&& (symtab_shndx_hdr->sh_link
== (unsigned long) (section - section_headers)))
{
- shndx = get_data (NULL, file, symtab_shndx_hdr->sh_offset,
- 1, symtab_shndx_hdr->sh_size, _("symtab shndx"));
+ shndx = (Elf_External_Sym_Shndx *) get_data (NULL, file,
+ symtab_shndx_hdr->sh_offset,
+ 1, symtab_shndx_hdr->sh_size,
+ _("symtab shndx"));
if (!shndx)
{
free (esyms);
}
number = section->sh_size / section->sh_entsize;
- isyms = cmalloc (number, sizeof (Elf_Internal_Sym));
+ isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
if (section->sh_size != 0)
{
- string_table = get_data (NULL, file, section->sh_offset,
- 1, section->sh_size, _("string table"));
+ string_table = (char *) get_data (NULL, file, section->sh_offset,
+ 1, section->sh_size,
+ _("string table"));
string_table_length = string_table != NULL ? section->sh_size : 0;
}
continue;
}
- dynamic_strings = get_data (NULL, file, section->sh_offset,
- 1, section->sh_size, _("dynamic strings"));
+ dynamic_strings = (char *) get_data (NULL, file, section->sh_offset,
+ 1, section->sh_size,
+ _("dynamic strings"));
dynamic_strings_length = section->sh_size;
}
else if (section->sh_type == SHT_SYMTAB_SHNDX)
abort ();
}
- section_headers_groups = calloc (elf_header.e_shnum,
- sizeof (struct group *));
+ section_headers_groups = (struct group **) calloc (elf_header.e_shnum,
+ sizeof (struct group *));
if (section_headers_groups == NULL)
{
return 1;
}
- section_groups = calloc (group_count, sizeof (struct group));
+ section_groups = (struct group *) calloc (group_count, sizeof (struct group));
if (section_groups == NULL)
{
strtab_sec = sec;
if (strtab)
free (strtab);
- strtab = get_data (NULL, file, strtab_sec->sh_offset,
- 1, strtab_sec->sh_size,
- _("string table"));
+ strtab = (char *) get_data (NULL, file, strtab_sec->sh_offset,
+ 1, strtab_sec->sh_size,
+ _("string table"));
strtab_size = strtab != NULL ? strtab_sec->sh_size : 0;
}
group_name = sym->st_name < strtab_size
? strtab + sym->st_name : "<corrupt>";
}
- start = get_data (NULL, file, section->sh_offset,
- 1, section->sh_size, _("section data"));
+ start = (unsigned char *) get_data (NULL, file, section->sh_offset,
+ 1, section->sh_size,
+ _("section data"));
indices = start;
size = (section->sh_size / section->sh_entsize) - 1;
printf (" [%5u] %s\n", entry, SECTION_NAME (sec));
}
- g = xmalloc (sizeof (struct group_list));
+ g = (struct group_list *) xmalloc (sizeof (struct group_list));
g->section_index = entry;
g->next = group->root;
group->root = g;
{
strsec = section_headers + symsec->sh_link;
- strtab = get_data (NULL, file, strsec->sh_offset,
- 1, strsec->sh_size,
- _("string table"));
+ strtab = (char *) get_data (NULL, file, strsec->sh_offset,
+ 1, strsec->sh_size,
+ _("string table"));
strtablen = strtab == NULL ? 0 : strsec->sh_size;
}
? section_headers [(a).section].sh_addr + (a).offset \
: (a).offset)
+struct ia64_unw_table_entry
+ {
+ struct absaddr start;
+ struct absaddr end;
+ struct absaddr info;
+ };
+
struct ia64_unw_aux_info
{
- struct ia64_unw_table_entry
- {
- struct absaddr start;
- struct absaddr end;
- struct absaddr info;
- }
- *table; /* Unwind table. */
+
+ struct ia64_unw_table_entry *table; /* Unwind table. */
unsigned long table_len; /* Length of unwind table. */
unsigned char * info; /* Unwind info. */
unsigned long info_size; /* Size of unwind info. */
/* Second, build the unwind table from the contents of the unwind section: */
size = sec->sh_size;
- table = get_data (NULL, file, sec->sh_offset, 1, size, _("unwind table"));
+ table = (unsigned char *) get_data (NULL, file, sec->sh_offset, 1, size,
+ _("unwind table"));
if (!table)
return 0;
- aux->table = xcmalloc (size / (3 * eh_addr_size), sizeof (aux->table[0]));
+ aux->table = (struct ia64_unw_table_entry *)
+ xcmalloc (size / (3 * eh_addr_size), sizeof (aux->table[0]));
tep = aux->table;
for (tp = table; tp < table + size; ++tep)
{
aux.symtab = GET_ELF_SYMBOLS (file, sec);
strsec = section_headers + sec->sh_link;
- aux.strtab = get_data (NULL, file, strsec->sh_offset,
- 1, strsec->sh_size, _("string table"));
+ aux.strtab = (char *) get_data (NULL, file, strsec->sh_offset,
+ 1, strsec->sh_size,
+ _("string table"));
aux.strtab_size = aux.strtab != NULL ? strsec->sh_size : 0;
}
else if (sec->sh_type == SHT_IA_64_UNWIND)
{
aux.info_size = sec->sh_size;
aux.info_addr = sec->sh_addr;
- aux.info = get_data (NULL, file, sec->sh_offset, 1, aux.info_size,
- _("unwind info"));
+ aux.info = (unsigned char *) get_data (NULL, file, sec->sh_offset, 1,
+ aux.info_size,
+ _("unwind info"));
printf (_("\nUnwind section "));
return 1;
}
+struct hppa_unw_table_entry
+ {
+ struct absaddr start;
+ struct absaddr end;
+ unsigned int Cannot_unwind:1; /* 0 */
+ unsigned int Millicode:1; /* 1 */
+ unsigned int Millicode_save_sr0:1; /* 2 */
+ unsigned int Region_description:2; /* 3..4 */
+ unsigned int reserved1:1; /* 5 */
+ unsigned int Entry_SR:1; /* 6 */
+ unsigned int Entry_FR:4; /* number saved */ /* 7..10 */
+ unsigned int Entry_GR:5; /* number saved */ /* 11..15 */
+ unsigned int Args_stored:1; /* 16 */
+ unsigned int Variable_Frame:1; /* 17 */
+ unsigned int Separate_Package_Body:1; /* 18 */
+ unsigned int Frame_Extension_Millicode:1; /* 19 */
+ unsigned int Stack_Overflow_Check:1; /* 20 */
+ unsigned int Two_Instruction_SP_Increment:1; /* 21 */
+ unsigned int Ada_Region:1; /* 22 */
+ unsigned int cxx_info:1; /* 23 */
+ unsigned int cxx_try_catch:1; /* 24 */
+ unsigned int sched_entry_seq:1; /* 25 */
+ unsigned int reserved2:1; /* 26 */
+ unsigned int Save_SP:1; /* 27 */
+ unsigned int Save_RP:1; /* 28 */
+ unsigned int Save_MRP_in_frame:1; /* 29 */
+ unsigned int extn_ptr_defined:1; /* 30 */
+ unsigned int Cleanup_defined:1; /* 31 */
+
+ unsigned int MPE_XL_interrupt_marker:1; /* 0 */
+ unsigned int HP_UX_interrupt_marker:1; /* 1 */
+ unsigned int Large_frame:1; /* 2 */
+ unsigned int Pseudo_SP_Set:1; /* 3 */
+ unsigned int reserved4:1; /* 4 */
+ unsigned int Total_frame_size:27; /* 5..31 */
+ };
+
struct hppa_unw_aux_info
{
- struct hppa_unw_table_entry
- {
- struct absaddr start;
- struct absaddr end;
- unsigned int Cannot_unwind:1; /* 0 */
- unsigned int Millicode:1; /* 1 */
- unsigned int Millicode_save_sr0:1; /* 2 */
- unsigned int Region_description:2; /* 3..4 */
- unsigned int reserved1:1; /* 5 */
- unsigned int Entry_SR:1; /* 6 */
- unsigned int Entry_FR:4; /* number saved */ /* 7..10 */
- unsigned int Entry_GR:5; /* number saved */ /* 11..15 */
- unsigned int Args_stored:1; /* 16 */
- unsigned int Variable_Frame:1; /* 17 */
- unsigned int Separate_Package_Body:1; /* 18 */
- unsigned int Frame_Extension_Millicode:1; /* 19 */
- unsigned int Stack_Overflow_Check:1; /* 20 */
- unsigned int Two_Instruction_SP_Increment:1; /* 21 */
- unsigned int Ada_Region:1; /* 22 */
- unsigned int cxx_info:1; /* 23 */
- unsigned int cxx_try_catch:1; /* 24 */
- unsigned int sched_entry_seq:1; /* 25 */
- unsigned int reserved2:1; /* 26 */
- unsigned int Save_SP:1; /* 27 */
- unsigned int Save_RP:1; /* 28 */
- unsigned int Save_MRP_in_frame:1; /* 29 */
- unsigned int extn_ptr_defined:1; /* 30 */
- unsigned int Cleanup_defined:1; /* 31 */
-
- unsigned int MPE_XL_interrupt_marker:1; /* 0 */
- unsigned int HP_UX_interrupt_marker:1; /* 1 */
- unsigned int Large_frame:1; /* 2 */
- unsigned int Pseudo_SP_Set:1; /* 3 */
- unsigned int reserved4:1; /* 4 */
- unsigned int Total_frame_size:27; /* 5..31 */
- }
- *table; /* Unwind table. */
+ struct hppa_unw_table_entry *table; /* Unwind table. */
unsigned long table_len; /* Length of unwind table. */
bfd_vma seg_base; /* Starting address of segment. */
Elf_Internal_Sym * symtab; /* The symbol table. */
/* Second, build the unwind table from the contents of the unwind
section. */
size = sec->sh_size;
- table = get_data (NULL, file, sec->sh_offset, 1, size, _("unwind table"));
+ table = (unsigned char *) get_data (NULL, file, sec->sh_offset, 1, size,
+ _("unwind table"));
if (!table)
return 0;
nentries = size / unw_ent_size;
size = unw_ent_size * nentries;
- tep = aux->table = xcmalloc (nentries, sizeof (aux->table[0]));
+ tep = aux->table = (struct hppa_unw_table_entry *)
+ xcmalloc (nentries, sizeof (aux->table[0]));
for (tp = table; tp < table + size; tp += unw_ent_size, ++tep)
{
aux.symtab = GET_ELF_SYMBOLS (file, sec);
strsec = section_headers + sec->sh_link;
- aux.strtab = get_data (NULL, file, strsec->sh_offset,
- 1, strsec->sh_size, _("string table"));
+ aux.strtab = (char *) get_data (NULL, file, strsec->sh_offset,
+ 1, strsec->sh_size,
+ _("string table"));
aux.strtab_size = aux.strtab != NULL ? strsec->sh_size : 0;
}
else if (streq (SECTION_NAME (sec), ".PARISC.unwind"))
Elf32_External_Dyn * ext;
Elf_Internal_Dyn * entry;
- edyn = get_data (NULL, file, dynamic_addr, 1, dynamic_size,
- _("dynamic section"));
+ edyn = (Elf32_External_Dyn *) get_data (NULL, file, dynamic_addr, 1,
+ dynamic_size, _("dynamic section"));
if (!edyn)
return 0;
break;
}
- dynamic_section = cmalloc (dynamic_nent, sizeof (* entry));
+ dynamic_section = (Elf_Internal_Dyn *) cmalloc (dynamic_nent,
+ sizeof (* entry));
if (dynamic_section == NULL)
{
error (_("Out of memory\n"));
Elf64_External_Dyn * ext;
Elf_Internal_Dyn * entry;
- edyn = get_data (NULL, file, dynamic_addr, 1, dynamic_size,
- _("dynamic section"));
+ edyn = (Elf64_External_Dyn *) get_data (NULL, file, dynamic_addr, 1,
+ dynamic_size, _("dynamic section"));
if (!edyn)
return 0;
break;
}
- dynamic_section = cmalloc (dynamic_nent, sizeof (* entry));
+ dynamic_section = (Elf_Internal_Dyn *) cmalloc (dynamic_nent,
+ sizeof (* entry));
if (dynamic_section == NULL)
{
error (_("Out of memory\n"));
continue;
}
- dynamic_strings = get_data (NULL, file, offset, 1, str_tab_len,
- _("dynamic string table"));
+ dynamic_strings = (char *) get_data (NULL, file, offset, 1,
+ str_tab_len,
+ _("dynamic string table"));
dynamic_strings_length = str_tab_len;
break;
}
Elf_Internal_Syminfo * syminfo;
/* There is a syminfo section. Read the data. */
- extsyminfo = get_data (NULL, file, dynamic_syminfo_offset, 1,
- syminsz, _("symbol information"));
+ extsyminfo = (Elf_External_Syminfo *)
+ get_data (NULL, file, dynamic_syminfo_offset, 1, syminsz,
+ _("symbol information"));
if (!extsyminfo)
return 0;
- dynamic_syminfo = malloc (syminsz);
+ dynamic_syminfo = (Elf_Internal_Syminfo *) malloc (syminsz);
if (dynamic_syminfo == NULL)
{
error (_("Out of memory\n"));
? SECTION_NAME (section_headers + section->sh_link)
: "<corrupt>");
- edefs = get_data (NULL, file, section->sh_offset, 1,
- section->sh_size,
- _("version definition section"));
+ edefs = (Elf_External_Verdef *)
+ get_data (NULL, file, section->sh_offset, 1,section->sh_size,
+ _("version definition section"));
endbuf = (char *) edefs + section->sh_size;
if (!edefs)
break;
? SECTION_NAME (section_headers + section->sh_link)
: "<corrupt>");
- eneed = get_data (NULL, file, section->sh_offset, 1,
- section->sh_size,
- _("version need section"));
+ eneed = (Elf_External_Verneed *) get_data (NULL, file,
+ section->sh_offset, 1,
+ section->sh_size,
+ _("version need section"));
endbuf = (char *) eneed + section->sh_size;
if (!eneed)
break;
string_sec = section_headers + link_section->sh_link;
- strtab = get_data (NULL, file, string_sec->sh_offset, 1,
- string_sec->sh_size, _("version string table"));
+ strtab = (char *) get_data (NULL, file, string_sec->sh_offset, 1,
+ string_sec->sh_size,
+ _("version string table"));
if (!strtab)
break;
off = offset_from_vma (file,
version_info[DT_VERSIONTAGIDX (DT_VERSYM)],
total * sizeof (short));
- edata = get_data (NULL, file, off, total, sizeof (short),
- _("version symbol data"));
+ edata = (unsigned char *) get_data (NULL, file, off, total,
+ sizeof (short),
+ _("version symbol data"));
if (!edata)
{
free (strtab);
break;
}
- data = cmalloc (total, sizeof (short));
+ data = (short unsigned int *) cmalloc (total, sizeof (short));
for (cnt = total; cnt --;)
data[cnt] = byte_get (edata + cnt * sizeof (short),
unsigned char * e_data;
bfd_vma * i_data;
- e_data = cmalloc (number, ent_size);
+ e_data = (unsigned char *) cmalloc (number, ent_size);
if (e_data == NULL)
{
return NULL;
}
- i_data = cmalloc (number, sizeof (*i_data));
+ i_data = (bfd_vma *) cmalloc (number, sizeof (*i_data));
if (i_data == NULL)
{
string_sec = section_headers + section->sh_link;
- strtab = get_data (NULL, file, string_sec->sh_offset,
- 1, string_sec->sh_size, _("string table"));
+ strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
+ 1, string_sec->sh_size,
+ _("string table"));
strtab_size = strtab != NULL ? string_sec->sh_size : 0;
}
(unsigned long) nbuckets);
printf (_(" Length Number %% of total Coverage\n"));
- lengths = calloc (nbuckets, sizeof (*lengths));
+ lengths = (unsigned long *) calloc (nbuckets, sizeof (*lengths));
if (lengths == NULL)
{
error (_("Out of memory\n"));
}
}
- counts = calloc (maxlength + 1, sizeof (*counts));
+ counts = (unsigned long *) calloc (maxlength + 1, sizeof (*counts));
if (counts == NULL)
{
error (_("Out of memory\n"));
unsigned long nzero_counts = 0;
unsigned long nsyms = 0;
- lengths = calloc (ngnubuckets, sizeof (*lengths));
+ lengths = (unsigned long *) calloc (ngnubuckets, sizeof (*lengths));
if (lengths == NULL)
{
error (_("Out of memory\n"));
nsyms += length;
}
- counts = calloc (maxlength + 1, sizeof (*counts));
+ counts = (unsigned long *) calloc (maxlength + 1, sizeof (*counts));
if (counts == NULL)
{
error (_("Out of memory\n"));
if (is_rela)
{
- if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
- & relocs, & num_relocs))
+ if (!slurp_rela_relocs ((FILE *) file, relsec->sh_offset,
+ relsec->sh_size, & relocs, & num_relocs))
return;
}
else
{
- if (!slurp_rel_relocs (file, relsec->sh_offset, relsec->sh_size,
- & relocs, & num_relocs))
+ if (!slurp_rel_relocs ((FILE *) file, relsec->sh_offset,
+ relsec->sh_size, & relocs, & num_relocs))
return;
}
is_rela = FALSE;
symsec = section_headers + relsec->sh_link;
- symtab = GET_ELF_SYMBOLS (file, symsec);
+ symtab = GET_ELF_SYMBOLS ((FILE *) file, symsec);
for (rp = relocs; rp < relocs + num_relocs; ++rp)
{
return NULL;
}
- return get_data (NULL, file, section->sh_offset, 1, num_bytes,
- _("section contents"));
+ return (char *) get_data (NULL, file, section->sh_offset, 1, num_bytes,
+ _("section contents"));
}
strm.avail_in = compressed_size - header_size;
strm.next_in = (Bytef *) compressed_buffer + header_size;
strm.avail_out = uncompressed_size;
- uncompressed_buffer = xmalloc (uncompressed_size);
+ uncompressed_buffer = (unsigned char *) xmalloc (uncompressed_size);
rc = inflateInit (& strm);
while (strm.avail_in > 0)
snprintf (buf, sizeof (buf), _("%s section data"), section->name);
section->address = sec->sh_addr;
section->size = sec->sh_size;
- section->start = get_data (NULL, file, sec->sh_offset, 1,
- sec->sh_size, buf);
+ section->start = (unsigned char *) get_data (NULL, (FILE *) file,
+ sec->sh_offset, 1,
+ sec->sh_size, buf);
if (section->start == NULL)
return 0;
return 0;
if (debug_displays [debug].relocate)
- apply_relocations (file, sec, section->start);
+ apply_relocations ((FILE *) file, sec, section->start);
return 1;
}
if (sec == NULL)
return 0;
- return load_specific_debug_section (debug, sec, file);
+ return load_specific_debug_section (debug, sec, (FILE *) file);
}
void
char * name = SECTION_NAME (section);
bfd_size_type length;
int result = 1;
- enum dwarf_section_display_enum i;
+ int i;
length = section->sh_size;
if (length == 0)
int secondary = (section != find_section (name));
if (secondary)
- free_debug_section (i);
+ free_debug_section ((enum dwarf_section_display_enum) i);
if (streq (debug_displays[i].section.uncompressed_name, name))
sec->name = sec->uncompressed_name;
else
sec->name = sec->compressed_name;
- if (load_specific_debug_section (i, section, file))
+ if (load_specific_debug_section ((enum dwarf_section_display_enum) i,
+ section, file))
{
result &= debug_displays[i].display (sec, file);
if (secondary || (i != info && i != abbrev))
- free_debug_section (i);
+ free_debug_section ((enum dwarf_section_display_enum) i);
}
break;
if (sect->sh_type != proc_type && sect->sh_type != SHT_GNU_ATTRIBUTES)
continue;
- contents = get_data (NULL, file, sect->sh_offset, 1, sect->sh_size,
- _("attributes"));
+ contents = (unsigned char *) get_data (NULL, file, sect->sh_offset, 1,
+ sect->sh_size, _("attributes"));
if (contents == NULL)
continue;
Elf32_External_Lib * elib;
size_t cnt;
- elib = get_data (NULL, file, liblist_offset,
- liblistno, sizeof (Elf32_External_Lib),
- _("liblist"));
+ elib = (Elf32_External_Lib *) get_data (NULL, file, liblist_offset,
+ liblistno,
+ sizeof (Elf32_External_Lib),
+ _("liblist"));
if (elib)
{
printf ("\nSection '.liblist' contains %lu entries:\n",
while (sect->sh_type != SHT_MIPS_OPTIONS)
++sect;
- eopt = get_data (NULL, file, options_offset, 1, sect->sh_size,
- _("options"));
+ eopt = (Elf_External_Options *) get_data (NULL, file, options_offset, 1,
+ sect->sh_size, _("options"));
if (eopt)
{
- iopt = cmalloc ((sect->sh_size / sizeof (eopt)), sizeof (* iopt));
+ iopt = (Elf_Internal_Options *)
+ cmalloc ((sect->sh_size / sizeof (eopt)), sizeof (* iopt));
if (iopt == NULL)
{
error (_("Out of memory\n"));
return 0;
}
- iconf = cmalloc (conflictsno, sizeof (* iconf));
+ iconf = (Elf32_Conflict *) cmalloc (conflictsno, sizeof (* iconf));
if (iconf == NULL)
{
error (_("Out of memory\n"));
{
Elf32_External_Conflict * econf32;
- econf32 = get_data (NULL, file, conflicts_offset,
- conflictsno, sizeof (* econf32), _("conflict"));
+ econf32 = (Elf32_External_Conflict *)
+ get_data (NULL, file, conflicts_offset, conflictsno,
+ sizeof (* econf32), _("conflict"));
if (!econf32)
return 0;
{
Elf64_External_Conflict * econf64;
- econf64 = get_data (NULL, file, conflicts_offset,
- conflictsno, sizeof (* econf64), _("conflict"));
+ econf64 = (Elf64_External_Conflict *)
+ get_data (NULL, file, conflicts_offset, conflictsno,
+ sizeof (* econf64), _("conflict"));
if (!econf64)
return 0;
global_end = local_end + (symtabno - gotsym) * addr_size;
offset = offset_from_vma (file, pltgot, global_end - pltgot);
- data = get_data (NULL, file, offset, global_end - pltgot, 1, _("GOT"));
+ data = (unsigned char *) get_data (NULL, file, offset,
+ global_end - pltgot, 1, _("GOT"));
printf (_("\nPrimary GOT:\n"));
printf (_(" Canonical gp value: "));
print_vma (pltgot + 0x7ff0, LONG_HEX);
end = mips_pltgot + (2 + count) * addr_size;
offset = offset_from_vma (file, mips_pltgot, end - mips_pltgot);
- data = get_data (NULL, file, offset, end - mips_pltgot, 1, _("PLT GOT"));
+ data = (unsigned char *) get_data (NULL, file, offset, end - mips_pltgot,
+ 1, _("PLT GOT"));
printf (_("\nPLT GOT:\n\n"));
printf (_(" Reserved entries:\n"));
printf (_(" %*s %*s Purpose\n"),
if (section->sh_link >= elf_header.e_shnum)
break;
- elib = get_data (NULL, file, section->sh_offset, 1, section->sh_size,
- _("liblist"));
+ elib = (Elf32_External_Lib *)
+ get_data (NULL, file, section->sh_offset, 1, section->sh_size,
+ _("liblist"));
if (elib == NULL)
break;
string_sec = section_headers + section->sh_link;
- strtab = get_data (NULL, file, string_sec->sh_offset, 1,
- string_sec->sh_size, _("liblist string table"));
+ strtab = (char *) get_data (NULL, file, string_sec->sh_offset, 1,
+ string_sec->sh_size,
+ _("liblist string table"));
strtab_size = string_sec->sh_size;
if (strtab == NULL
if (length <= 0)
return 0;
- pnotes = get_data (NULL, file, offset, 1, length, _("notes"));
+ pnotes = (Elf_External_Note *) get_data (NULL, file, offset, 1, length,
+ _("notes"));
if (!pnotes)
return 0;
namesz. */
if (inote.namedata[inote.namesz] != '\0')
{
- temp = malloc (inote.namesz + 1);
+ temp = (char *) malloc (inote.namesz + 1);
if (temp == NULL)
{
archive is located. */
if (IS_ABSOLUTE_PATH (name) || base_name == file_name)
{
- member_file_name = malloc (name_len + 1);
+ member_file_name = (char *) malloc (name_len + 1);
if (member_file_name == NULL)
{
error (_("Out of memory\n"));
/* Concatenate the path components of the archive file name
to the relative path name from the extended name table. */
size_t prefix_len = base_name - file_name;
- member_file_name = malloc (prefix_len + name_len + 1);
+ member_file_name = (char *) malloc (prefix_len + name_len + 1);
if (member_file_name == NULL)
{
error (_("Out of memory\n"));
file_name, arch->index_num);
return 1;
}
- index_buffer = malloc (arch->index_num * SIZEOF_AR_INDEX_NUMBERS);
+ index_buffer = (unsigned char *)
+ malloc (arch->index_num * SIZEOF_AR_INDEX_NUMBERS);
if (index_buffer == NULL)
{
error (_("Out of memory whilst trying to read archive symbol index\n"));
size -= arch->index_num * SIZEOF_AR_INDEX_NUMBERS;
/* Convert the index numbers into the host's numeric format. */
- arch->index_array = malloc (arch->index_num * sizeof (* arch->index_array));
+ arch->index_array = (long unsigned int *)
+ malloc (arch->index_num * sizeof (* arch->index_array));
if (arch->index_array == NULL)
{
free (index_buffer);
error (_("%s: the archive has an index but no symbols\n"), file_name);
return 1;
}
- arch->sym_table = malloc (size);
+ arch->sym_table = (char *) malloc (size);
arch->sym_size = size;
if (arch->sym_table == NULL)
{
arch->longnames_size = strtoul (arch->arhdr.ar_size, NULL, 10);
arch->next_arhdr_offset += sizeof arch->arhdr + arch->longnames_size;
- arch->longnames = malloc (arch->longnames_size);
+ arch->longnames = (char *) malloc (arch->longnames_size);
if (arch->longnames == NULL)
{
error (_("Out of memory reading long symbol names in archive\n"));
if (arch->is_thin_archive && arch->nested_member_origin != 0)
len += strlen (nested_arch->file_name) + 2;
- name = malloc (len);
+ name = (char *) malloc (len);
if (name == NULL)
{
error (_("Out of memory\n"));
if (num_dump_sects > 0)
{
/* Make a copy of the dump_sects array. */
- cmdline_dump_sects = malloc (num_dump_sects * sizeof (* dump_sects));
+ cmdline_dump_sects = (dump_type *)
+ malloc (num_dump_sects * sizeof (* dump_sects));
if (cmdline_dump_sects == NULL)
error (_("Out of memory allocating dump request table.\n"));
else
/* size.c -- report size of various sections of an executable file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GNU Binutils.
if (storage < 0)
bfd_fatal (bfd_get_filename (abfd));
if (storage)
- syms = xmalloc (storage);
+ syms = (asymbol **) xmalloc (storage);
symcount = bfd_canonicalize_symtab (abfd, syms);
if (symcount < 0)
/* 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.
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];
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);
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':
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;
/* 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];
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. */
for (i = 0; i < c; i++)
{
- bfd_boolean virtual;
+ bfd_boolean is_virtual;
enum debug_visibility visibility;
bfd_vma bitpos;
debug_type type;
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;
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;
int cpp_abbrev;
debug_type context;
const char *name;
- const char *typename;
+ const char *type_name;
debug_type type;
bfd_vma bitpos;
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"));
got_a_section = TRUE;
print_strings (filename_and_sizep->filename, NULL, sect->filepos,
- 0, sectsize, mem);
+ 0, sectsize, (char *) mem);
}
free (mem);
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
+ 2007, 2009 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
/* Add a base class to the class on the type stack. */
static bfd_boolean
-stab_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
+stab_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual,
enum debug_visibility visibility)
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
/* Build the base class specifier. */
buf = (char *) xmalloc (strlen (s) + 25);
- buf[0] = virtual ? '1' : '0';
+ buf[0] = is_virtual ? '1' : '0';
switch (visibility)
{
default: