aboutsummaryrefslogtreecommitdiff
path: root/binutils/wrstabs.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
committerAlan Modra <amodra@gmail.com>2002-11-30 08:39:46 +0000
commitb34976b65aea8f33690229600bbf4527ec3118e1 (patch)
tree6411348664ef81ca2aa2e3ff325116e6e6502edf /binutils/wrstabs.c
parent583d52d728c60410c0d39bae68ee536a7b9e7a6c (diff)
downloadgdb-b34976b65aea8f33690229600bbf4527ec3118e1.zip
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.gz
gdb-b34976b65aea8f33690229600bbf4527ec3118e1.tar.bz2
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
Diffstat (limited to 'binutils/wrstabs.c')
-rw-r--r--binutils/wrstabs.c529
1 files changed, 281 insertions, 248 deletions
diff --git a/binutils/wrstabs.c b/binutils/wrstabs.c
index 5d0dc3b..f22d8fa 100644
--- a/binutils/wrstabs.c
+++ b/binutils/wrstabs.c
@@ -1,5 +1,6 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -75,7 +76,7 @@ struct stab_type_stack
/* The size of the type. */
unsigned int size;
/* Whether type string defines a new type. */
- boolean definition;
+ bfd_boolean definition;
/* String defining struct fields. */
char *fields;
/* NULL terminated array of strings defining base classes for a
@@ -177,81 +178,113 @@ struct stab_write_handle
static struct bfd_hash_entry *string_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static boolean stab_write_symbol
+static bfd_boolean stab_write_symbol
PARAMS ((struct stab_write_handle *, int, int, bfd_vma, const char *));
-static boolean stab_push_string
- PARAMS ((struct stab_write_handle *, const char *, long, boolean,
+static bfd_boolean stab_push_string
+ PARAMS ((struct stab_write_handle *, const char *, long, bfd_boolean,
unsigned int));
-static boolean stab_push_defined_type
+static bfd_boolean stab_push_defined_type
PARAMS ((struct stab_write_handle *, long, unsigned int));
-static char *stab_pop_type PARAMS ((struct stab_write_handle *));
-static boolean stab_modify_type
+static char *stab_pop_type
+ PARAMS ((struct stab_write_handle *));
+static bfd_boolean stab_modify_type
PARAMS ((struct stab_write_handle *, int, unsigned int, long **, size_t *));
static long stab_get_struct_index
PARAMS ((struct stab_write_handle *, const char *, unsigned int,
enum debug_type_kind, unsigned int *));
-static boolean stab_class_method_var
+static bfd_boolean stab_class_method_var
PARAMS ((struct stab_write_handle *, const char *, enum debug_visibility,
- boolean, boolean, boolean, bfd_vma, boolean));
-
-static boolean stab_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean stab_start_source PARAMS ((PTR, const char *));
-static boolean stab_empty_type PARAMS ((PTR));
-static boolean stab_void_type PARAMS ((PTR));
-static boolean stab_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean stab_float_type PARAMS ((PTR, unsigned int));
-static boolean stab_complex_type PARAMS ((PTR, unsigned int));
-static boolean stab_bool_type PARAMS ((PTR, unsigned int));
-static boolean stab_enum_type
+ bfd_boolean, bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean));
+static bfd_boolean stab_start_compilation_unit
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_start_source
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_empty_type
+ PARAMS ((PTR));
+static bfd_boolean stab_void_type
+ PARAMS ((PTR));
+static bfd_boolean stab_int_type
+ PARAMS ((PTR, unsigned int, bfd_boolean));
+static bfd_boolean stab_float_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean stab_complex_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean stab_bool_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean stab_enum_type
PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean stab_pointer_type PARAMS ((PTR));
-static boolean stab_function_type PARAMS ((PTR, int, boolean));
-static boolean stab_reference_type PARAMS ((PTR));
-static boolean stab_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean stab_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean stab_set_type PARAMS ((PTR, boolean));
-static boolean stab_offset_type PARAMS ((PTR));
-static boolean stab_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean stab_const_type PARAMS ((PTR));
-static boolean stab_volatile_type PARAMS ((PTR));
-static boolean stab_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean stab_struct_field
+static bfd_boolean stab_pointer_type
+ PARAMS ((PTR));
+static bfd_boolean stab_function_type
+ PARAMS ((PTR, int, bfd_boolean));
+static bfd_boolean stab_reference_type
+ PARAMS ((PTR));
+static bfd_boolean stab_range_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+static bfd_boolean stab_array_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
+static bfd_boolean stab_set_type
+ PARAMS ((PTR, bfd_boolean));
+static bfd_boolean stab_offset_type
+ PARAMS ((PTR));
+static bfd_boolean stab_method_type
+ PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
+static bfd_boolean stab_const_type
+ PARAMS ((PTR));
+static bfd_boolean stab_volatile_type
+ PARAMS ((PTR));
+static bfd_boolean stab_start_struct_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+static bfd_boolean stab_struct_field
PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean stab_end_struct_type PARAMS ((PTR));
-static boolean stab_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean stab_class_static_member
+static bfd_boolean stab_end_struct_type
+ PARAMS ((PTR));
+static bfd_boolean stab_start_class_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean));
+static bfd_boolean stab_class_static_member
PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean stab_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean stab_class_start_method PARAMS ((PTR, const char *));
-static boolean stab_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean stab_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean stab_class_end_method PARAMS ((PTR));
-static boolean stab_end_class_type PARAMS ((PTR));
-static boolean stab_typedef_type PARAMS ((PTR, const char *));
-static boolean stab_tag_type
+static bfd_boolean stab_class_baseclass
+ PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
+static bfd_boolean stab_class_start_method
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_class_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean));
+static bfd_boolean stab_class_static_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean));
+static bfd_boolean stab_class_end_method
+ PARAMS ((PTR));
+static bfd_boolean stab_end_class_type
+ PARAMS ((PTR));
+static bfd_boolean stab_typedef_type
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_tag_type
PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean stab_typdef PARAMS ((PTR, const char *));
-static boolean stab_tag PARAMS ((PTR, const char *));
-static boolean stab_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean stab_float_constant PARAMS ((PTR, const char *, double));
-static boolean stab_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean stab_variable
+static bfd_boolean stab_typdef
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_tag
+ PARAMS ((PTR, const char *));
+static bfd_boolean stab_int_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean stab_float_constant
+ PARAMS ((PTR, const char *, double));
+static bfd_boolean stab_typed_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean stab_variable
PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean stab_start_function PARAMS ((PTR, const char *, boolean));
-static boolean stab_function_parameter
+static bfd_boolean stab_start_function
+ PARAMS ((PTR, const char *, bfd_boolean));
+static bfd_boolean stab_function_parameter
PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean stab_start_block PARAMS ((PTR, bfd_vma));
-static boolean stab_end_block PARAMS ((PTR, bfd_vma));
-static boolean stab_end_function PARAMS ((PTR));
-static boolean stab_lineno
+static bfd_boolean stab_start_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean stab_end_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean stab_end_function
+ PARAMS ((PTR));
+static bfd_boolean stab_lineno
PARAMS ((PTR, const char *, unsigned long, bfd_vma));
static const struct debug_write_fns stab_fns =
@@ -343,7 +376,7 @@ string_hash_newfunc (entry, table, string)
/* Add a symbol to the stabs debugging information we are building. */
-static boolean
+static bfd_boolean
stab_write_symbol (info, type, desc, value, string)
struct stab_write_handle *info;
int type;
@@ -360,12 +393,12 @@ stab_write_symbol (info, type, desc, value, string)
{
struct string_hash_entry *h;
- h = string_hash_lookup (&info->strhash, string, true, true);
+ h = string_hash_lookup (&info->strhash, string, TRUE, TRUE);
if (h == NULL)
{
non_fatal (_("string_hash_lookup failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
if (h->index != -1)
strx = h->index;
@@ -400,17 +433,17 @@ stab_write_symbol (info, type, desc, value, string)
info->symbols_size += STAB_SYMBOL_SIZE;
- return true;
+ return TRUE;
}
/* Push a string on to the type stack. */
-static boolean
+static bfd_boolean
stab_push_string (info, string, index, definition, size)
struct stab_write_handle *info;
const char *string;
long index;
- boolean definition;
+ bfd_boolean definition;
unsigned int size;
{
struct stab_type_stack *s;
@@ -429,12 +462,12 @@ stab_push_string (info, string, index, definition, size)
s->next = info->type_stack;
info->type_stack = s;
- return true;
+ return TRUE;
}
/* Push a type index which has already been defined. */
-static boolean
+static bfd_boolean
stab_push_defined_type (info, index, size)
struct stab_write_handle *info;
long index;
@@ -443,7 +476,7 @@ stab_push_defined_type (info, index, size)
char buf[20];
sprintf (buf, "%ld", index);
- return stab_push_string (info, buf, index, false, size);
+ return stab_push_string (info, buf, index, FALSE, size);
}
/* Pop a type off the type stack. The caller is responsible for
@@ -477,7 +510,7 @@ stab_pop_type (info)
the symbols, *PSYMSIZE the size of the symbols, *PSTRINGS to the
strings, and *PSTRINGSIZE to the size of the strings. */
-boolean
+bfd_boolean
write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
pstrings, pstringsize)
bfd *abfd;
@@ -507,7 +540,7 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
{
non_fatal ("bfd_hash_table_init_failed: %s",
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
info.type_stack = NULL;
@@ -522,22 +555,22 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
/* The initial symbol holds the string size. */
if (! stab_write_symbol (&info, 0, 0, 0, (const char *) NULL))
- return false;
+ return FALSE;
/* Output an initial N_SO symbol. */
info.so_offset = info.symbols_size;
if (! stab_write_symbol (&info, N_SO, 0, 0, bfd_get_filename (abfd)))
- return false;
+ return FALSE;
if (! debug_write (dhandle, &stab_fns, (PTR) &info))
- return false;
+ return FALSE;
assert (info.pending_lbrac == (bfd_vma) -1);
/* Output a trailing N_SO. */
if (! stab_write_symbol (&info, N_SO, 0, info.last_text_address,
(const char *) NULL))
- return false;
+ return FALSE;
/* Put the string size in the initial symbol. */
bfd_put_32 (abfd, info.strings_size, info.symbols + 8);
@@ -556,12 +589,12 @@ write_stabs_in_sections_debugging_info (abfd, dhandle, psyms, psymsize,
p += strlen ((char *) p) + 1;
}
- return true;
+ return TRUE;
}
/* Start writing out information for a compilation unit. */
-static boolean
+static bfd_boolean
stab_start_compilation_unit (p, filename)
PTR p;
const char *filename;
@@ -580,7 +613,7 @@ stab_start_compilation_unit (p, filename)
/* Start writing out information for a particular source file. */
-static boolean
+static bfd_boolean
stab_start_source (p, filename)
PTR p;
const char *filename;
@@ -599,7 +632,7 @@ stab_start_source (p, filename)
/* Push an empty type. This shouldn't normally happen. We just use a
void type. */
-static boolean
+static bfd_boolean
stab_empty_type (p)
PTR p;
{
@@ -620,13 +653,13 @@ stab_empty_type (p)
sprintf (buf, "%ld=%ld", index, index);
- return stab_push_string (info, buf, index, false, 0);
+ return stab_push_string (info, buf, index, FALSE, 0);
}
}
/* Push a void type. */
-static boolean
+static bfd_boolean
stab_void_type (p)
PTR p;
{
@@ -646,17 +679,17 @@ stab_void_type (p)
sprintf (buf, "%ld=%ld", index, index);
- return stab_push_string (info, buf, index, true, 0);
+ return stab_push_string (info, buf, index, TRUE, 0);
}
}
/* Push an integer type. */
-static boolean
+static bfd_boolean
stab_int_type (p, size, unsignedp)
PTR p;
unsigned int size;
- boolean unsignedp;
+ bfd_boolean unsignedp;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long *cache;
@@ -664,7 +697,7 @@ stab_int_type (p, size, unsignedp)
if (size <= 0 || (size > sizeof (long) && size != 8))
{
non_fatal (_("stab_int_type: bad size %u"), size);
- return false;
+ return FALSE;
}
if (unsignedp)
@@ -709,13 +742,13 @@ stab_int_type (p, size, unsignedp)
abort ();
}
- return stab_push_string (info, buf, index, true, size);
+ return stab_push_string (info, buf, index, TRUE, size);
}
}
/* Push a floating point type. */
-static boolean
+static bfd_boolean
stab_float_type (p, size)
PTR p;
unsigned int size;
@@ -736,8 +769,8 @@ stab_float_type (p, size)
char buf[50];
/* Floats are defined as a subrange of int. */
- if (! stab_int_type (info, 4, false))
- return false;
+ if (! stab_int_type (info, 4, FALSE))
+ return FALSE;
int_type = stab_pop_type (info);
index = info->type_index;
@@ -752,13 +785,13 @@ stab_float_type (p, size)
free (int_type);
- return stab_push_string (info, buf, index, true, size);
+ return stab_push_string (info, buf, index, TRUE, size);
}
}
/* Push a complex type. */
-static boolean
+static bfd_boolean
stab_complex_type (p, size)
PTR p;
unsigned int size;
@@ -772,13 +805,13 @@ stab_complex_type (p, size)
sprintf (buf, "%ld=r%ld;%u;0;", index, index, size);
- return stab_push_string (info, buf, index, true, size * 2);
+ return stab_push_string (info, buf, index, TRUE, size * 2);
}
-/* Push a boolean type. We use an XCOFF predefined type, since gdb
+/* Push a bfd_boolean type. We use an XCOFF predefined type, since gdb
always recognizes them. */
-static boolean
+static bfd_boolean
stab_bool_type (p, size)
PTR p;
unsigned int size;
@@ -811,7 +844,7 @@ stab_bool_type (p, size)
/* Push an enum type. */
-static boolean
+static bfd_boolean
stab_enum_type (p, tag, names, vals)
PTR p;
const char *tag;
@@ -832,10 +865,10 @@ stab_enum_type (p, tag, names, vals)
buf = (char *) xmalloc (10 + strlen (tag));
sprintf (buf, "xe%s:", tag);
/* FIXME: The size is just a guess. */
- if (! stab_push_string (info, buf, 0, false, 4))
- return false;
+ if (! stab_push_string (info, buf, 0, FALSE, 4))
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
len = 10;
@@ -862,26 +895,26 @@ stab_enum_type (p, tag, names, vals)
if (tag == NULL)
{
/* FIXME: The size is just a guess. */
- if (! stab_push_string (info, buf, 0, false, 4))
- return false;
+ if (! stab_push_string (info, buf, 0, FALSE, 4))
+ return FALSE;
}
else
{
/* FIXME: The size is just a guess. */
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf)
|| ! stab_push_defined_type (info, index, 4))
- return false;
+ return FALSE;
}
free (buf);
- return true;
+ return TRUE;
}
/* Push a modification of the top type on the stack. Cache the
results in CACHE and CACHE_ALLOC. */
-static boolean
+static bfd_boolean
stab_modify_type (info, mod, size, cache, cache_alloc)
struct stab_write_handle *info;
int mod;
@@ -899,7 +932,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
if (targindex <= 0
|| cache == NULL)
{
- boolean definition;
+ bfd_boolean definition;
/* Either the target type has no index, or we aren't caching
this modifier. Either way we have no way of recording the
@@ -910,7 +943,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
sprintf (buf, "%c%s", mod, s);
free (s);
if (! stab_push_string (info, buf, 0, definition, size))
- return false;
+ return FALSE;
free (buf);
}
else
@@ -941,7 +974,7 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
referenced). */
free (stab_pop_type (info));
if (! stab_push_defined_type (info, index, size))
- return false;
+ return FALSE;
}
else
{
@@ -955,19 +988,19 @@ stab_modify_type (info, mod, size, cache, cache_alloc)
(*cache)[targindex] = index;
- if (! stab_push_string (info, buf, index, true, size))
- return false;
+ if (! stab_push_string (info, buf, index, TRUE, size))
+ return FALSE;
free (buf);
}
}
- return true;
+ return TRUE;
}
/* Push a pointer type. */
-static boolean
+static bfd_boolean
stab_pointer_type (p)
PTR p;
{
@@ -980,11 +1013,11 @@ stab_pointer_type (p)
/* Push a function type. */
-static boolean
+static bfd_boolean
stab_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs ATTRIBUTE_UNUSED;
+ bfd_boolean varargs ATTRIBUTE_UNUSED;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
int i;
@@ -1007,7 +1040,7 @@ stab_function_type (p, argcount, varargs)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
}
@@ -1019,7 +1052,7 @@ stab_function_type (p, argcount, varargs)
/* Push a reference type. */
-static boolean
+static bfd_boolean
stab_reference_type (p)
PTR p;
{
@@ -1032,14 +1065,14 @@ stab_reference_type (p)
/* Push a range type. */
-static boolean
+static bfd_boolean
stab_range_type (p, low, high)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int size;
char *s, *buf;
@@ -1052,24 +1085,24 @@ stab_range_type (p, low, high)
free (s);
if (! stab_push_string (info, buf, 0, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push an array type. */
-static boolean
+static bfd_boolean
stab_array_type (p, low, high, stringp)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp;
+ bfd_boolean stringp;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int element_size;
char *range, *element, *buf;
long index;
@@ -1095,7 +1128,7 @@ stab_array_type (p, low, high, stringp)
attribute. */
index = info->type_index;
++info->type_index;
- definition = true;
+ definition = TRUE;
sprintf (buf, "%ld=@S;", index);
}
@@ -1109,22 +1142,22 @@ stab_array_type (p, low, high, stringp)
else
size = element_size * ((high - low) + 1);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a set type. */
-static boolean
+static bfd_boolean
stab_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ bfd_boolean bitstringp;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s, *buf;
long index;
@@ -1144,7 +1177,7 @@ stab_set_type (p, bitstringp)
attribute. */
index = info->type_index;
++info->type_index;
- definition = true;
+ definition = TRUE;
sprintf (buf, "%ld=@S;", index);
}
@@ -1152,21 +1185,21 @@ stab_set_type (p, bitstringp)
free (s);
if (! stab_push_string (info, buf, index, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push an offset type. */
-static boolean
+static bfd_boolean
stab_offset_type (p)
PTR p;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *target, *base, *buf;
definition = info->type_stack->definition;
@@ -1181,24 +1214,24 @@ stab_offset_type (p)
free (target);
if (! stab_push_string (info, buf, 0, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a method type. */
-static boolean
+static bfd_boolean
stab_method_type (p, domainp, argcount, varargs)
PTR p;
- boolean domainp;
+ bfd_boolean domainp;
int argcount;
- boolean varargs;
+ bfd_boolean varargs;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *domain, *return_type, *buf;
char **args;
int i;
@@ -1213,7 +1246,7 @@ stab_method_type (p, domainp, argcount, varargs)
if (! domainp)
{
if (! stab_empty_type (p))
- return false;
+ return FALSE;
}
definition = info->type_stack->definition;
@@ -1235,7 +1268,7 @@ stab_method_type (p, domainp, argcount, varargs)
{
args = (char **) xmalloc (1 * sizeof (*args));
if (! stab_empty_type (p))
- return false;
+ return FALSE;
definition = definition || info->type_stack->definition;
args[0] = stab_pop_type (info);
argcount = 1;
@@ -1252,7 +1285,7 @@ stab_method_type (p, domainp, argcount, varargs)
if (! varargs)
{
if (! stab_empty_type (p))
- return false;
+ return FALSE;
definition = definition || info->type_stack->definition;
args[argcount] = stab_pop_type (info);
++argcount;
@@ -1283,16 +1316,16 @@ stab_method_type (p, domainp, argcount, varargs)
free (args);
if (! stab_push_string (info, buf, 0, definition, 0))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Push a const version of a type. */
-static boolean
+static bfd_boolean
stab_const_type (p)
PTR p;
{
@@ -1304,7 +1337,7 @@ stab_const_type (p)
/* Push a volatile version of a type. */
-static boolean
+static bfd_boolean
stab_volatile_type (p)
PTR p;
{
@@ -1368,17 +1401,17 @@ stab_get_struct_index (info, tag, id, kind, psize)
/* Start outputting a struct. We ignore the tag, and handle it in
stab_tag. */
-static boolean
+static bfd_boolean
stab_start_struct_type (p, tag, id, structp, size)
PTR p;
const char *tag;
unsigned int id;
- boolean structp;
+ bfd_boolean structp;
unsigned int size;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
long index;
- boolean definition;
+ bfd_boolean definition;
char *buf;
buf = (char *) xmalloc (40);
@@ -1387,16 +1420,16 @@ stab_start_struct_type (p, tag, id, structp, size)
{
index = 0;
*buf = '\0';
- definition = false;
+ definition = FALSE;
}
else
{
index = stab_get_struct_index (info, tag, id, DEBUG_KIND_ILLEGAL,
&size);
if (index < 0)
- return false;
+ return FALSE;
sprintf (buf, "%ld=", index);
- definition = true;
+ definition = TRUE;
}
sprintf (buf + strlen (buf), "%c%u",
@@ -1404,17 +1437,17 @@ stab_start_struct_type (p, tag, id, structp, size)
size);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
info->type_stack->fields = (char *) xmalloc (1);
info->type_stack->fields[0] = '\0';
- return true;
+ return TRUE;
}
/* Add a field to a struct. */
-static boolean
+static bfd_boolean
stab_struct_field (p, name, bitpos, bitsize, visibility)
PTR p;
const char *name;
@@ -1423,7 +1456,7 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
enum debug_visibility visibility;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
unsigned int size;
char *s, *n;
const char *vis;
@@ -1474,19 +1507,19 @@ stab_struct_field (p, name, bitpos, bitsize, visibility)
info->type_stack->fields = n;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Finish up a struct. */
-static boolean
+static bfd_boolean
stab_end_struct_type (p)
PTR p;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
long index;
unsigned int size;
char *fields, *first, *buf;
@@ -1505,32 +1538,32 @@ stab_end_struct_type (p)
free (fields);
if (! stab_push_string (info, buf, index, definition, size))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start outputting a class. */
-static boolean
+static bfd_boolean
stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
PTR p;
const char *tag;
unsigned int id;
- boolean structp;
+ bfd_boolean structp;
unsigned int size;
- boolean vptr;
- boolean ownvptr;
+ bfd_boolean vptr;
+ bfd_boolean ownvptr;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *vstring;
if (! vptr || ownvptr)
{
- definition = false;
+ definition = FALSE;
vstring = NULL;
}
else
@@ -1540,7 +1573,7 @@ stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (! stab_start_struct_type (p, tag, id, structp, size))
- return false;
+ return FALSE;
if (vptr)
{
@@ -1563,14 +1596,14 @@ stab_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a static member to the class on the type stack. */
-static boolean
+static bfd_boolean
stab_class_static_member (p, name, physname, visibility)
PTR p;
const char *name;
@@ -1578,7 +1611,7 @@ stab_class_static_member (p, name, physname, visibility)
enum debug_visibility visibility;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s, *n;
const char *vis;
@@ -1620,22 +1653,22 @@ stab_class_static_member (p, name, physname, visibility)
info->type_stack->fields = n;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a base class to the class on the type stack. */
-static boolean
+static bfd_boolean
stab_class_baseclass (p, bitpos, virtual, visibility)
PTR p;
bfd_vma bitpos;
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- boolean definition;
+ bfd_boolean definition;
char *s;
char *buf;
unsigned int c;
@@ -1690,14 +1723,14 @@ stab_class_baseclass (p, bitpos, virtual, visibility)
info->type_stack->baseclasses = baseclasses;
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Start adding a method to the class on the type stack. */
-static boolean
+static bfd_boolean
stab_class_start_method (p, name)
PTR p;
const char *name;
@@ -1724,24 +1757,24 @@ stab_class_start_method (p, name)
info->type_stack->methods = m;
- return true;
+ return TRUE;
}
/* Add a variant, either static or not, to the current method. */
-static boolean
+static bfd_boolean
stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
voffset, contextp)
struct stab_write_handle *info;
const char *physname;
enum debug_visibility visibility;
- boolean staticp;
- boolean constp;
- boolean volatilep;
+ bfd_boolean staticp;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
bfd_vma voffset;
- boolean contextp;
+ bfd_boolean contextp;
{
- boolean definition;
+ bfd_boolean definition;
char *type;
char *context = NULL;
char visc, qualc, typec;
@@ -1817,49 +1850,49 @@ stab_class_method_var (info, physname, visibility, staticp, constp, volatilep,
}
if (definition)
- info->type_stack->definition = true;
+ info->type_stack->definition = TRUE;
- return true;
+ return TRUE;
}
/* Add a variant to the current method. */
-static boolean
+static bfd_boolean
stab_class_method_variant (p, physname, visibility, constp, volatilep,
voffset, contextp)
PTR p;
const char *physname;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
bfd_vma voffset;
- boolean contextp;
+ bfd_boolean contextp;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- return stab_class_method_var (info, physname, visibility, false, constp,
+ return stab_class_method_var (info, physname, visibility, FALSE, constp,
volatilep, voffset, contextp);
}
/* Add a static variant to the current method. */
-static boolean
+static bfd_boolean
stab_class_static_method_variant (p, physname, visibility, constp, volatilep)
PTR p;
const char *physname;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
- return stab_class_method_var (info, physname, visibility, true, constp,
- volatilep, 0, false);
+ return stab_class_method_var (info, physname, visibility, TRUE, constp,
+ volatilep, 0, FALSE);
}
/* Finish up a method. */
-static boolean
+static bfd_boolean
stab_class_end_method (p)
PTR p;
{
@@ -1871,12 +1904,12 @@ stab_class_end_method (p)
trailing semicolon. */
strcat (info->type_stack->methods, ";");
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
+static bfd_boolean
stab_end_class_type (p)
PTR p;
{
@@ -1946,12 +1979,12 @@ stab_end_class_type (p)
free (info->type_stack->string);
info->type_stack->string = buf;
- return true;
+ return TRUE;
}
/* Push a typedef which was previously defined. */
-static boolean
+static bfd_boolean
stab_typedef_type (p, name)
PTR p;
const char *name;
@@ -1959,7 +1992,7 @@ stab_typedef_type (p, name)
struct stab_write_handle *info = (struct stab_write_handle *) p;
struct string_hash_entry *h;
- h = string_hash_lookup (&info->typedef_hash, name, false, false);
+ h = string_hash_lookup (&info->typedef_hash, name, FALSE, FALSE);
assert (h != NULL && h->index > 0);
return stab_push_defined_type (info, h->index, h->size);
@@ -1967,7 +2000,7 @@ stab_typedef_type (p, name)
/* Push a struct, union or class tag. */
-static boolean
+static bfd_boolean
stab_tag_type (p, name, id, kind)
PTR p;
const char *name;
@@ -1980,14 +2013,14 @@ stab_tag_type (p, name, id, kind)
index = stab_get_struct_index (info, name, id, kind, &size);
if (index < 0)
- return false;
+ return FALSE;
return stab_push_defined_type (info, index, size);
}
/* Define a typedef. */
-static boolean
+static bfd_boolean
stab_typdef (p, name)
PTR p;
const char *name;
@@ -2016,16 +2049,16 @@ stab_typdef (p, name)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- h = string_hash_lookup (&info->typedef_hash, name, true, false);
+ h = string_hash_lookup (&info->typedef_hash, name, TRUE, FALSE);
if (h == NULL)
{
non_fatal (_("string_hash_lookup failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
/* I don't think we care about redefinitions. */
@@ -2033,12 +2066,12 @@ stab_typdef (p, name)
h->index = index;
h->size = size;
- return true;
+ return TRUE;
}
/* Define a tag. */
-static boolean
+static bfd_boolean
stab_tag (p, tag)
PTR p;
const char *tag;
@@ -2054,16 +2087,16 @@ stab_tag (p, tag)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define an integer constant. */
-static boolean
+static bfd_boolean
stab_int_constant (p, name, val)
PTR p;
const char *name;
@@ -2076,16 +2109,16 @@ stab_int_constant (p, name, val)
sprintf (buf, "%s:c=i%ld", name, (long) val);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define a floating point constant. */
-static boolean
+static bfd_boolean
stab_float_constant (p, name, val)
PTR p;
const char *name;
@@ -2098,16 +2131,16 @@ stab_float_constant (p, name, val)
sprintf (buf, "%s:c=f%g", name, val);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Define a typed constant. */
-static boolean
+static bfd_boolean
stab_typed_constant (p, name, val)
PTR p;
const char *name;
@@ -2123,16 +2156,16 @@ stab_typed_constant (p, name, val)
free (s);
if (! stab_write_symbol (info, N_LSYM, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Record a variable. */
-static boolean
+static bfd_boolean
stab_variable (p, name, kind, val)
PTR p;
const char *name;
@@ -2196,20 +2229,20 @@ stab_variable (p, name, kind, val)
free (s);
if (! stab_write_symbol (info, stab_type, 0, val, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start outputting a function. */
-static boolean
+static bfd_boolean
stab_start_function (p, name, globalp)
PTR p;
const char *name;
- boolean globalp;
+ bfd_boolean globalp;
{
struct stab_write_handle *info = (struct stab_write_handle *) p;
char *rettype, *buf;
@@ -2227,16 +2260,16 @@ stab_start_function (p, name, globalp)
info->fun_offset = info->symbols_size;
if (! stab_write_symbol (info, N_FUN, 0, 0, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Output a function parameter. */
-static boolean
+static bfd_boolean
stab_function_parameter (p, name, kind, val)
PTR p;
const char *name;
@@ -2281,16 +2314,16 @@ stab_function_parameter (p, name, kind, val)
free (s);
if (! stab_write_symbol (info, stab_type, 0, val, buf))
- return false;
+ return FALSE;
free (buf);
- return true;
+ return TRUE;
}
/* Start a block. */
-static boolean
+static bfd_boolean
stab_start_block (p, addr)
PTR p;
bfd_vma addr;
@@ -2321,7 +2354,7 @@ stab_start_block (p, addr)
if (info->nesting == 1)
{
info->fnaddr = addr;
- return true;
+ return TRUE;
}
/* We have to output the LBRAC symbol after any variables which are
@@ -2333,19 +2366,19 @@ stab_start_block (p, addr)
{
if (! stab_write_symbol (info, N_LBRAC, 0, info->pending_lbrac,
(const char *) NULL))
- return false;
+ return FALSE;
}
/* Remember the address and output it later. */
info->pending_lbrac = addr - info->fnaddr;
- return true;
+ return TRUE;
}
/* End a block. */
-static boolean
+static bfd_boolean
stab_end_block (p, addr)
PTR p;
bfd_vma addr;
@@ -2360,7 +2393,7 @@ stab_end_block (p, addr)
{
if (! stab_write_symbol (info, N_LBRAC, 0, info->pending_lbrac,
(const char *) NULL))
- return false;
+ return FALSE;
info->pending_lbrac = (bfd_vma) -1;
}
@@ -2370,7 +2403,7 @@ stab_end_block (p, addr)
/* We ignore the outermost block. */
if (info->nesting == 0)
- return true;
+ return TRUE;
return stab_write_symbol (info, N_RBRAC, 0, addr - info->fnaddr,
(const char *) NULL);
@@ -2378,16 +2411,16 @@ stab_end_block (p, addr)
/* End a function. */
-static boolean
+static bfd_boolean
stab_end_function (p)
PTR p ATTRIBUTE_UNUSED;
{
- return true;
+ return TRUE;
}
/* Output a line number. */
-static boolean
+static bfd_boolean
stab_lineno (p, file, lineno, addr)
PTR p;
const char *file;
@@ -2404,7 +2437,7 @@ stab_lineno (p, file, lineno, addr)
if (strcmp (file, info->lineno_filename) != 0)
{
if (! stab_write_symbol (info, N_SOL, 0, addr, file))
- return false;
+ return FALSE;
info->lineno_filename = file;
}