- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
/* DEBUG_KIND_FUNCTION. */
struct debug_function_type *kfunction;
/* DEBUG_KIND_REFERENCE. */
/* DEBUG_KIND_FUNCTION. */
struct debug_function_type *kfunction;
/* DEBUG_KIND_REFERENCE. */
/* DEBUG_KIND_NAMED, DEBUG_KIND_TAGGED. */
struct debug_named_type *knamed;
} u;
/* DEBUG_KIND_NAMED, DEBUG_KIND_TAGGED. */
struct debug_named_type *knamed;
} u;
/* Visibility of the field. */
enum debug_visibility visibility;
/* Whether this is a static member. */
/* Visibility of the field. */
enum debug_visibility visibility;
/* Whether this is a static member. */
/* Visibility of the base class. */
enum debug_visibility visibility;
};
/* A method of an object. */
/* Visibility of the base class. */
enum debug_visibility visibility;
};
/* A method of an object. */
/* The visibility of the function. */
enum debug_visibility visibility;
/* Whether the function is const. */
/* 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. */
/* If voffset is VOFFSET_STATIC_METHOD, this is a static method. */
#define VOFFSET_STATIC_METHOD ((bfd_vma) -1)
/* Context of a virtual method function. */
/* DEBUG_OBJECT_VARIABLE. */
struct debug_variable *variable;
/* DEBUG_OBJECT_FUNCTION. */
/* DEBUG_OBJECT_VARIABLE. */
struct debug_variable *variable;
/* DEBUG_OBJECT_FUNCTION. */
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_name *debug_add_to_current_namespace
(struct debug_handle *, const char *, enum debug_object_kind,
enum debug_object_linkage);
(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 *,
(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 *,
static bfd_boolean debug_write_class_type
(struct debug_handle *, const struct debug_write_fns *, void *,
static bfd_boolean debug_write_class_type
(struct debug_handle *, const struct debug_write_fns *, void *,
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_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
static bfd_boolean debug_write_linenos
(struct debug_handle *, const struct debug_write_fns *, void *, bfd_vma);
static bfd_boolean debug_set_class_id
- if (f->filename[0] == name[0]
- && f->filename[1] == name[1]
- && strcmp (f->filename, name) == 0)
+ if (filename_cmp (f->filename, name) == 0)
debug_make_type (struct debug_handle *info ATTRIBUTE_UNUSED,
enum debug_type_kind kind, unsigned int size)
{
debug_make_type (struct debug_handle *info ATTRIBUTE_UNUSED,
enum debug_type_kind kind, unsigned int size)
{
debug_make_indirect_type (void *handle, debug_type *slot, const char *tag)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_indirect_type (void *handle, debug_type *slot, const char *tag)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_indirect_type *i;
t = debug_make_type (info, DEBUG_KIND_INDIRECT, 0);
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;
debug_make_int_type (void *handle, unsigned int size, bfd_boolean unsignedp)
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_class_type *c;
t = debug_make_type (info,
struct debug_class_type *c;
t = debug_make_type (info,
struct debug_class_type *c;
t = debug_make_type (info,
struct debug_class_type *c;
t = debug_make_type (info,
struct debug_enum_type *e;
t = debug_make_type (info, DEBUG_KIND_ENUM, 0);
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;
debug_make_pointer_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_type *arg_types, bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_type *arg_types, bfd_boolean varargs)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_reference_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_reference_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
bfd_signed_vma upper, bfd_boolean stringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
bfd_signed_vma upper, bfd_boolean stringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_const_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_const_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_volatile_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_make_volatile_type (void *handle, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_type type, bfd_vma bitpos, bfd_vma bitsize,
enum debug_visibility visibility)
{
debug_type type, bfd_vma bitpos, bfd_vma bitsize,
enum debug_visibility visibility)
{
debug_type type, const char *physname,
enum debug_visibility visibility)
{
debug_type type, const char *physname,
enum debug_visibility visibility)
{
debug_make_method (void *handle ATTRIBUTE_UNUSED, const char *name,
debug_method_variant *variants)
{
debug_make_method (void *handle ATTRIBUTE_UNUSED, const char *name,
debug_method_variant *variants)
{
bfd_boolean constp, bfd_boolean volatilep,
bfd_vma voffset, debug_type context)
{
bfd_boolean constp, bfd_boolean volatilep,
bfd_vma voffset, debug_type context)
{
enum debug_visibility visibility,
bfd_boolean constp, bfd_boolean volatilep)
{
enum debug_visibility visibility,
bfd_boolean constp, bfd_boolean volatilep)
{
debug_name_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_name_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_tag_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
debug_tag_type (void *handle, const char *name, debug_type type)
{
struct debug_handle *info = (struct debug_handle *) handle;
/* Get a base type. We build a linked list on the stack to avoid
crashing if the type is defined circularly. */
/* Get a base type. We build a linked list on the stack to avoid
crashing if the type is defined circularly. */
debug_get_real_type (void *handle, debug_type type,
struct debug_type_real_list *list)
{
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,
static bfd_boolean
debug_write_type (struct debug_handle *info,
const struct debug_write_fns *fns, void *fhandle,
/* If we have a name for this type, just output it. We only output
typedef names after they have been defined. We output type tags
whenever we are not actually defining them. */
/* If we have a name for this type, just output it. We only output
typedef names after they have been defined. We output type tags
whenever we are not actually defining them. */
return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
name);
case DEBUG_KIND_VOID:
return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
name);
case DEBUG_KIND_VOID:
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
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,
static bfd_boolean
debug_write_class_type (struct debug_handle *info,
const struct debug_write_fns *fns, void *fhandle,
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
b = type->u.kclass->baseclasses[i];
if (! debug_write_type (info, fns, fhandle, b->type,
(struct debug_name *) NULL))
return FALSE;
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,
-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)
&& t1->u.krange->upper == t2->u.krange->upper
&& debug_type_samep (info, t1->u.krange->type,
t2->u.krange->type));
&& t1->u.krange->upper == t2->u.krange->upper
&& debug_type_samep (info, t1->u.krange->type,
t2->u.krange->type));
-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)
for (pf1 = c1->fields, pf2 = c2->fields;
*pf1 != NULL && *pf2 != NULL;
pf1++, pf2++)
{
for (pf1 = c1->fields, pf2 = c2->fields;
*pf1 != NULL && *pf2 != NULL;
pf1++, pf2++)
{
names, since that sometimes fails in the presence of
typedefs and we really don't care. */
if (strcmp (f1->name, f2->name) != 0
names, since that sometimes fails in the presence of
typedefs and we really don't care. */
if (strcmp (f1->name, f2->name) != 0
|| ! debug_type_samep (info,
debug_get_real_type ((void *) info,
f1->type, NULL),
|| ! debug_type_samep (info,
debug_get_real_type ((void *) info,
f1->type, NULL),
for (pb1 = c1->baseclasses, pb2 = c2->baseclasses;
*pb1 != NULL && *pb2 != NULL;
++pb1, ++pb2)
{
for (pb1 = c1->baseclasses, pb2 = c2->baseclasses;
*pb1 != NULL && *pb2 != NULL;
++pb1, ++pb2)
{
|| b1->visibility != b2->visibility
|| ! debug_type_samep (info, b1->type, b2->type))
return FALSE;
|| b1->visibility != b2->visibility
|| ! debug_type_samep (info, b1->type, b2->type))
return FALSE;
for (pm1 = c1->methods, pm2 = c2->methods;
*pm1 != NULL && *pm2 != NULL;
++pm1, ++pm2)
{
for (pm1 = c1->methods, pm2 = c2->methods;
*pm1 != NULL && *pm2 != NULL;
++pm1, ++pm2)
{
for (pv1 = m1->variants, pv2 = m2->variants;
*pv1 != NULL && *pv2 != NULL;
++pv1, ++pv2)
{
for (pv1 = m1->variants, pv2 = m2->variants;
*pv1 != NULL && *pv2 != NULL;
++pv1, ++pv2)
{