aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog10
-rw-r--r--binutils/addr2line.c20
-rw-r--r--binutils/ar.c70
-rw-r--r--binutils/arsup.c6
-rw-r--r--binutils/binemul.c42
-rw-r--r--binutils/binemul.h42
-rw-r--r--binutils/bucomm.c4
-rw-r--r--binutils/bucomm.h58
-rw-r--r--binutils/budbg.h27
-rw-r--r--binutils/debug.c397
-rw-r--r--binutils/debug.h231
-rw-r--r--binutils/dlltool.c185
-rw-r--r--binutils/emul_aix.c102
-rw-r--r--binutils/ieee.c1810
-rw-r--r--binutils/nlmconv.c83
-rw-r--r--binutils/nlmconv.h10
-rw-r--r--binutils/nlmheader.y30
-rw-r--r--binutils/nm.c135
-rw-r--r--binutils/objcopy.c260
-rw-r--r--binutils/objdump.c316
-rw-r--r--binutils/prdbg.c606
-rw-r--r--binutils/rdcoff.c144
-rw-r--r--binutils/rddbg.c76
-rw-r--r--binutils/readelf.c2554
-rw-r--r--binutils/rename.c7
-rw-r--r--binutils/size.c8
-rw-r--r--binutils/stabs.c941
-rw-r--r--binutils/strings.c100
-rw-r--r--binutils/unwind-ia64.h10
-rw-r--r--binutils/wrstabs.c529
30 files changed, 4637 insertions, 4176 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 8e9f5ba..a6016c4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-30 Alan Modra <amodra@bigpond.net.au>
+
+ * addr2line.c, ar.c, arsup.c, binemul.c, binemul.h, bucomm.c, bucomm.h,
+ budbg.h, debug.c, debug.h, dlltool.c, emul_aix.c, ieee.c, nlmconv.c,
+ nlmconv.h, nlmheader.y, nm.c, objcopy.c, objdump.c, prdbg.c, rdcoff.c,
+ rddbg.c, readelf.c, rename.c, size.c, stabs.c, strings.c,
+ unwind-ia64.h, wrstabs.c: Replace boolean with bfd_boolean, true with
+ TRUE, false with FALSE. Simplify comparisons of bfd_boolean vars
+ with TRUE/FALSE. Formatting.
+
2002-11-29 Jakub Jelinek <jakub@redhat.com>
* readelf.c Replace occurrences of Elf32_Internal_* and
diff --git a/binutils/addr2line.c b/binutils/addr2line.c
index 1d09cd0..8ebd87e 100644
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -37,9 +37,9 @@
#include "bucomm.h"
#include "budemang.h"
-static boolean with_functions; /* -f, show function names. */
-static boolean do_demangle; /* -C, demangle names. */
-static boolean base_names; /* -s, strip directory names. */
+static bfd_boolean with_functions; /* -f, show function names. */
+static bfd_boolean do_demangle; /* -C, demangle names. */
+static bfd_boolean base_names; /* -s, strip directory names. */
static int naddr; /* Number of addresses to process. */
static char **addr; /* Hex addresses to process. */
@@ -102,9 +102,9 @@ slurp_symtab (abfd)
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
return;
- symcount = bfd_read_minisymbols (abfd, false, (PTR) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, FALSE, (PTR) &syms, &size);
if (symcount == 0)
- symcount = bfd_read_minisymbols (abfd, true /* dynamic */, (PTR) &syms, &size);
+ symcount = bfd_read_minisymbols (abfd, TRUE /* dynamic */, (PTR) &syms, &size);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -117,7 +117,7 @@ static bfd_vma pc;
static const char *filename;
static const char *functionname;
static unsigned int line;
-static boolean found;
+static bfd_boolean found;
/* Look for an address in a section. This is called via
bfd_map_over_sections. */
@@ -176,7 +176,7 @@ translate_addresses (abfd)
pc = bfd_scan_vma (*addr++, NULL, 16);
}
- found = false;
+ found = FALSE;
bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
if (! found)
@@ -307,7 +307,7 @@ main (argc, argv)
target = optarg;
break;
case 'C':
- do_demangle = true;
+ do_demangle = TRUE;
if (optarg != NULL)
{
enum demangling_styles style;
@@ -324,10 +324,10 @@ main (argc, argv)
file_name = optarg;
break;
case 's':
- base_names = true;
+ base_names = TRUE;
break;
case 'f':
- with_functions = true;
+ with_functions = TRUE;
break;
case 'v':
case 'V':
diff --git a/binutils/ar.c b/binutils/ar.c
index ea1b456..9a6946e 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -86,7 +86,7 @@ static void
move_members PARAMS ((bfd *, char **files_to_move));
static void
-replace_members PARAMS ((bfd *, char **files_to_replace, boolean quick));
+replace_members PARAMS ((bfd *, char **files_to_replace, bfd_boolean quick));
static void
print_descr PARAMS ((bfd * abfd));
@@ -150,18 +150,18 @@ enum pos
static bfd **
get_pos_bfd PARAMS ((bfd **, enum pos, const char *));
-/* For extract/delete only. If COUNTED_NAME_MODE is true, we only
+/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only
extract the COUNTED_NAME_COUNTER instance of that name. */
-static boolean counted_name_mode = 0;
+static bfd_boolean counted_name_mode = 0;
static int counted_name_counter = 0;
/* Whether to truncate names of files stored in the archive. */
-static boolean ar_truncate = false;
+static bfd_boolean ar_truncate = FALSE;
/* Whether to use a full file name match when searching an archive.
This is convenient for archives created by the Microsoft lib
program. */
-static boolean full_pathname = false;
+static bfd_boolean full_pathname = FALSE;
int interactive = 0;
@@ -204,7 +204,7 @@ map_over_members (arch, function, files, count)
for (; count > 0; files++, count--)
{
- boolean found = false;
+ bfd_boolean found = FALSE;
match_count = 0;
for (head = arch->next; head; head = head->next)
@@ -229,7 +229,7 @@ map_over_members (arch, function, files, count)
continue;
}
- found = true;
+ found = TRUE;
function (head);
}
}
@@ -239,7 +239,7 @@ map_over_members (arch, function, files, count)
}
}
-boolean operation_alters_arch = false;
+bfd_boolean operation_alters_arch = FALSE;
static void
usage (help)
@@ -455,7 +455,7 @@ main (argc, argv)
if (is_ranlib)
{
- boolean touch = false;
+ bfd_boolean touch = FALSE;
if (argc < 2
|| strcmp (argv[1], "--help") == 0
@@ -470,7 +470,7 @@ main (argc, argv)
if (strcmp (argv[1], "-t") == 0)
{
++arg_index;
- touch = true;
+ touch = TRUE;
}
while (arg_index < argc)
{
@@ -514,22 +514,22 @@ main (argc, argv)
{
case 'd':
operation = delete;
- operation_alters_arch = true;
+ operation_alters_arch = TRUE;
break;
case 'm':
operation = move;
- operation_alters_arch = true;
+ operation_alters_arch = TRUE;
break;
case 'p':
operation = print_files;
break;
case 'q':
operation = quick_append;
- operation_alters_arch = true;
+ operation_alters_arch = TRUE;
break;
case 'r':
operation = replace;
- operation_alters_arch = true;
+ operation_alters_arch = TRUE;
break;
case 't':
operation = print_table;
@@ -547,7 +547,7 @@ main (argc, argv)
preserve_dates = 1;
break;
case 'V':
- show_version = true;
+ show_version = TRUE;
break;
case 's':
write_armap = 1;
@@ -574,13 +574,13 @@ main (argc, argv)
mri_mode = 1;
break;
case 'N':
- counted_name_mode = true;
+ counted_name_mode = TRUE;
break;
case 'f':
- ar_truncate = true;
+ ar_truncate = TRUE;
break;
case 'P':
- full_pathname = true;
+ full_pathname = TRUE;
break;
default:
/* xgettext:c-format */
@@ -975,7 +975,7 @@ do_quick_append (archive_filename, files_to_append)
long tocopy, thistime;
bfd *temp;
struct stat sbuf;
- boolean newfile = false;
+ bfd_boolean newfile = FALSE;
bfd_set_error (bfd_error_no_error);
if (stat (archive_filename, &sbuf) != 0)
@@ -998,7 +998,7 @@ do_quick_append (archive_filename, files_to_append)
bfd_fatal (archive_filename);
#endif
- newfile = true;
+ newfile = TRUE;
}
ofile = fopen (archive_filename, FOPEN_AUB);
@@ -1013,9 +1013,9 @@ do_quick_append (archive_filename, files_to_append)
{
bfd_fatal (archive_filename);
}
- if (newfile == false)
+ if (!newfile)
{
- if (bfd_check_format (temp, bfd_archive) != true)
+ if (!bfd_check_format (temp, bfd_archive))
/* xgettext:c-format */
fatal (_("%s is not an archive"), archive_filename);
}
@@ -1113,7 +1113,7 @@ write_archive (iarch)
obfd->flags |= BFD_TRADITIONAL_FORMAT;
}
- if (bfd_set_archive_head (obfd, contents_head) != true)
+ if (!bfd_set_archive_head (obfd, contents_head))
bfd_fatal (old_name);
if (!bfd_close (obfd))
@@ -1178,8 +1178,8 @@ delete_members (arch, files_to_delete)
char **files_to_delete;
{
bfd **current_ptr_ptr;
- boolean found;
- boolean something_changed = false;
+ bfd_boolean found;
+ bfd_boolean something_changed = FALSE;
int match_count;
for (; *files_to_delete != NULL; ++files_to_delete)
@@ -1192,12 +1192,12 @@ delete_members (arch, files_to_delete)
if (!strcmp (*files_to_delete, "__.SYMDEF"))
{
- arch->has_armap = false;
+ arch->has_armap = FALSE;
write_armap = -1;
continue;
}
- found = false;
+ found = FALSE;
match_count = 0;
current_ptr_ptr = &(arch->next);
while (*current_ptr_ptr)
@@ -1214,8 +1214,8 @@ delete_members (arch, files_to_delete)
}
else
{
- found = true;
- something_changed = true;
+ found = TRUE;
+ something_changed = TRUE;
if (verbose)
printf ("d - %s\n",
*files_to_delete);
@@ -1227,7 +1227,7 @@ delete_members (arch, files_to_delete)
current_ptr_ptr = &((*current_ptr_ptr)->next);
}
- if (verbose && found == false)
+ if (verbose && !found)
{
/* xgettext:c-format */
printf (_("No member named `%s'\n"), *files_to_delete);
@@ -1236,7 +1236,7 @@ delete_members (arch, files_to_delete)
;
}
- if (something_changed == true)
+ if (something_changed)
write_archive (arch);
else
output_filename = NULL;
@@ -1296,9 +1296,9 @@ static void
replace_members (arch, files_to_move, quick)
bfd *arch;
char **files_to_move;
- boolean quick;
+ bfd_boolean quick;
{
- boolean changed = false;
+ bfd_boolean changed = FALSE;
bfd **after_bfd; /* New entries go after this one */
bfd *current;
bfd **current_ptr;
@@ -1344,7 +1344,7 @@ replace_members (arch, files_to_move, quick)
{
/* Snip out this entry from the chain. */
*current_ptr = (*current_ptr)->next;
- changed = true;
+ changed = TRUE;
}
goto next_file;
@@ -1356,7 +1356,7 @@ replace_members (arch, files_to_move, quick)
/* Add to the end of the archive. */
after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
if (ar_emul_append (after_bfd, *files_to_move, verbose))
- changed = true;
+ changed = TRUE;
next_file:;
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 7b01d37..b3e9672 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -69,7 +69,7 @@ map_over_list (arch, function, list)
want to hack multiple references. */
for (ptr = list; ptr; ptr = ptr->next)
{
- boolean found = false;
+ bfd_boolean found = FALSE;
bfd *prev = arch;
for (head = arch->next; head; head = head->next)
@@ -77,7 +77,7 @@ map_over_list (arch, function, list)
if (head->filename != NULL
&& FILENAME_CMP (ptr->name, head->filename) == 0)
{
- found = true;
+ found = TRUE;
function (head, prev);
}
prev = head;
@@ -192,7 +192,7 @@ ar_open (name, t)
return;
}
- if (bfd_check_format(ibfd, bfd_archive) != true)
+ if (!bfd_check_format(ibfd, bfd_archive))
{
fprintf (stderr,
_("%s: file %s is not an archive\n"),
diff --git a/binutils/binemul.c b/binutils/binemul.c
index 5144793..67aaba8 100644
--- a/binutils/binemul.c
+++ b/binutils/binemul.c
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright 2002 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -39,23 +39,23 @@ ar_emul_default_usage (fp)
fprintf (fp, _(" No emulation specific options\n"));
}
-boolean
+bfd_boolean
ar_emul_append (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
if (bin_dummy_emulation.ar_append)
return bin_dummy_emulation.ar_append (after_bfd, file_name, verbose);
- return false;
+ return FALSE;
}
-boolean
+bfd_boolean
ar_emul_default_append (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
bfd *temp;
@@ -67,26 +67,26 @@ ar_emul_default_append (after_bfd, file_name, verbose)
(*after_bfd)->next = temp;
- return true;
+ return TRUE;
}
-boolean
+bfd_boolean
ar_emul_replace (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
if (bin_dummy_emulation.ar_replace)
return bin_dummy_emulation.ar_replace (after_bfd, file_name, verbose);
- return false;
+ return FALSE;
}
-boolean
+bfd_boolean
ar_emul_default_replace (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
bfd *temp;
@@ -98,10 +98,10 @@ ar_emul_default_replace (after_bfd, file_name, verbose)
(*after_bfd)->next = temp;
- return true;
+ return TRUE;
}
-boolean
+bfd_boolean
ar_emul_create (abfd_out, archive_file_name, file_name)
bfd **abfd_out;
char *archive_file_name;
@@ -111,10 +111,10 @@ ar_emul_create (abfd_out, archive_file_name, file_name)
return bin_dummy_emulation.ar_create (abfd_out, archive_file_name,
file_name);
- return false;
+ return FALSE;
}
-boolean
+bfd_boolean
ar_emul_default_create (abfd_out, archive_file_name, file_name)
bfd **abfd_out;
char *archive_file_name;
@@ -144,22 +144,22 @@ ar_emul_default_create (abfd_out, archive_file_name, file_name)
|| ! bfd_close (*abfd_out))
bfd_fatal (archive_file_name);
- return true;
+ return TRUE;
}
-boolean
+bfd_boolean
ar_emul_parse_arg (arg)
char *arg;
{
if (bin_dummy_emulation.ar_parse_arg)
return bin_dummy_emulation.ar_parse_arg (arg);
- return false;
+ return FALSE;
}
-boolean
+bfd_boolean
ar_emul_default_parse_arg (arg)
char *arg ATTRIBUTE_UNUSED;
{
- return false;
+ return FALSE;
}
diff --git a/binutils/binemul.h b/binutils/binemul.h
index bbcb16e..f8afae5 100644
--- a/binutils/binemul.h
+++ b/binutils/binemul.h
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright 2002 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -24,16 +24,26 @@
#include "bfd.h"
#include "bucomm.h"
-extern void ar_emul_usage PARAMS ((FILE *));
-extern void ar_emul_default_usage PARAMS ((FILE *));
-extern boolean ar_emul_append PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_default_append PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_replace PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_default_replace PARAMS ((bfd **, char *, boolean));
-extern boolean ar_emul_create PARAMS ((bfd **, char *, char *));
-extern boolean ar_emul_default_create PARAMS ((bfd **, char *, char *));
-extern boolean ar_emul_parse_arg PARAMS ((char *));
-extern boolean ar_emul_default_parse_arg PARAMS ((char *));
+extern void ar_emul_usage
+ PARAMS ((FILE *));
+extern void ar_emul_default_usage
+ PARAMS ((FILE *));
+extern bfd_boolean ar_emul_append
+ PARAMS ((bfd **, char *, bfd_boolean));
+extern bfd_boolean ar_emul_default_append
+ PARAMS ((bfd **, char *, bfd_boolean));
+extern bfd_boolean ar_emul_replace
+ PARAMS ((bfd **, char *, bfd_boolean));
+extern bfd_boolean ar_emul_default_replace
+ PARAMS ((bfd **, char *, bfd_boolean));
+extern bfd_boolean ar_emul_create
+ PARAMS ((bfd **, char *, char *));
+extern bfd_boolean ar_emul_default_create
+ PARAMS ((bfd **, char *, char *));
+extern bfd_boolean ar_emul_parse_arg
+ PARAMS ((char *));
+extern bfd_boolean ar_emul_default_parse_arg
+ PARAMS ((char *));
/* Macros for common output. */
@@ -53,11 +63,11 @@ extern boolean ar_emul_default_parse_arg PARAMS ((char *));
typedef struct bin_emulation_xfer_struct
{
/* Print out the extra options. */
- void (* ar_usage) PARAMS ((FILE *fp));
- boolean (* ar_append) PARAMS ((bfd **, char *, boolean));
- boolean (* ar_replace) PARAMS ((bfd **, char *, boolean));
- boolean (* ar_create) PARAMS ((bfd **, char *, char *));
- boolean (* ar_parse_arg) PARAMS ((char *));
+ void (* ar_usage) PARAMS ((FILE *fp));
+ bfd_boolean (* ar_append) PARAMS ((bfd **, char *, bfd_boolean));
+ bfd_boolean (* ar_replace) PARAMS ((bfd **, char *, bfd_boolean));
+ bfd_boolean (* ar_create) PARAMS ((bfd **, char *, char *));
+ bfd_boolean (* ar_parse_arg) PARAMS ((char *));
}
bin_emulation_xfer_type;
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 2bc8cef..9609aee 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -107,7 +107,7 @@ set_default_bfd_target ()
target, bfd_errmsg (bfd_get_error ()));
}
-/* After a false return from bfd_check_format_matches with
+/* After a FALSE return from bfd_check_format_matches with
bfd_get_error () == bfd_error_file_ambiguously_recognized, print
the possible matching targets. */
@@ -169,7 +169,7 @@ void
print_arelt_descr (file, abfd, verbose)
FILE *file;
bfd *abfd;
- boolean verbose;
+ bfd_boolean verbose;
{
struct stat buf;
diff --git a/binutils/bucomm.h b/binutils/bucomm.h
index 0c98a7f..7a11ea8 100644
--- a/binutils/bucomm.h
+++ b/binutils/bucomm.h
@@ -1,6 +1,6 @@
/* bucomm.h -- binutils common include file.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2002 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -148,46 +148,64 @@ void *alloca ();
#endif
/* bucomm.c */
-void bfd_nonfatal PARAMS ((const char *));
+void bfd_nonfatal
+ PARAMS ((const char *));
-void bfd_fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
+void bfd_fatal
+ PARAMS ((const char *)) ATTRIBUTE_NORETURN;
-void report PARAMS ((const char *, va_list));
+void report
+ PARAMS ((const char *, va_list));
-void fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fatal
+ PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-void non_fatal PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
+void non_fatal
+ PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
-void set_default_bfd_target PARAMS ((void));
+void set_default_bfd_target
+ PARAMS ((void));
-void list_matching_formats PARAMS ((char **p));
+void list_matching_formats
+ PARAMS ((char **p));
-void list_supported_targets PARAMS ((const char *, FILE *));
+void list_supported_targets
+ PARAMS ((const char *, FILE *));
-void list_supported_architectures PARAMS ((const char *, FILE *));
+void list_supported_architectures
+ PARAMS ((const char *, FILE *));
-void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
+void print_arelt_descr
+ PARAMS ((FILE *file, bfd *abfd, bfd_boolean verbose));
-char *make_tempname PARAMS ((char *));
+char *make_tempname
+ PARAMS ((char *));
-bfd_vma parse_vma PARAMS ((const char *, const char *));
+bfd_vma parse_vma
+ PARAMS ((const char *, const char *));
extern char *program_name;
/* filemode.c */
-void mode_string PARAMS ((unsigned long mode, char *buf));
+void mode_string
+ PARAMS ((unsigned long mode, char *buf));
/* version.c */
-extern void print_version PARAMS ((const char *));
+extern void print_version
+ PARAMS ((const char *));
/* rename.c */
-extern void set_times PARAMS ((const char *, const struct stat *));
+extern void set_times
+ PARAMS ((const char *, const struct stat *));
-extern int smart_rename PARAMS ((const char *, const char *, int));
+extern int smart_rename
+ PARAMS ((const char *, const char *, int));
/* libiberty */
-PTR xmalloc PARAMS ((size_t));
+PTR xmalloc
+ PARAMS ((size_t));
-PTR xrealloc PARAMS ((PTR, size_t));
+PTR xrealloc
+ PARAMS ((PTR, size_t));
#endif /* _BUCOMM_H */
diff --git a/binutils/budbg.h b/binutils/budbg.h
index 2bbf72e..dc68703 100644
--- a/binutils/budbg.h
+++ b/binutils/budbg.h
@@ -1,5 +1,5 @@
/* budbg.c -- Interfaces to the generic debugging information routines.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -26,33 +26,40 @@
/* Routine used to read generic debugging information. */
-extern PTR read_debugging_info PARAMS ((bfd *, asymbol **, long));
+extern PTR read_debugging_info
+ PARAMS ((bfd *, asymbol **, long));
/* Routine used to print generic debugging information. */
-extern boolean print_debugging_info PARAMS ((FILE *, PTR));
+extern bfd_boolean print_debugging_info
+ PARAMS ((FILE *, PTR));
/* Routines used to read and write stabs information. */
-extern PTR start_stab PARAMS ((PTR, bfd *, boolean, asymbol **, long));
+extern PTR start_stab
+ PARAMS ((PTR, bfd *, bfd_boolean, asymbol **, long));
-extern boolean finish_stab PARAMS ((PTR, PTR));
+extern bfd_boolean finish_stab
+ PARAMS ((PTR, PTR));
-extern boolean parse_stab PARAMS ((PTR, PTR, int, int, bfd_vma, const char *));
+extern bfd_boolean parse_stab
+ PARAMS ((PTR, PTR, int, int, bfd_vma, const char *));
-extern boolean write_stabs_in_sections_debugging_info
+extern bfd_boolean write_stabs_in_sections_debugging_info
PARAMS ((bfd *, PTR, bfd_byte **, bfd_size_type *, bfd_byte **,
bfd_size_type *));
/* Routines used to read and write IEEE debugging information. */
-extern boolean parse_ieee
+extern bfd_boolean parse_ieee
PARAMS ((PTR, bfd *, const bfd_byte *, bfd_size_type));
-extern boolean write_ieee_debugging_info PARAMS ((bfd *, PTR));
+extern bfd_boolean write_ieee_debugging_info
+ PARAMS ((bfd *, PTR));
/* Routine used to read COFF debugging information. */
-extern boolean parse_coff PARAMS ((bfd *, asymbol **, long, PTR));
+extern bfd_boolean parse_coff
+ PARAMS ((bfd *, asymbol **, long, PTR));
#endif
diff --git a/binutils/debug.c b/binutils/debug.c
index 3ce609b..1cd1d3d 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -111,7 +111,7 @@ struct debug_type
struct debug_indirect_type *kindirect;
/* DEBUG_KIND_INT. */
/* Whether the integer is unsigned. */
- boolean kint;
+ bfd_boolean kint;
/* DEBUG_KIND_STRUCT, DEBUG_KIND_UNION, DEBUG_KIND_CLASS,
DEBUG_KIND_UNION_CLASS. */
struct debug_class_type *kclass;
@@ -194,7 +194,7 @@ struct debug_function_type
/* NULL terminated array of argument types. */
debug_type *arg_types;
/* Whether the function takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
};
/* Information kept for a range. */
@@ -222,7 +222,7 @@ struct debug_array_type
/* Upper bound. */
bfd_signed_vma upper;
/* Whether this array is really a string. */
- boolean stringp;
+ bfd_boolean stringp;
};
/* Information kept for a set. */
@@ -232,7 +232,7 @@ struct debug_set_type
/* Base type. */
debug_type type;
/* Whether this set is really a bitstring. */
- boolean bitstringp;
+ bfd_boolean bitstringp;
};
/* Information kept for an offset type (a based pointer). */
@@ -256,7 +256,7 @@ struct debug_method_type
/* A NULL terminated array of argument types. */
debug_type *arg_types;
/* Whether the method takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
};
/* Information kept for a named type. */
@@ -280,7 +280,7 @@ struct debug_field
/* Visibility of the field. */
enum debug_visibility visibility;
/* Whether this is a static member. */
- boolean static_member;
+ bfd_boolean static_member;
union
{
/* If static_member is false. */
@@ -308,7 +308,7 @@ struct debug_baseclass
/* Bit position of the base class in the object. */
unsigned int bitpos;
/* Whether the base class is virtual. */
- boolean virtual;
+ bfd_boolean virtual;
/* Visibility of the base class. */
enum debug_visibility visibility;
};
@@ -335,9 +335,9 @@ struct debug_method_variant
/* The visibility of the function. */
enum debug_visibility visibility;
/* Whether the function is const. */
- boolean constp;
+ bfd_boolean constp;
/* Whether the function is volatile. */
- boolean volatilep;
+ bfd_boolean volatilep;
/* The offset to the function in the virtual function table. */
bfd_vma voffset;
/* If voffset is VOFFSET_STATIC_METHOD, this is a static method. */
@@ -554,7 +554,8 @@ struct debug_type_real_list
/* Local functions. */
-static void debug_error PARAMS ((const char *));
+static void debug_error
+ PARAMS ((const char *));
static struct debug_name *debug_add_to_namespace
PARAMS ((struct debug_handle *, struct debug_namespace **, const char *,
enum debug_object_kind, enum debug_object_linkage));
@@ -565,29 +566,29 @@ static struct debug_type *debug_make_type
PARAMS ((struct debug_handle *, enum debug_type_kind, unsigned int));
static struct debug_type *debug_get_real_type
PARAMS ((PTR, debug_type, struct debug_type_real_list *));
-static boolean debug_write_name
+static bfd_boolean debug_write_name
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
struct debug_name *));
-static boolean debug_write_type
+static bfd_boolean debug_write_type
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
struct debug_type *, struct debug_name *));
-static boolean debug_write_class_type
+static bfd_boolean debug_write_class_type
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
struct debug_type *, const char *));
-static boolean debug_write_function
+static bfd_boolean debug_write_function
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
const char *, enum debug_object_linkage, struct debug_function *));
-static boolean debug_write_block
+static bfd_boolean debug_write_block
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
struct debug_block *));
-static boolean debug_write_linenos
+static bfd_boolean debug_write_linenos
PARAMS ((struct debug_handle *, const struct debug_write_fns *, PTR,
bfd_vma));
-static boolean debug_set_class_id
+static bfd_boolean debug_set_class_id
PARAMS ((struct debug_handle *, const char *, struct debug_type *));
-static boolean debug_type_samep
+static bfd_boolean debug_type_samep
PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
-static boolean debug_class_type_samep
+static bfd_boolean debug_class_type_samep
PARAMS ((struct debug_handle *, struct debug_type *, struct debug_type *));
/* Issue an error message. */
@@ -677,7 +678,7 @@ debug_init ()
/* Set the source filename. This implicitly starts a new compilation
unit. */
-boolean
+bfd_boolean
debug_set_filename (handle, name)
PTR handle;
const char *name;
@@ -714,13 +715,13 @@ debug_set_filename (handle, name)
info->current_block = NULL;
info->current_lineno = NULL;
- return true;
+ return TRUE;
}
/* Change source files to the given file name. This is used for
include files in a single compilation unit. */
-boolean
+bfd_boolean
debug_start_source (handle, name)
PTR handle;
const char *name;
@@ -734,7 +735,7 @@ debug_start_source (handle, name)
if (info->current_unit == NULL)
{
debug_error (_("debug_start_source: no debug_set_filename call"));
- return false;
+ return FALSE;
}
for (f = info->current_unit->files; f != NULL; f = f->next)
@@ -744,7 +745,7 @@ debug_start_source (handle, name)
&& strcmp (f->filename, name) == 0)
{
info->current_file = f;
- return true;
+ return TRUE;
}
}
@@ -761,7 +762,7 @@ debug_start_source (handle, name)
info->current_file = f;
- return true;
+ return TRUE;
}
/* Record a function definition. This implicitly starts a function
@@ -772,12 +773,12 @@ debug_start_source (handle, name)
debug_record_parameter. FIXME: There is no way to specify nested
functions. */
-boolean
+bfd_boolean
debug_record_function (handle, name, return_type, global, addr)
PTR handle;
const char *name;
debug_type return_type;
- boolean global;
+ bfd_boolean global;
bfd_vma addr;
{
struct debug_handle *info = (struct debug_handle *) handle;
@@ -788,12 +789,12 @@ debug_record_function (handle, name, return_type, global, addr)
if (name == NULL)
name = "";
if (return_type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL)
{
debug_error (_("debug_record_function: no debug_set_filename call"));
- return false;
+ return FALSE;
}
f = (struct debug_function *) xmalloc (sizeof *f);
@@ -822,16 +823,16 @@ debug_record_function (handle, name, return_type, global, addr)
? DEBUG_LINKAGE_GLOBAL
: DEBUG_LINKAGE_STATIC));
if (n == NULL)
- return false;
+ return FALSE;
n->u.function = f;
- return true;
+ return TRUE;
}
/* Record a parameter for the current function. */
-boolean
+bfd_boolean
debug_record_parameter (handle, name, type, kind, val)
PTR handle;
const char *name;
@@ -843,13 +844,13 @@ debug_record_parameter (handle, name, type, kind, val)
struct debug_parameter *p, **pp;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL
|| info->current_function == NULL)
{
debug_error (_("debug_record_parameter: no current function"));
- return false;
+ return FALSE;
}
p = (struct debug_parameter *) xmalloc (sizeof *p);
@@ -866,12 +867,12 @@ debug_record_parameter (handle, name, type, kind, val)
;
*pp = p;
- return true;
+ return TRUE;
}
/* End a function. FIXME: This should handle function nesting. */
-boolean
+bfd_boolean
debug_end_function (handle, addr)
PTR handle;
bfd_vma addr;
@@ -883,13 +884,13 @@ debug_end_function (handle, addr)
|| info->current_function == NULL)
{
debug_error (_("debug_end_function: no current function"));
- return false;
+ return FALSE;
}
if (info->current_block->parent != NULL)
{
debug_error (_("debug_end_function: some blocks were not closed"));
- return false;
+ return FALSE;
}
info->current_block->end = addr;
@@ -897,7 +898,7 @@ debug_end_function (handle, addr)
info->current_function = NULL;
info->current_block = NULL;
- return true;
+ return TRUE;
}
/* Start a block in a function. All local information will be
@@ -905,7 +906,7 @@ debug_end_function (handle, addr)
debug_start_block and debug_end_block may be nested. The bfd_vma
argument is the address at which this block starts. */
-boolean
+bfd_boolean
debug_start_block (handle, addr)
PTR handle;
bfd_vma addr;
@@ -919,7 +920,7 @@ debug_start_block (handle, addr)
|| info->current_block == NULL)
{
debug_error (_("debug_start_block: no current block"));
- return false;
+ return FALSE;
}
b = (struct debug_block *) xmalloc (sizeof *b);
@@ -938,14 +939,14 @@ debug_start_block (handle, addr)
info->current_block = b;
- return true;
+ return TRUE;
}
/* Finish a block in a function. This matches the call to
debug_start_block. The argument is the address at which this block
ends. */
-boolean
+bfd_boolean
debug_end_block (handle, addr)
PTR handle;
bfd_vma addr;
@@ -957,27 +958,27 @@ debug_end_block (handle, addr)
|| info->current_block == NULL)
{
debug_error (_("debug_end_block: no current block"));
- return false;
+ return FALSE;
}
parent = info->current_block->parent;
if (parent == NULL)
{
debug_error (_("debug_end_block: attempt to close top level block"));
- return false;
+ return FALSE;
}
info->current_block->end = addr;
info->current_block = parent;
- return true;
+ return TRUE;
}
/* Associate a line number in the current source file and function
with a given address. */
-boolean
+bfd_boolean
debug_record_line (handle, lineno, addr)
PTR handle;
unsigned long lineno;
@@ -990,7 +991,7 @@ debug_record_line (handle, lineno, addr)
if (info->current_unit == NULL)
{
debug_error (_("debug_record_line: no current unit"));
- return false;
+ return FALSE;
}
l = info->current_lineno;
@@ -1002,7 +1003,7 @@ debug_record_line (handle, lineno, addr)
{
l->linenos[i] = lineno;
l->addrs[i] = addr;
- return true;
+ return TRUE;
}
}
}
@@ -1031,37 +1032,37 @@ debug_record_line (handle, lineno, addr)
info->current_lineno = l;
- return true;
+ return TRUE;
}
/* Start a named common block. This is a block of variables that may
move in memory. */
-boolean
+bfd_boolean
debug_start_common_block (handle, name)
PTR handle ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_start_common_block: not implemented"));
- return false;
+ return FALSE;
}
/* End a named common block. */
-boolean
+bfd_boolean
debug_end_common_block (handle, name)
PTR handle ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
{
/* FIXME */
debug_error (_("debug_end_common_block: not implemented"));
- return false;
+ return FALSE;
}
/* Record a named integer constant. */
-boolean
+bfd_boolean
debug_record_int_const (handle, name, val)
PTR handle;
const char *name;
@@ -1071,21 +1072,21 @@ debug_record_int_const (handle, name, val)
struct debug_name *n;
if (name == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_INT_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
n->u.int_constant = val;
- return true;
+ return TRUE;
}
/* Record a named floating point constant. */
-boolean
+bfd_boolean
debug_record_float_const (handle, name, val)
PTR handle;
const char *name;
@@ -1095,21 +1096,21 @@ debug_record_float_const (handle, name, val)
struct debug_name *n;
if (name == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_FLOAT_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
n->u.float_constant = val;
- return true;
+ return TRUE;
}
/* Record a typed constant with an integral value. */
-boolean
+bfd_boolean
debug_record_typed_const (handle, name, type, val)
PTR handle;
const char *name;
@@ -1121,12 +1122,12 @@ debug_record_typed_const (handle, name, type, val)
struct debug_typed_constant *tc;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
n = debug_add_to_current_namespace (info, name, DEBUG_OBJECT_TYPED_CONSTANT,
DEBUG_LINKAGE_NONE);
if (n == NULL)
- return false;
+ return FALSE;
tc = (struct debug_typed_constant *) xmalloc (sizeof *tc);
memset (tc, 0, sizeof *tc);
@@ -1136,12 +1137,12 @@ debug_record_typed_const (handle, name, type, val)
n->u.typed_constant = tc;
- return true;
+ return TRUE;
}
/* Record a label. */
-boolean
+bfd_boolean
debug_record_label (handle, name, type, addr)
PTR handle ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
@@ -1150,12 +1151,12 @@ debug_record_label (handle, name, type, addr)
{
/* FIXME. */
debug_error (_("debug_record_label: not implemented"));
- return false;
+ return FALSE;
}
/* Record a variable. */
-boolean
+bfd_boolean
debug_record_variable (handle, name, type, kind, val)
PTR handle;
const char *name;
@@ -1170,13 +1171,13 @@ debug_record_variable (handle, name, type, kind, val)
struct debug_variable *v;
if (name == NULL || type == NULL)
- return false;
+ return FALSE;
if (info->current_unit == NULL
|| info->current_file == NULL)
{
debug_error (_("debug_record_variable: no current file"));
- return false;
+ return FALSE;
}
if (kind == DEBUG_GLOBAL || kind == DEBUG_STATIC)
@@ -1192,7 +1193,7 @@ debug_record_variable (handle, name, type, kind, val)
if (info->current_block == NULL)
{
debug_error (_("debug_record_variable: no current block"));
- return false;
+ return FALSE;
}
nsp = &info->current_block->locals;
linkage = DEBUG_LINKAGE_AUTOMATIC;
@@ -1200,7 +1201,7 @@ debug_record_variable (handle, name, type, kind, val)
n = debug_add_to_namespace (info, nsp, name, DEBUG_OBJECT_VARIABLE, linkage);
if (n == NULL)
- return false;
+ return FALSE;
v = (struct debug_variable *) xmalloc (sizeof *v);
memset (v, 0, sizeof *v);
@@ -1211,7 +1212,7 @@ debug_record_variable (handle, name, type, kind, val)
n->u.variable = v;
- return true;
+ return TRUE;
}
/* Make a type with a given kind and size. */
@@ -1279,7 +1280,7 @@ debug_type
debug_make_int_type (handle, size, unsignedp)
PTR handle;
unsigned int size;
- boolean unsignedp;
+ bfd_boolean unsignedp;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1338,7 +1339,7 @@ debug_make_complex_type (handle, size)
debug_type
debug_make_struct_type (handle, structp, size, fields)
PTR handle;
- boolean structp;
+ bfd_boolean structp;
bfd_vma size;
debug_field *fields;
{
@@ -1373,13 +1374,13 @@ debug_type
debug_make_object_type (handle, structp, size, fields, baseclasses,
methods, vptrbase, ownvptr)
PTR handle;
- boolean structp;
+ bfd_boolean structp;
bfd_vma size;
debug_field *fields;
debug_baseclass *baseclasses;
debug_method *methods;
debug_type vptrbase;
- boolean ownvptr;
+ bfd_boolean ownvptr;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1470,7 +1471,7 @@ debug_make_function_type (handle, type, arg_types, varargs)
PTR handle;
debug_type type;
debug_type *arg_types;
- boolean varargs;
+ bfd_boolean varargs;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1563,7 +1564,7 @@ debug_make_array_type (handle, element_type, range_type, lower, upper,
debug_type range_type;
bfd_signed_vma lower;
bfd_signed_vma upper;
- boolean stringp;
+ bfd_boolean stringp;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1598,7 +1599,7 @@ debug_type
debug_make_set_type (handle, type, bitstringp)
PTR handle;
debug_type type;
- boolean bitstringp;
+ bfd_boolean bitstringp;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1665,7 +1666,7 @@ debug_make_method_type (handle, return_type, domain_type, arg_types, varargs)
debug_type return_type;
debug_type domain_type;
debug_type *arg_types;
- boolean varargs;
+ bfd_boolean varargs;
{
struct debug_handle *info = (struct debug_handle *) handle;
struct debug_type *t;
@@ -1782,7 +1783,7 @@ debug_make_baseclass (handle, type, bitpos, virtual, visibility)
PTR handle ATTRIBUTE_UNUSED;
debug_type type;
bfd_vma bitpos;
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
{
struct debug_baseclass *b;
@@ -1820,7 +1821,7 @@ debug_make_field (handle, name, type, bitpos, bitsize, visibility)
f->name = name;
f->type = type;
- f->static_member = false;
+ f->static_member = FALSE;
f->u.f.bitpos = bitpos;
f->u.f.bitsize = bitsize;
f->visibility = visibility;
@@ -1849,7 +1850,7 @@ debug_make_static_member (handle, name, type, physname, visibility)
f->name = name;
f->type = type;
- f->static_member = true;
+ f->static_member = TRUE;
f->u.s.physname = physname;
f->visibility = visibility;
@@ -1892,8 +1893,8 @@ debug_make_method_variant (handle, physname, type, visibility, constp,
const char *physname;
debug_type type;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
bfd_vma voffset;
debug_type context;
{
@@ -1924,8 +1925,8 @@ debug_make_static_method_variant (handle, physname, type, visibility,
const char *physname;
debug_type type;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
{
struct debug_method_variant *m;
@@ -2049,7 +2050,7 @@ debug_tag_type (handle, name, type)
/* Record the size of a given type. */
-boolean
+bfd_boolean
debug_record_type_size (handle, type, size)
PTR handle ATTRIBUTE_UNUSED;
debug_type type;
@@ -2061,7 +2062,7 @@ debug_record_type_size (handle, type, size)
type->size = size;
- return true;
+ return TRUE;
}
/* Find a named type. */
@@ -2307,7 +2308,7 @@ const debug_type *
debug_get_parameter_types (handle, type, pvarargs)
PTR handle;
debug_type type;
- boolean *pvarargs;
+ bfd_boolean *pvarargs;
{
if (type == NULL)
return NULL;
@@ -2457,7 +2458,7 @@ debug_get_field_physname (handle, field)
/* Write out the debugging information. This is given a handle to
debugging information, and a set of function pointers to call. */
-boolean
+bfd_boolean
debug_write (handle, fns, fhandle)
PTR handle;
const struct debug_write_fns *fns;
@@ -2484,25 +2485,25 @@ debug_write (handle, fns, fhandle)
for (u = info->units; u != NULL; u = u->next)
{
struct debug_file *f;
- boolean first_file;
+ bfd_boolean first_file;
info->current_write_lineno = u->linenos;
info->current_write_lineno_index = 0;
if (! (*fns->start_compilation_unit) (fhandle, u->files->filename))
- return false;
+ return FALSE;
- first_file = true;
+ first_file = TRUE;
for (f = u->files; f != NULL; f = f->next)
{
struct debug_name *n;
if (first_file)
- first_file = false;
+ first_file = FALSE;
else
{
if (! (*fns->start_source) (fhandle, f->filename))
- return false;
+ return FALSE;
}
if (f->globals != NULL)
@@ -2510,7 +2511,7 @@ debug_write (handle, fns, fhandle)
for (n = f->globals->list; n != NULL; n = n->next)
{
if (! debug_write_name (info, fns, fhandle, n))
- return false;
+ return FALSE;
}
}
}
@@ -2518,15 +2519,15 @@ debug_write (handle, fns, fhandle)
/* Output any line number information which hasn't already been
handled. */
if (! debug_write_linenos (info, fns, fhandle, (bfd_vma) -1))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out an element in a namespace. */
-static boolean
+static bfd_boolean
debug_write_name (info, fns, fhandle, n)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -2538,16 +2539,16 @@ debug_write_name (info, fns, fhandle, n)
case DEBUG_OBJECT_TYPE:
if (! debug_write_type (info, fns, fhandle, n->u.type, n)
|| ! (*fns->typdef) (fhandle, n->name))
- return false;
- return true;
+ return FALSE;
+ return TRUE;
case DEBUG_OBJECT_TAG:
if (! debug_write_type (info, fns, fhandle, n->u.tag, n))
- return false;
+ return FALSE;
return (*fns->tag) (fhandle, n->name);
case DEBUG_OBJECT_VARIABLE:
if (! debug_write_type (info, fns, fhandle, n->u.variable->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->variable) (fhandle, n->name, n->u.variable->kind,
n->u.variable->val);
case DEBUG_OBJECT_FUNCTION:
@@ -2560,12 +2561,12 @@ debug_write_name (info, fns, fhandle, n)
case DEBUG_OBJECT_TYPED_CONSTANT:
if (! debug_write_type (info, fns, fhandle, n->u.typed_constant->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->typed_constant) (fhandle, n->name,
n->u.typed_constant->val);
default:
abort ();
- return false;
+ return FALSE;
}
/*NOTREACHED*/
}
@@ -2576,7 +2577,7 @@ debug_write_name (info, fns, fhandle, n)
then the name argument is a tag from a DEBUG_KIND_TAGGED type which
points to this one. */
-static boolean
+static bfd_boolean
debug_write_type (info, fns, fhandle, type, name)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -2619,7 +2620,7 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_set_class_id (info,
type->u.knamed->name->name,
real))
- return false;
+ return FALSE;
}
id = real->u.kclass->id;
}
@@ -2648,7 +2649,7 @@ debug_write_type (info, fns, fhandle, type, name)
{
case DEBUG_KIND_ILLEGAL:
debug_error (_("debug_write_type: illegal type encountered"));
- return false;
+ return FALSE;
case DEBUG_KIND_INDIRECT:
if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
return (*fns->empty_type) (fhandle);
@@ -2671,7 +2672,7 @@ debug_write_type (info, fns, fhandle, type, name)
if (type->u.kclass->id <= info->base_id)
{
if (! debug_set_class_id (info, tag, type))
- return false;
+ return FALSE;
}
if (info->mark == type->u.kclass->mark)
@@ -2692,7 +2693,7 @@ debug_write_type (info, fns, fhandle, type, name)
: 0),
type->kind == DEBUG_KIND_STRUCT,
type->size))
- return false;
+ return FALSE;
if (type->u.kclass != NULL
&& type->u.kclass->fields != NULL)
{
@@ -2705,7 +2706,7 @@ debug_write_type (info, fns, fhandle, type, name)
(struct debug_name *) NULL)
|| ! (*fns->struct_field) (fhandle, f->name, f->u.f.bitpos,
f->u.f.bitsize, f->visibility))
- return false;
+ return FALSE;
}
}
return (*fns->end_struct_type) (fhandle);
@@ -2721,13 +2722,13 @@ debug_write_type (info, fns, fhandle, type, name)
case DEBUG_KIND_POINTER:
if (! debug_write_type (info, fns, fhandle, type->u.kpointer,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->pointer_type) (fhandle);
case DEBUG_KIND_FUNCTION:
if (! debug_write_type (info, fns, fhandle,
type->u.kfunction->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (type->u.kfunction->arg_types == NULL)
is = -1;
else
@@ -2736,19 +2737,19 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_write_type (info, fns, fhandle,
type->u.kfunction->arg_types[is],
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
return (*fns->function_type) (fhandle, is,
type->u.kfunction->varargs);
case DEBUG_KIND_REFERENCE:
if (! debug_write_type (info, fns, fhandle, type->u.kreference,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->reference_type) (fhandle);
case DEBUG_KIND_RANGE:
if (! debug_write_type (info, fns, fhandle, type->u.krange->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->range_type) (fhandle, type->u.krange->lower,
type->u.krange->upper);
case DEBUG_KIND_ARRAY:
@@ -2757,14 +2758,14 @@ debug_write_type (info, fns, fhandle, type, name)
|| ! debug_write_type (info, fns, fhandle,
type->u.karray->range_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->array_type) (fhandle, type->u.karray->lower,
type->u.karray->upper,
type->u.karray->stringp);
case DEBUG_KIND_SET:
if (! debug_write_type (info, fns, fhandle, type->u.kset->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->set_type) (fhandle, type->u.kset->bitstringp);
case DEBUG_KIND_OFFSET:
if (! debug_write_type (info, fns, fhandle, type->u.koffset->base_type,
@@ -2772,13 +2773,13 @@ debug_write_type (info, fns, fhandle, type, name)
|| ! debug_write_type (info, fns, fhandle,
type->u.koffset->target_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->offset_type) (fhandle);
case DEBUG_KIND_METHOD:
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (type->u.kmethod->arg_types == NULL)
is = -1;
else
@@ -2787,14 +2788,14 @@ debug_write_type (info, fns, fhandle, type, name)
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->arg_types[is],
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
if (type->u.kmethod->domain_type != NULL)
{
if (! debug_write_type (info, fns, fhandle,
type->u.kmethod->domain_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
return (*fns->method_type) (fhandle,
type->u.kmethod->domain_type != NULL,
@@ -2803,12 +2804,12 @@ debug_write_type (info, fns, fhandle, type, name)
case DEBUG_KIND_CONST:
if (! debug_write_type (info, fns, fhandle, type->u.kconst,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->const_type) (fhandle);
case DEBUG_KIND_VOLATILE:
if (! debug_write_type (info, fns, fhandle, type->u.kvolatile,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
return (*fns->volatile_type) (fhandle);
case DEBUG_KIND_NAMED:
return debug_write_type (info, fns, fhandle, type->u.knamed->type,
@@ -2818,13 +2819,13 @@ debug_write_type (info, fns, fhandle, type, name)
type->u.knamed->name);
default:
abort ();
- return false;
+ return FALSE;
}
}
/* Write out a class type. */
-static boolean
+static bfd_boolean
debug_write_class_type (info, fns, fhandle, type, tag)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -2846,7 +2847,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
if (type->u.kclass->id <= info->base_id)
{
if (! debug_set_class_id (info, tag, type))
- return false;
+ return FALSE;
}
if (info->mark == type->u.kclass->mark)
@@ -2866,7 +2867,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
{
if (! debug_write_type (info, fns, fhandle, vptrbase,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
}
@@ -2875,7 +2876,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
type->size,
vptrbase != NULL,
vptrbase == type))
- return false;
+ return FALSE;
if (type->u.kclass != NULL)
{
@@ -2888,19 +2889,19 @@ debug_write_class_type (info, fns, fhandle, type, tag)
f = type->u.kclass->fields[i];
if (! debug_write_type (info, fns, fhandle, f->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (f->static_member)
{
if (! (*fns->class_static_member) (fhandle, f->name,
f->u.s.physname,
f->visibility))
- return false;
+ return FALSE;
}
else
{
if (! (*fns->struct_field) (fhandle, f->name, f->u.f.bitpos,
f->u.f.bitsize, f->visibility))
- return false;
+ return FALSE;
}
}
}
@@ -2914,10 +2915,10 @@ debug_write_class_type (info, fns, fhandle, type, tag)
b = type->u.kclass->baseclasses[i];
if (! debug_write_type (info, fns, fhandle, b->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (! (*fns->class_baseclass) (fhandle, b->bitpos, b->virtual,
b->visibility))
- return false;
+ return FALSE;
}
}
@@ -2930,7 +2931,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
m = type->u.kclass->methods[i];
if (! (*fns->class_start_method) (fhandle, m->name))
- return false;
+ return FALSE;
for (j = 0; m->variants[j] != NULL; j++)
{
struct debug_method_variant *v;
@@ -2940,11 +2941,11 @@ debug_write_class_type (info, fns, fhandle, type, tag)
{
if (! debug_write_type (info, fns, fhandle, v->context,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
}
if (! debug_write_type (info, fns, fhandle, v->type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (v->voffset != VOFFSET_STATIC_METHOD)
{
if (! (*fns->class_method_variant) (fhandle, v->physname,
@@ -2953,7 +2954,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
v->volatilep,
v->voffset,
v->context != NULL))
- return false;
+ return FALSE;
}
else
{
@@ -2962,11 +2963,11 @@ debug_write_class_type (info, fns, fhandle, type, tag)
v->visibility,
v->constp,
v->volatilep))
- return false;
+ return FALSE;
}
}
if (! (*fns->class_end_method) (fhandle))
- return false;
+ return FALSE;
}
}
}
@@ -2976,7 +2977,7 @@ debug_write_class_type (info, fns, fhandle, type, tag)
/* Write out information for a function. */
-static boolean
+static bfd_boolean
debug_write_function (info, fns, fhandle, name, linkage, function)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -2989,28 +2990,28 @@ debug_write_function (info, fns, fhandle, name, linkage, function)
struct debug_block *b;
if (! debug_write_linenos (info, fns, fhandle, function->blocks->start))
- return false;
+ return FALSE;
if (! debug_write_type (info, fns, fhandle, function->return_type,
(struct debug_name *) NULL))
- return false;
+ return FALSE;
if (! (*fns->start_function) (fhandle, name,
linkage == DEBUG_LINKAGE_GLOBAL))
- return false;
+ return FALSE;
for (p = function->parameters; p != NULL; p = p->next)
{
if (! debug_write_type (info, fns, fhandle, p->type,
(struct debug_name *) NULL)
|| ! (*fns->function_parameter) (fhandle, p->name, p->kind, p->val))
- return false;
+ return FALSE;
}
for (b = function->blocks; b != NULL; b = b->next)
{
if (! debug_write_block (info, fns, fhandle, b))
- return false;
+ return FALSE;
}
return (*fns->end_function) (fhandle);
@@ -3018,7 +3019,7 @@ debug_write_function (info, fns, fhandle, name, linkage, function)
/* Write out information for a block. */
-static boolean
+static bfd_boolean
debug_write_block (info, fns, fhandle, block)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -3029,14 +3030,14 @@ debug_write_block (info, fns, fhandle, block)
struct debug_block *b;
if (! debug_write_linenos (info, fns, fhandle, block->start))
- return false;
+ return FALSE;
/* I can't see any point to writing out a block with no local
variables, so we don't bother, except for the top level block. */
if (block->locals != NULL || block->parent == NULL)
{
if (! (*fns->start_block) (fhandle, block->start))
- return false;
+ return FALSE;
}
if (block->locals != NULL)
@@ -3044,31 +3045,31 @@ debug_write_block (info, fns, fhandle, block)
for (n = block->locals->list; n != NULL; n = n->next)
{
if (! debug_write_name (info, fns, fhandle, n))
- return false;
+ return FALSE;
}
}
for (b = block->children; b != NULL; b = b->next)
{
if (! debug_write_block (info, fns, fhandle, b))
- return false;
+ return FALSE;
}
if (! debug_write_linenos (info, fns, fhandle, block->end))
- return false;
+ return FALSE;
if (block->locals != NULL || block->parent == NULL)
{
if (! (*fns->end_block) (fhandle, block->end))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out line number information up to ADDRESS. */
-static boolean
+static bfd_boolean
debug_write_linenos (info, fns, fhandle, address)
struct debug_handle *info;
const struct debug_write_fns *fns;
@@ -3088,12 +3089,12 @@ debug_write_linenos (info, fns, fhandle, address)
break;
if (l->addrs[info->current_write_lineno_index] >= address)
- return true;
+ return TRUE;
if (! (*fns->lineno) (fhandle, l->file->filename,
l->linenos[info->current_write_lineno_index],
l->addrs[info->current_write_lineno_index]))
- return false;
+ return FALSE;
++info->current_write_lineno_index;
}
@@ -3102,7 +3103,7 @@ debug_write_linenos (info, fns, fhandle, address)
info->current_write_lineno_index = 0;
}
- return true;
+ return TRUE;
}
/* Get the ID number for a class. If during the same call to
@@ -3110,7 +3111,7 @@ debug_write_linenos (info, fns, fhandle, address)
name, we use the same ID. This type of things happens because the
same struct will be defined by multiple compilation units. */
-static boolean
+static bfd_boolean
debug_set_class_id (info, tag, type)
struct debug_handle *info;
const char *tag;
@@ -3127,7 +3128,7 @@ debug_set_class_id (info, tag, type)
c = type->u.kclass;
if (c->id > info->base_id)
- return true;
+ return TRUE;
for (l = info->id_list; l != NULL; l = l->next)
{
@@ -3150,7 +3151,7 @@ debug_set_class_id (info, tag, type)
if (debug_type_samep (info, l->type, type))
{
c->id = l->type->u.kclass->id;
- return true;
+ return TRUE;
}
}
@@ -3168,13 +3169,13 @@ debug_set_class_id (info, tag, type)
l->next = info->id_list;
info->id_list = l;
- return true;
+ return TRUE;
}
/* See if two types are the same. At this point, we don't care about
tags and the like. */
-static boolean
+static bfd_boolean
debug_type_samep (info, t1, t2)
struct debug_handle *info;
struct debug_type *t1;
@@ -3182,28 +3183,28 @@ debug_type_samep (info, t1, t2)
{
struct debug_type_compare_list *l;
struct debug_type_compare_list top;
- boolean ret;
+ bfd_boolean ret;
if (t1 == NULL)
return t2 == NULL;
if (t2 == NULL)
- return false;
+ return FALSE;
while (t1->kind == DEBUG_KIND_INDIRECT)
{
t1 = *t1->u.kindirect->slot;
if (t1 == NULL)
- return false;
+ return FALSE;
}
while (t2->kind == DEBUG_KIND_INDIRECT)
{
t2 = *t2->u.kindirect->slot;
if (t2 == NULL)
- return false;
+ return FALSE;
}
if (t1 == t2)
- return true;
+ return TRUE;
/* As a special case, permit a typedef to match a tag, since C++
debugging output will sometimes add a typedef where C debugging
@@ -3217,7 +3218,7 @@ debug_type_samep (info, t1, t2)
if (t1->kind != t2->kind
|| t1->size != t2->size)
- return false;
+ return FALSE;
/* Get rid of the trivial cases first. */
switch (t1->kind)
@@ -3228,7 +3229,7 @@ debug_type_samep (info, t1, t2)
case DEBUG_KIND_FLOAT:
case DEBUG_KIND_COMPLEX:
case DEBUG_KIND_BOOL:
- return true;
+ return TRUE;
case DEBUG_KIND_INT:
return t1->u.kint == t2->u.kint;
}
@@ -3240,7 +3241,7 @@ debug_type_samep (info, t1, t2)
for (l = info->compare_list; l != NULL; l = l->next)
{
if (l->t1 == t1 && l->t2 == t2)
- return true;
+ return TRUE;
}
top.t1 = t1;
@@ -3252,7 +3253,7 @@ debug_type_samep (info, t1, t2)
{
default:
abort ();
- ret = false;
+ ret = FALSE;
break;
case DEBUG_KIND_STRUCT:
@@ -3262,10 +3263,10 @@ debug_type_samep (info, t1, t2)
if (t1->u.kclass == NULL)
ret = t2->u.kclass == NULL;
else if (t2->u.kclass == NULL)
- ret = false;
+ ret = FALSE;
else if (t1->u.kclass->id > info->base_id
&& t1->u.kclass->id == t2->u.kclass->id)
- ret = true;
+ ret = TRUE;
else
ret = debug_class_type_samep (info, t1, t2);
break;
@@ -3274,7 +3275,7 @@ debug_type_samep (info, t1, t2)
if (t1->u.kenum == NULL)
ret = t2->u.kenum == NULL;
else if (t2->u.kenum == NULL)
- ret = false;
+ ret = FALSE;
else
{
const char **pn1, **pn2;
@@ -3309,9 +3310,9 @@ debug_type_samep (info, t1, t2)
t2->u.kfunction->return_type)
|| ((t1->u.kfunction->arg_types == NULL)
!= (t2->u.kfunction->arg_types == NULL)))
- ret = false;
+ ret = FALSE;
else if (t1->u.kfunction->arg_types == NULL)
- ret = true;
+ ret = TRUE;
else
{
struct debug_type **a1, **a2;
@@ -3367,9 +3368,9 @@ debug_type_samep (info, t1, t2)
t2->u.kmethod->domain_type)
|| ((t1->u.kmethod->arg_types == NULL)
!= (t2->u.kmethod->arg_types == NULL)))
- ret = false;
+ ret = FALSE;
else if (t1->u.kmethod->arg_types == NULL)
- ret = true;
+ ret = TRUE;
else
{
struct debug_type **a1, **a2;
@@ -3411,7 +3412,7 @@ debug_type_samep (info, t1, t2)
/* See if two classes are the same. This is a subroutine of
debug_type_samep. */
-static boolean
+static bfd_boolean
debug_class_type_samep (info, t1, t2)
struct debug_handle *info;
struct debug_type *t1;
@@ -3426,7 +3427,7 @@ debug_class_type_samep (info, t1, t2)
|| (c1->baseclasses == NULL) != (c2->baseclasses == NULL)
|| (c1->methods == NULL) != (c2->methods == NULL)
|| (c1->vptrbase == NULL) != (c2->vptrbase == NULL))
- return false;
+ return FALSE;
if (c1->fields != NULL)
{
@@ -3443,17 +3444,17 @@ debug_class_type_samep (info, t1, t2)
if (f1->name[0] != f2->name[0]
|| f1->visibility != f2->visibility
|| f1->static_member != f2->static_member)
- return false;
+ return FALSE;
if (f1->static_member)
{
if (strcmp (f1->u.s.physname, f2->u.s.physname) != 0)
- return false;
+ return FALSE;
}
else
{
if (f1->u.f.bitpos != f2->u.f.bitpos
|| f1->u.f.bitsize != f2->u.f.bitsize)
- return false;
+ return FALSE;
}
/* We do the checks which require function calls last. We
don't require that the types of fields have the same
@@ -3465,16 +3466,16 @@ debug_class_type_samep (info, t1, t2)
f1->type, NULL),
debug_get_real_type ((PTR) info,
f2->type, NULL)))
- return false;
+ return FALSE;
}
if (*pf1 != NULL || *pf2 != NULL)
- return false;
+ return FALSE;
}
if (c1->vptrbase != NULL)
{
if (! debug_type_samep (info, c1->vptrbase, c2->vptrbase))
- return false;
+ return FALSE;
}
if (c1->baseclasses != NULL)
@@ -3493,10 +3494,10 @@ debug_class_type_samep (info, t1, t2)
|| b1->virtual != b2->virtual
|| b1->visibility != b2->visibility
|| ! debug_type_samep (info, b1->type, b2->type))
- return false;
+ return FALSE;
}
if (*pb1 != NULL || *pb2 != NULL)
- return false;
+ return FALSE;
}
if (c1->methods != NULL)
@@ -3514,7 +3515,7 @@ debug_class_type_samep (info, t1, t2)
if (m1->name[0] != m2->name[0]
|| strcmp (m1->name, m2->name) != 0
|| (m1->variants == NULL) != (m2->variants == NULL))
- return false;
+ return FALSE;
if (m1->variants == NULL)
{
struct debug_method_variant **pv1, **pv2;
@@ -3535,21 +3536,21 @@ debug_class_type_samep (info, t1, t2)
|| (v1->context == NULL) != (v2->context == NULL)
|| strcmp (v1->physname, v2->physname) != 0
|| ! debug_type_samep (info, v1->type, v2->type))
- return false;
+ return FALSE;
if (v1->context != NULL)
{
if (! debug_type_samep (info, v1->context,
v2->context))
- return false;
+ return FALSE;
}
}
if (*pv1 != NULL || *pv2 != NULL)
- return false;
+ return FALSE;
}
}
if (*pm1 != NULL || *pm2 != NULL)
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
diff --git a/binutils/debug.h b/binutils/debug.h
index c439be3..d53210e 100644
--- a/binutils/debug.h
+++ b/binutils/debug.h
@@ -1,5 +1,5 @@
/* debug.h -- Describe generic debugging information.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -169,126 +169,126 @@ struct debug_write_fns
{
/* This is called at the start of each new compilation unit with the
name of the main file in the new unit. */
- boolean (*start_compilation_unit) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_compilation_unit) PARAMS ((PTR, const char *));
/* This is called at the start of each source file within a
compilation unit, before outputting any global information for
that file. The argument is the name of the file. */
- boolean (*start_source) PARAMS ((PTR, const char *));
+ bfd_boolean (*start_source) PARAMS ((PTR, const char *));
/* Each writer must keep a stack of types. */
/* Push an empty type onto the type stack. This type can appear if
there is a reference to a type which is never defined. */
- boolean (*empty_type) PARAMS ((PTR));
+ bfd_boolean (*empty_type) PARAMS ((PTR));
/* Push a void type onto the type stack. */
- boolean (*void_type) PARAMS ((PTR));
+ bfd_boolean (*void_type) PARAMS ((PTR));
/* Push an integer type onto the type stack, given the size and
whether it is unsigned. */
- boolean (*int_type) PARAMS ((PTR, unsigned int, boolean));
+ bfd_boolean (*int_type) PARAMS ((PTR, unsigned int, bfd_boolean));
/* Push a floating type onto the type stack, given the size. */
- boolean (*float_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*float_type) PARAMS ((PTR, unsigned int));
/* Push a complex type onto the type stack, given the size. */
- boolean (*complex_type) PARAMS ((PTR, unsigned int));
+ bfd_boolean (*complex_type) PARAMS ((PTR, unsigned int));
- /* Push a boolean type onto the type stack, given the size. */
- boolean (*bool_type) PARAMS ((PTR, unsigned int));
+ /* Push a bfd_boolean type onto the type stack, given the size. */
+ bfd_boolean (*bool_type) PARAMS ((PTR, unsigned int));
/* Push an enum type onto the type stack, given the tag, a NULL
terminated array of names and the associated values. If there is
no tag, the tag argument will be NULL. If this is an undefined
enum, the names and values arguments will be NULL. */
- boolean (*enum_type) PARAMS ((PTR, const char *, const char **,
- bfd_signed_vma *));
+ bfd_boolean (*enum_type)
+ PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
/* Pop the top type on the type stack, and push a pointer to that
type onto the type stack. */
- boolean (*pointer_type) PARAMS ((PTR));
+ bfd_boolean (*pointer_type) PARAMS ((PTR));
/* Push a function type onto the type stack. The second argument
indicates the number of argument types that have been pushed onto
the stack. If the number of argument types is passed as -1, then
the argument types of the function are unknown, and no types have
- been pushed onto the stack. The third argument is true if the
+ been pushed onto the stack. The third argument is TRUE if the
function takes a variable number of arguments. The return type
of the function is pushed onto the type stack below the argument
types, if any. */
- boolean (*function_type) PARAMS ((PTR, int, boolean));
+ bfd_boolean (*function_type) PARAMS ((PTR, int, bfd_boolean));
/* Pop the top type on the type stack, and push a reference to that
type onto the type stack. */
- boolean (*reference_type) PARAMS ((PTR));
+ bfd_boolean (*reference_type) PARAMS ((PTR));
/* Pop the top type on the type stack, and push a range of that type
with the given lower and upper bounds onto the type stack. */
- boolean (*range_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+ bfd_boolean (*range_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
/* Push an array type onto the type stack. The top type on the type
stack is the range, and the next type on the type stack is the
element type. These should be popped before the array type is
pushed. The arguments are the lower bound, the upper bound, and
whether the array is a string. */
- boolean (*array_type) PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma,
- boolean));
+ bfd_boolean (*array_type)
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
/* Pop the top type on the type stack, and push a set of that type
onto the type stack. The argument indicates whether this set is
a bitstring. */
- boolean (*set_type) PARAMS ((PTR, boolean));
+ bfd_boolean (*set_type) PARAMS ((PTR, bfd_boolean));
/* Push an offset type onto the type stack. The top type on the
type stack is the target type, and the next type on the type
stack is the base type. These should be popped before the offset
type is pushed. */
- boolean (*offset_type) PARAMS ((PTR));
+ bfd_boolean (*offset_type) PARAMS ((PTR));
/* Push a method type onto the type stack. If the second argument
- is true, the top type on the stack is the class to which the
+ is TRUE, the top type on the stack is the class to which the
method belongs; otherwise, the class must be determined by the
class to which the method is attached. The third argument is the
number of argument types; these are pushed onto the type stack in
reverse order (the first type popped is the last argument to the
method). A value of -1 for the third argument means that no
- argument information is available. The fourth argument is true
+ argument information is available. The fourth argument is TRUE
if the function takes a variable number of arguments. The next
type on the type stack below the domain and the argument types is
the return type of the method. All these types must be popped,
and then the method type must be pushed. */
- boolean (*method_type) PARAMS ((PTR, boolean, int, boolean));
+ bfd_boolean (*method_type) PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
/* Pop the top type off the type stack, and push a const qualified
version of that type onto the type stack. */
- boolean (*const_type) PARAMS ((PTR));
+ bfd_boolean (*const_type) PARAMS ((PTR));
/* Pop the top type off the type stack, and push a volatile
qualified version of that type onto the type stack. */
- boolean (*volatile_type) PARAMS ((PTR));
+ bfd_boolean (*volatile_type) PARAMS ((PTR));
/* Start building a struct. This is followed by calls to the
struct_field function, and finished by a call to the
end_struct_type function. The second argument is the tag; this
will be NULL if there isn't one. If the second argument is NULL,
the third argument is a constant identifying this struct for use
- with tag_type. The fourth argument is true for a struct, false
+ with tag_type. The fourth argument is TRUE for a struct, FALSE
for a union. The fifth argument is the size. If this is an
undefined struct or union, the size will be 0 and struct_field
will not be called before end_struct_type is called. */
- boolean (*start_struct_type) PARAMS ((PTR, const char *, unsigned int,
- boolean, unsigned int));
+ bfd_boolean (*start_struct_type)
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
/* Add a field to the struct type currently being built. The type
of the field should be popped off the type stack. The arguments
are the name, the bit position, the bit size (may be zero if the
field is not packed), and the visibility. */
- boolean (*struct_field) PARAMS ((PTR, const char *, bfd_vma, bfd_vma,
- enum debug_visibility));
+ bfd_boolean (*struct_field)
+ PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
/* Finish building a struct, and push it onto the type stack. */
- boolean (*end_struct_type) PARAMS ((PTR));
+ bfd_boolean (*end_struct_type) PARAMS ((PTR));
/* Start building a class. This is followed by calls to several
functions: struct_field, class_static_member, class_baseclass,
@@ -296,27 +296,27 @@ struct debug_write_fns
class_static_method_variant, and class_end_method. The class is
finished by a call to end_class_type. The first five arguments
are the same as for start_struct_type. The sixth argument is
- true if there is a virtual function table; if there is, the
- seventh argument is true if the virtual function table can be
- found in the type itself, and is false if the type of the object
+ TRUE if there is a virtual function table; if there is, the
+ seventh argument is TRUE if the virtual function table can be
+ found in the type itself, and is FALSE if the type of the object
holding the virtual function table should be popped from the type
stack. */
- boolean (*start_class_type) PARAMS ((PTR, const char *, unsigned int,
- boolean, unsigned int, boolean,
- boolean));
+ bfd_boolean (*start_class_type)
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean));
/* Add a static member to the class currently being built. The
arguments are the field name, the physical name, and the
visibility. The type must be popped off the type stack. */
- boolean (*class_static_member) PARAMS ((PTR, const char *, const char *,
- enum debug_visibility));
+ bfd_boolean (*class_static_member)
+ PARAMS ((PTR, const char *, const char *, enum debug_visibility));
/* Add a baseclass to the class currently being built. The type of
the baseclass must be popped off the type stack. The arguments
are the bit position, whether the class is virtual, and the
visibility. */
- boolean (*class_baseclass) PARAMS ((PTR, bfd_vma, boolean,
- enum debug_visibility));
+ bfd_boolean (*class_baseclass)
+ PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
/* Start adding a method to the class currently being built. This
is followed by calls to class_method_variant and
@@ -324,7 +324,7 @@ struct debug_write_fns
method which take different arguments. The method is finished
with a call to class_end_method. The argument is the method
name. */
- boolean (*class_start_method) PARAMS ((PTR, const char *));
+ bfd_boolean (*class_start_method) PARAMS ((PTR, const char *));
/* Describe a variant to the class method currently being built.
The type of the variant must be popped off the type stack. The
@@ -333,28 +333,27 @@ struct debug_write_fns
const, whether the variant is volatile, the offset in the virtual
function table, and whether the context is on the type stack
(below the variant type). */
- boolean (*class_method_variant) PARAMS ((PTR, const char *,
- enum debug_visibility,
- boolean, boolean,
- bfd_vma, boolean));
+ bfd_boolean (*class_method_variant)
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, bfd_boolean));
/* Describe a static variant to the class method currently being
built. The arguments are the same as for class_method_variant,
except that the last two arguments are omitted. The type of the
variant must be popped off the type stack. */
- boolean (*class_static_method_variant) PARAMS ((PTR, const char *,
- enum debug_visibility,
- boolean, boolean));
+ bfd_boolean (*class_static_method_variant)
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean));
/* Finish describing a class method. */
- boolean (*class_end_method) PARAMS ((PTR));
+ bfd_boolean (*class_end_method) PARAMS ((PTR));
/* Finish describing a class, and push it onto the type stack. */
- boolean (*end_class_type) PARAMS ((PTR));
+ bfd_boolean (*end_class_type) PARAMS ((PTR));
/* Push a type on the stack which was given a name by an earlier
call to typdef. */
- boolean (*typedef_type) PARAMS ((PTR, const char *));
+ bfd_boolean (*typedef_type) PARAMS ((PTR, const char *));
/* Push a tagged type on the stack which was defined earlier. If
the second argument is not NULL, the type was defined by a call
@@ -365,58 +364,58 @@ struct debug_write_fns
for a struct (class) being defined, in between the call to
start_struct_type (start_class_type) and the call to
end_struct_type (end_class_type). */
- boolean (*tag_type) PARAMS ((PTR, const char *, unsigned int,
- enum debug_type_kind));
+ bfd_boolean (*tag_type)
+ PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
/* Pop the type stack, and typedef it to the given name. */
- boolean (*typdef) PARAMS ((PTR, const char *));
+ bfd_boolean (*typdef) PARAMS ((PTR, const char *));
/* Pop the type stack, and declare it as a tagged struct or union or
enum or whatever. The tag passed down here is redundant, since
was also passed when enum_type, start_struct_type, or
start_class_type was called. */
- boolean (*tag) PARAMS ((PTR, const char *));
+ bfd_boolean (*tag) PARAMS ((PTR, const char *));
/* This is called to record a named integer constant. */
- boolean (*int_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*int_constant) PARAMS ((PTR, const char *, bfd_vma));
/* This is called to record a named floating point constant. */
- boolean (*float_constant) PARAMS ((PTR, const char *, double));
+ bfd_boolean (*float_constant) PARAMS ((PTR, const char *, double));
/* This is called to record a typed integer constant. The type is
popped off the type stack. */
- boolean (*typed_constant) PARAMS ((PTR, const char *, bfd_vma));
+ bfd_boolean (*typed_constant) PARAMS ((PTR, const char *, bfd_vma));
/* This is called to record a variable. The type is popped off the
type stack. */
- boolean (*variable) PARAMS ((PTR, const char *, enum debug_var_kind,
- bfd_vma));
+ bfd_boolean (*variable)
+ PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
/* Start writing out a function. The return type must be popped off
- the stack. The boolean is true if the function is global. This
+ the stack. The bfd_boolean is TRUE if the function is global. This
is followed by calls to function_parameter, followed by block
information. */
- boolean (*start_function) PARAMS ((PTR, const char *, boolean));
+ bfd_boolean (*start_function) PARAMS ((PTR, const char *, bfd_boolean));
/* Record a function parameter for the current function. The type
must be popped off the stack. */
- boolean (*function_parameter) PARAMS ((PTR, const char *,
- enum debug_parm_kind, bfd_vma));
+ bfd_boolean (*function_parameter)
+ PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
/* Start writing out a block. There is at least one top level block
per function. Blocks may be nested. The argument is the
starting address of the block. */
- boolean (*start_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*start_block) PARAMS ((PTR, bfd_vma));
/* Finish writing out a block. The argument is the ending address
of the block. */
- boolean (*end_block) PARAMS ((PTR, bfd_vma));
+ bfd_boolean (*end_block) PARAMS ((PTR, bfd_vma));
/* Finish writing out a function. */
- boolean (*end_function) PARAMS ((PTR));
+ bfd_boolean (*end_function) PARAMS ((PTR));
/* Record line number information for the current compilation unit. */
- boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+ bfd_boolean (*lineno) PARAMS ((PTR, const char *, unsigned long, bfd_vma));
};
/* Exported functions. */
@@ -434,81 +433,83 @@ extern PTR debug_init PARAMS ((void));
/* Set the source filename. This implicitly starts a new compilation
unit. */
-extern boolean debug_set_filename PARAMS ((PTR, const char *));
+extern bfd_boolean debug_set_filename PARAMS ((PTR, const char *));
/* Change source files to the given file name. This is used for
include files in a single compilation unit. */
-extern boolean debug_start_source PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_source PARAMS ((PTR, const char *));
/* Record a function definition. This implicitly starts a function
block. The debug_type argument is the type of the return value.
- The boolean indicates whether the function is globally visible.
+ The bfd_boolean indicates whether the function is globally visible.
The bfd_vma is the address of the start of the function. Currently
the parameter types are specified by calls to
debug_record_parameter. */
-extern boolean debug_record_function
- PARAMS ((PTR, const char *, debug_type, boolean, bfd_vma));
+extern bfd_boolean debug_record_function
+ PARAMS ((PTR, const char *, debug_type, bfd_boolean, bfd_vma));
/* Record a parameter for the current function. */
-extern boolean debug_record_parameter
+extern bfd_boolean debug_record_parameter
PARAMS ((PTR, const char *, debug_type, enum debug_parm_kind, bfd_vma));
/* End a function definition. The argument is the address where the
function ends. */
-extern boolean debug_end_function PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_function PARAMS ((PTR, bfd_vma));
/* Start a block in a function. All local information will be
recorded in this block, until the matching call to debug_end_block.
debug_start_block and debug_end_block may be nested. The argument
is the address at which this block starts. */
-extern boolean debug_start_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_start_block PARAMS ((PTR, bfd_vma));
/* Finish a block in a function. This matches the call to
debug_start_block. The argument is the address at which this block
ends. */
-extern boolean debug_end_block PARAMS ((PTR, bfd_vma));
+extern bfd_boolean debug_end_block PARAMS ((PTR, bfd_vma));
/* Associate a line number in the current source file with a given
address. */
-extern boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));
+extern bfd_boolean debug_record_line PARAMS ((PTR, unsigned long, bfd_vma));
/* Start a named common block. This is a block of variables that may
move in memory. */
-extern boolean debug_start_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_start_common_block PARAMS ((PTR, const char *));
/* End a named common block. */
-extern boolean debug_end_common_block PARAMS ((PTR, const char *));
+extern bfd_boolean debug_end_common_block PARAMS ((PTR, const char *));
/* Record a named integer constant. */
-extern boolean debug_record_int_const PARAMS ((PTR, const char *, bfd_vma));
+extern bfd_boolean debug_record_int_const
+ PARAMS ((PTR, const char *, bfd_vma));
/* Record a named floating point constant. */
-extern boolean debug_record_float_const PARAMS ((PTR, const char *, double));
+extern bfd_boolean debug_record_float_const
+ PARAMS ((PTR, const char *, double));
/* Record a typed constant with an integral value. */
-extern boolean debug_record_typed_const
+extern bfd_boolean debug_record_typed_const
PARAMS ((PTR, const char *, debug_type, bfd_vma));
/* Record a label. */
-extern boolean debug_record_label
+extern bfd_boolean debug_record_label
PARAMS ((PTR, const char *, debug_type, bfd_vma));
/* Record a variable. */
-extern boolean debug_record_variable
+extern bfd_boolean debug_record_variable
PARAMS ((PTR, const char *, debug_type, enum debug_var_kind, bfd_vma));
/* Make an indirect type. The first argument is a pointer to the
@@ -525,10 +526,11 @@ extern debug_type debug_make_indirect_type
extern debug_type debug_make_void_type PARAMS ((PTR));
-/* Make an integer type of a given size. The boolean argument is true
+/* Make an integer type of a given size. The bfd_boolean argument is TRUE
if the integer is unsigned. */
-extern debug_type debug_make_int_type PARAMS ((PTR, unsigned int, boolean));
+extern debug_type debug_make_int_type
+ PARAMS ((PTR, unsigned int, bfd_boolean));
/* Make a floating point type of a given size. FIXME: On some
platforms, like an Alpha, you probably need to be able to specify
@@ -544,23 +546,23 @@ extern debug_type debug_make_bool_type PARAMS ((PTR, unsigned int));
extern debug_type debug_make_complex_type PARAMS ((PTR, unsigned int));
-/* Make a structure type. The second argument is true for a struct,
- false for a union. The third argument is the size of the struct.
+/* Make a structure type. The second argument is TRUE for a struct,
+ FALSE for a union. The third argument is the size of the struct.
The fourth argument is a NULL terminated array of fields. */
extern debug_type debug_make_struct_type
- PARAMS ((PTR, boolean, bfd_vma, debug_field *));
+ PARAMS ((PTR, bfd_boolean, bfd_vma, debug_field *));
/* Make an object type. The first three arguments after the handle
are the same as for debug_make_struct_type. The next arguments are
a NULL terminated array of base classes, a NULL terminated array of
methods, the type of the object holding the virtual function table
- if it is not this object, and a boolean which is true if this
+ if it is not this object, and a bfd_boolean which is TRUE if this
object has its own virtual function table. */
extern debug_type debug_make_object_type
- PARAMS ((PTR, boolean, bfd_vma, debug_field *, debug_baseclass *,
- debug_method *, debug_type, boolean));
+ PARAMS ((PTR, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
+ debug_method *, debug_type, bfd_boolean));
/* Make an enumeration type. The arguments are a null terminated
array of strings, and an array of corresponding values. */
@@ -575,12 +577,12 @@ extern debug_type debug_make_pointer_type
/* Make a function type. The second argument is the return type. The
third argument is a NULL terminated array of argument types. The
- fourth argument is true if the function takes a variable number of
+ fourth argument is TRUE if the function takes a variable number of
arguments. If the third argument is NULL, then the argument types
are unknown. */
extern debug_type debug_make_function_type
- PARAMS ((PTR, debug_type, debug_type *, boolean));
+ PARAMS ((PTR, debug_type, debug_type *, bfd_boolean));
/* Make a reference to a given type. */
@@ -595,18 +597,18 @@ extern debug_type debug_make_range_type
of the array. The third argument is the type of a range of the
array. The fourth and fifth argument are the lower and upper
bounds, respectively (if the bounds are not known, lower should be
- 0 and upper should be -1). The sixth argument is true if this
+ 0 and upper should be -1). The sixth argument is TRUE if this
array is actually a string, as in C. */
extern debug_type debug_make_array_type
PARAMS ((PTR, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
- boolean));
+ bfd_boolean));
/* Make a set of a given type. For example, a Pascal set type. The
- boolean argument is true if this set is actually a bitstring, as in
+ bfd_boolean argument is TRUE if this set is actually a bitstring, as in
CHILL. */
-extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, boolean));
+extern debug_type debug_make_set_type PARAMS ((PTR, debug_type, bfd_boolean));
/* Make a type for a pointer which is relative to an object. The
second argument is the type of the object to which the pointer is
@@ -619,7 +621,7 @@ extern debug_type debug_make_offset_type
/* Make a type for a method function. The second argument is the
return type. The third argument is the domain. The fourth
argument is a NULL terminated array of argument types. The fifth
- argument is true if the function takes a variable number of
+ argument is TRUE if the function takes a variable number of
arguments, in which case the array of argument types indicates the
types of the first arguments. The domain and the argument array
may be NULL, in which case this is a stub method and that
@@ -627,7 +629,7 @@ extern debug_type debug_make_offset_type
the argument types from the mangled name. */
extern debug_type debug_make_method_type
- PARAMS ((PTR, debug_type, debug_type, debug_type *, boolean));
+ PARAMS ((PTR, debug_type, debug_type, debug_type *, bfd_boolean));
/* Make a const qualified version of a given type. */
@@ -650,7 +652,7 @@ extern debug_type debug_make_undefined_tagged_type
class. */
extern debug_baseclass debug_make_baseclass
- PARAMS ((PTR, debug_type, bfd_vma, boolean, enum debug_visibility));
+ PARAMS ((PTR, debug_type, bfd_vma, bfd_boolean, enum debug_visibility));
/* Make a field for a struct. The second argument is the name. The
third argument is the type of the field. The fourth argument is
@@ -690,16 +692,16 @@ extern debug_method debug_make_method
function context. */
extern debug_method_variant debug_make_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
- boolean, bfd_vma, debug_type));
+ PARAMS ((PTR, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_vma, debug_type));
/* Make a static method argument. The arguments are the same as for
debug_make_method_variant, except that the last two are omitted
since a static method can not also be virtual. */
extern debug_method_variant debug_make_static_method_variant
- PARAMS ((PTR, const char *, debug_type, enum debug_visibility, boolean,
- boolean));
+ PARAMS ((PTR, const char *, debug_type, enum debug_visibility, bfd_boolean,
+ bfd_boolean));
/* Name a type. This returns a new type with an attached name. */
@@ -712,7 +714,8 @@ extern debug_type debug_tag_type PARAMS ((PTR, const char *, debug_type));
/* Record the size of a given type. */
-extern boolean debug_record_type_size PARAMS ((PTR, debug_type, unsigned int));
+extern bfd_boolean debug_record_type_size
+ PARAMS ((PTR, debug_type, unsigned int));
/* Find a named type. */
@@ -743,12 +746,11 @@ extern debug_type debug_get_return_type PARAMS ((PTR, debug_type));
method type (actually, parameter types are not currently stored for
function types). This may be used to determine whether a method
type is a stub method or not. The last argument points to a
- boolean which is set to true if the function takes a variable
+ bfd_boolean which is set to TRUE if the function takes a variable
number of arguments. */
-extern const debug_type *debug_get_parameter_types PARAMS ((PTR,
- debug_type,
- boolean *));
+extern const debug_type *debug_get_parameter_types
+ PARAMS ((PTR, debug_type, bfd_boolean *));
/* Get the target type of a pointer or reference or const or volatile
type. */
@@ -793,6 +795,7 @@ extern const char *debug_get_field_physname PARAMS ((PTR, debug_field));
first PTR is the debugging handle. The second PTR is a handle
which is passed to the functions. */
-extern boolean debug_write PARAMS ((PTR, const struct debug_write_fns *, PTR));
+extern bfd_boolean debug_write
+ PARAMS ((PTR, const struct debug_write_fns *, PTR));
#endif /* DEBUG_H */
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 6e83cce..3fecf16 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -267,12 +267,16 @@
#endif
/* Forward references. */
-static char *look_for_prog PARAMS ((const char *, const char *, int));
-static char *deduce_name PARAMS ((const char *));
+static char *look_for_prog
+ PARAMS ((const char *, const char *, int));
+static char *deduce_name
+ PARAMS ((const char *));
#ifdef DLLTOOL_MCORE_ELF
-static void mcore_elf_cache_filename PARAMS ((char *));
-static void mcore_elf_gen_out_file PARAMS ((void));
+static void mcore_elf_cache_filename
+ PARAMS ((char *));
+static void mcore_elf_gen_out_file
+ PARAMS ((void));
#endif
#ifdef HAVE_SYS_WAIT_H
@@ -358,20 +362,20 @@ static int add_indirect = 0;
static int add_underscore = 0;
static int dontdeltemps = 0;
-/* True if we should export all symbols. Otherwise, we only export
+/* TRUE if we should export all symbols. Otherwise, we only export
symbols listed in .drectve sections or in the def file. */
-static boolean export_all_symbols;
+static bfd_boolean export_all_symbols;
-/* True if we should exclude the symbols in DEFAULT_EXCLUDES when
+/* TRUE if we should exclude the symbols in DEFAULT_EXCLUDES when
exporting all symbols. */
-static boolean do_default_excludes=true;
+static bfd_boolean do_default_excludes = TRUE;
/* Default symbols to exclude when exporting all the symbols. */
static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
-/* True if we should add __imp_<SYMBOL> to import libraries for backward
+/* TRUE if we should add __imp_<SYMBOL> to import libraries for backward
compatibility to old Cygwin releases. */
-static boolean create_compat_implib;
+static bfd_boolean create_compat_implib;
static char *def_file;
@@ -652,49 +656,90 @@ struct string_list
static struct string_list *excludes;
-static const char *rvaafter PARAMS ((int));
-static const char *rvabefore PARAMS ((int));
-static const char *asm_prefix PARAMS ((int));
-static void process_def_file PARAMS ((const char *));
-static void new_directive PARAMS ((char *));
-static void append_import PARAMS ((const char *, const char *, int));
-static void run PARAMS ((const char *, char *));
-static void scan_drectve_symbols PARAMS ((bfd *));
-static void scan_filtered_symbols PARAMS ((bfd *, PTR, long, unsigned int));
-static void add_excludes PARAMS ((const char *));
-static boolean match_exclude PARAMS ((const char *));
-static void set_default_excludes PARAMS ((void));
-static long filter_symbols PARAMS ((bfd *, PTR, long, unsigned int));
-static void scan_all_symbols PARAMS ((bfd *));
-static void scan_open_obj_file PARAMS ((bfd *));
-static void scan_obj_file PARAMS ((const char *));
-static void dump_def_info PARAMS ((FILE *));
-static int sfunc PARAMS ((const void *, const void *));
-static void flush_page PARAMS ((FILE *, long *, int, int));
-static void gen_def_file PARAMS ((void));
-static void generate_idata_ofile PARAMS ((FILE *));
-static void assemble_file PARAMS ((const char *, const char *));
-static void gen_exp_file PARAMS ((void));
-static const char *xlate PARAMS ((const char *));
+static const char *rvaafter
+ PARAMS ((int));
+static const char *rvabefore
+ PARAMS ((int));
+static const char *asm_prefix
+ PARAMS ((int));
+static void process_def_file
+ PARAMS ((const char *));
+static void new_directive
+ PARAMS ((char *));
+static void append_import
+ PARAMS ((const char *, const char *, int));
+static void run
+ PARAMS ((const char *, char *));
+static void scan_drectve_symbols
+ PARAMS ((bfd *));
+static void scan_filtered_symbols
+ PARAMS ((bfd *, PTR, long, unsigned int));
+static void add_excludes
+ PARAMS ((const char *));
+static bfd_boolean match_exclude
+ PARAMS ((const char *));
+static void set_default_excludes
+ PARAMS ((void));
+static long filter_symbols
+ PARAMS ((bfd *, PTR, long, unsigned int));
+static void scan_all_symbols
+ PARAMS ((bfd *));
+static void scan_open_obj_file
+ PARAMS ((bfd *));
+static void scan_obj_file
+ PARAMS ((const char *));
+static void dump_def_info
+ PARAMS ((FILE *));
+static int sfunc
+ PARAMS ((const void *, const void *));
+static void flush_page
+ PARAMS ((FILE *, long *, int, int));
+static void gen_def_file
+ PARAMS ((void));
+static void generate_idata_ofile
+ PARAMS ((FILE *));
+static void assemble_file
+ PARAMS ((const char *, const char *));
+static void gen_exp_file
+ PARAMS ((void));
+static const char *xlate
+ PARAMS ((const char *));
#if 0
-static void dump_iat PARAMS ((FILE *, export_type *));
+static void dump_iat
+ PARAMS ((FILE *, export_type *));
#endif
-static char *make_label PARAMS ((const char *, const char *));
-static char *make_imp_label PARAMS ((const char *, const char *));
-static bfd *make_one_lib_file PARAMS ((export_type *, int));
-static bfd *make_head PARAMS ((void));
-static bfd *make_tail PARAMS ((void));
-static void gen_lib_file PARAMS ((void));
-static int pfunc PARAMS ((const void *, const void *));
-static int nfunc PARAMS ((const void *, const void *));
-static void remove_null_names PARAMS ((export_type **));
-static void dtab PARAMS ((export_type **));
-static void process_duplicates PARAMS ((export_type **));
-static void fill_ordinals PARAMS ((export_type **));
-static int alphafunc PARAMS ((const void *, const void *));
-static void mangle_defs PARAMS ((void));
-static void usage PARAMS ((FILE *, int));
-static void inform PARAMS ((const char *, ...));
+static char *make_label
+ PARAMS ((const char *, const char *));
+static char *make_imp_label
+ PARAMS ((const char *, const char *));
+static bfd *make_one_lib_file
+ PARAMS ((export_type *, int));
+static bfd *make_head
+ PARAMS ((void));
+static bfd *make_tail
+ PARAMS ((void));
+static void gen_lib_file
+ PARAMS ((void));
+static int pfunc
+ PARAMS ((const void *, const void *));
+static int nfunc
+ PARAMS ((const void *, const void *));
+static void remove_null_names
+ PARAMS ((export_type **));
+static void dtab
+ PARAMS ((export_type **));
+static void process_duplicates
+ PARAMS ((export_type **));
+static void fill_ordinals
+ PARAMS ((export_type **));
+static int alphafunc
+ PARAMS ((const void *, const void *));
+static void mangle_defs
+ PARAMS ((void));
+static void usage
+ PARAMS ((FILE *, int));
+static void inform
+ PARAMS ((const char *, ...));
static void
@@ -1252,7 +1297,7 @@ scan_drectve_symbols (abfd)
if (add_stdcall_alias && strchr (c, '@'))
{
- int lead_at = (*c == '@') ;
+ int lead_at = (*c == '@') ;
char *exported_name = xstrdup (c + lead_at);
char *atsym = strchr (exported_name, '@');
*atsym = '\0';
@@ -1290,7 +1335,7 @@ scan_filtered_symbols (abfd, minisyms, symcount, size)
asymbol *sym;
const char *symbol_name;
- sym = bfd_minisymbol_to_symbol (abfd, false, from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, FALSE, from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1349,7 +1394,7 @@ add_excludes (new_excludes)
/* See if STRING is on the list of symbols to exclude. */
-static boolean
+static bfd_boolean
match_exclude (string)
const char *string;
{
@@ -1357,8 +1402,8 @@ match_exclude (string)
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
if (strcmp (string, excl_item->string) == 0)
- return true;
- return false;
+ return TRUE;
+ return FALSE;
}
/* Add the default list of symbols to exclude. */
@@ -1394,7 +1439,7 @@ filter_symbols (abfd, minisyms, symcount, size)
int keep = 0;
asymbol *sym;
- sym = bfd_minisymbol_to_symbol (abfd, false, (const PTR) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, FALSE, (const PTR) from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1440,7 +1485,7 @@ scan_all_symbols (abfd)
return;
}
- symcount = bfd_read_minisymbols (abfd, false, &minisyms, &size);
+ symcount = bfd_read_minisymbols (abfd, FALSE, &minisyms, &size);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -2532,14 +2577,14 @@ make_one_lib_file (exp, i)
case PDATA:
{
/* The .pdata section is 5 words long.
- Think of it as:
- struct
- {
- bfd_vma BeginAddress, [0x00]
- EndAddress, [0x04]
- ExceptionHandler, [0x08]
- HandlerData, [0x0c]
- PrologEndAddress; [0x10]
+ Think of it as:
+ struct
+ {
+ bfd_vma BeginAddress, [0x00]
+ EndAddress, [0x04]
+ ExceptionHandler, [0x08]
+ HandlerData, [0x0c]
+ PrologEndAddress; [0x10]
}; */
/* So this pdata section setups up this as a glue linkage to
@@ -3255,16 +3300,16 @@ main (ac, av)
switch (c)
{
case OPTION_EXPORT_ALL_SYMS:
- export_all_symbols = true;
+ export_all_symbols = TRUE;
break;
case OPTION_NO_EXPORT_ALL_SYMS:
- export_all_symbols = false;
+ export_all_symbols = FALSE;
break;
case OPTION_EXCLUDE_SYMS:
add_excludes (optarg);
break;
case OPTION_NO_DEFAULT_EXCLUDES:
- do_default_excludes = false;
+ do_default_excludes = FALSE;
break;
case 'x':
no_idata4 = 1;
@@ -3378,7 +3423,7 @@ main (ac, av)
symbols in the .drectve section. The default excludes are meant
to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
if (! export_all_symbols)
- do_default_excludes = false;
+ do_default_excludes = FALSE;
if (do_default_excludes)
set_default_excludes ();
diff --git a/binutils/emul_aix.c b/binutils/emul_aix.c
index 4caf652..60534f7 100644
--- a/binutils/emul_aix.c
+++ b/binutils/emul_aix.c
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright 2002 Free Software Foundation, Inc.
Written by Tom Rix, Redhat.
This file is part of GNU Binutils.
@@ -26,22 +26,28 @@
#include "libxcoff.h"
/* Default to <bigaf>. */
-static boolean big_archive = true;
+static bfd_boolean big_archive = TRUE;
/* Whether to include 32 bit objects. */
-static boolean X32 = true;
+static bfd_boolean X32 = TRUE;
/* Whether to include 64 bit objects. */
-static boolean X64 = false;
-
-static void ar_emul_aix_usage PARAMS ((FILE *));
-static boolean ar_emul_aix_append PARAMS ((bfd **, char *, boolean));
-static boolean ar_emul_aix5_append PARAMS ((bfd **, char *, boolean));
-static boolean ar_emul_aix_replace PARAMS ((bfd **, char *, boolean));
-static boolean ar_emul_aix5_replace PARAMS ((bfd **, char *, boolean));
-static boolean ar_emul_aix_parse_arg PARAMS ((char *));
-static boolean ar_emul_aix_internal PARAMS ((bfd **, char *, boolean,
- const char *, boolean));
+static bfd_boolean X64 = FALSE;
+
+static void ar_emul_aix_usage
+ PARAMS ((FILE *));
+static bfd_boolean ar_emul_aix_append
+ PARAMS ((bfd **, char *, bfd_boolean));
+static bfd_boolean ar_emul_aix5_append
+ PARAMS ((bfd **, char *, bfd_boolean));
+static bfd_boolean ar_emul_aix_replace
+ PARAMS ((bfd **, char *, bfd_boolean));
+static bfd_boolean ar_emul_aix5_replace
+ PARAMS ((bfd **, char *, bfd_boolean));
+static bfd_boolean ar_emul_aix_parse_arg
+ PARAMS ((char *));
+static bfd_boolean ar_emul_aix_internal
+ PARAMS ((bfd **, char *, bfd_boolean, const char *, bfd_boolean));
static void
ar_emul_aix_usage (fp)
@@ -55,13 +61,13 @@ ar_emul_aix_usage (fp)
fprintf (fp, _(" [-X32_64] - accepts 32 and 64 bit objects\n"));
}
-static boolean
+static bfd_boolean
ar_emul_aix_internal (after_bfd, file_name, verbose, target_name, is_append)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
const char * target_name;
- boolean is_append;
+ bfd_boolean is_append;
{
bfd *temp;
bfd *try_bfd;
@@ -78,11 +84,11 @@ ar_emul_aix_internal (after_bfd, file_name, verbose, target_name, is_append)
AR_EMUL_ELEMENT_CHECK (try_bfd, file_name);
if (bfd_xcoff_is_xcoff64 (try_bfd) && (! X64))
- return false;
+ return FALSE;
if (bfd_xcoff_is_xcoff32 (try_bfd)
&& bfd_check_format (try_bfd, bfd_object) && (! X32))
- return false;
+ return FALSE;
if (is_append)
{
@@ -96,51 +102,51 @@ ar_emul_aix_internal (after_bfd, file_name, verbose, target_name, is_append)
*after_bfd = try_bfd;
(*after_bfd)->next = temp;
- return true;
+ return TRUE;
}
-static boolean
+static bfd_boolean
ar_emul_aix_append (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
- "aixcoff64-rs6000", true);
+ "aixcoff64-rs6000", TRUE);
}
-static boolean
+static bfd_boolean
ar_emul_aix5_append (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
- "aix5coff64-rs6000", true);
+ "aix5coff64-rs6000", TRUE);
}
-static boolean
+static bfd_boolean
ar_emul_aix_replace (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
- "aixcoff64-rs6000", false);
+ "aixcoff64-rs6000", FALSE);
}
-static boolean
+static bfd_boolean
ar_emul_aix5_replace (after_bfd, file_name, verbose)
bfd **after_bfd;
char *file_name;
- boolean verbose;
+ bfd_boolean verbose;
{
return ar_emul_aix_internal (after_bfd, file_name, verbose,
- "aix5coff64-rs6000", false);
+ "aix5coff64-rs6000", FALSE);
}
-boolean
+bfd_boolean
ar_emul_aix_create (abfd_out, archive_file_name, file_name)
bfd **abfd_out;
char *archive_file_name;
@@ -156,41 +162,41 @@ ar_emul_aix_create (abfd_out, archive_file_name, file_name)
/* set to small or big format. */
/* not done. */
- return true;
+ return TRUE;
}
-static boolean
+static bfd_boolean
ar_emul_aix_parse_arg (arg)
char *arg;
{
if (strncmp (arg, "-X32_64", 6) == 0)
{
- big_archive = true;
- X32 = true;
- X64 = true;
+ big_archive = TRUE;
+ X32 = TRUE;
+ X64 = TRUE;
}
else if (strncmp (arg, "-X32", 3) == 0)
{
- big_archive = true;
- X32 = true;
- X64 = false;
+ big_archive = TRUE;
+ X32 = TRUE;
+ X64 = FALSE;
}
else if (strncmp (arg, "-X64", 3) == 0)
{
- big_archive = true;
- X32 = false;
- X64 = true;
+ big_archive = TRUE;
+ X32 = FALSE;
+ X64 = TRUE;
}
else if (strncmp (arg, "-g", 2) == 0)
{
- big_archive = false;
- X32 = true;
- X64 = false;
+ big_archive = FALSE;
+ X32 = TRUE;
+ X64 = FALSE;
}
else
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
struct bin_emulation_xfer_struct bin_aix_emulation =
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 4735fb3..c9340cb 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -42,8 +42,8 @@ struct ieee_block
const char *filename;
/* The index of the function type, for a BB4 or BB6 block. */
unsigned int fnindx;
- /* True if this function is being skipped. */
- boolean skip;
+ /* TRUE if this function is being skipped. */
+ bfd_boolean skip;
};
/* This structure is the block stack. */
@@ -156,7 +156,7 @@ struct ieee_info
/* The block stack. */
struct ieee_blockstack blockstack;
/* Whether we have seen a BB1 or BB2. */
- boolean saw_filename;
+ bfd_boolean saw_filename;
/* The variables. */
struct ieee_vars vars;
/* The global variables, after a global typedef block. */
@@ -251,44 +251,53 @@ enum builtin_types
static void ieee_error
PARAMS ((struct ieee_info *, const bfd_byte *, const char *));
-static void ieee_eof PARAMS ((struct ieee_info *));
-static char *savestring PARAMS ((const char *, unsigned long));
-static boolean ieee_read_number
+static void ieee_eof
+ PARAMS ((struct ieee_info *));
+static char *savestring
+ PARAMS ((const char *, unsigned long));
+static bfd_boolean ieee_read_number
PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
-static boolean ieee_read_optional_number
- PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *, boolean *));
-static boolean ieee_read_id
+static bfd_boolean ieee_read_optional_number
+ PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *, bfd_boolean *));
+static bfd_boolean ieee_read_id
PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
unsigned long *));
-static boolean ieee_read_optional_id
+static bfd_boolean ieee_read_optional_id
PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
- unsigned long *, boolean *));
-static boolean ieee_read_expression
+ unsigned long *, bfd_boolean *));
+static bfd_boolean ieee_read_expression
PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
static debug_type ieee_builtin_type
PARAMS ((struct ieee_info *, const bfd_byte *, unsigned int));
-static boolean ieee_alloc_type
- PARAMS ((struct ieee_info *, unsigned int, boolean));
-static boolean ieee_read_type_index
+static bfd_boolean ieee_alloc_type
+ PARAMS ((struct ieee_info *, unsigned int, bfd_boolean));
+static bfd_boolean ieee_read_type_index
PARAMS ((struct ieee_info *, const bfd_byte **, debug_type *));
-static int ieee_regno_to_genreg PARAMS ((bfd *, int));
-static int ieee_genreg_to_regno PARAMS ((bfd *, int));
-static boolean parse_ieee_bb PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_be PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_nn PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_ty PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean parse_ieee_atn PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean ieee_read_cxx_misc
+static int ieee_regno_to_genreg
+ PARAMS ((bfd *, int));
+static int ieee_genreg_to_regno
+ PARAMS ((bfd *, int));
+static bfd_boolean parse_ieee_bb
+ PARAMS ((struct ieee_info *, const bfd_byte **));
+static bfd_boolean parse_ieee_be
+ PARAMS ((struct ieee_info *, const bfd_byte **));
+static bfd_boolean parse_ieee_nn
+ PARAMS ((struct ieee_info *, const bfd_byte **));
+static bfd_boolean parse_ieee_ty
+ PARAMS ((struct ieee_info *, const bfd_byte **));
+static bfd_boolean parse_ieee_atn
+ PARAMS ((struct ieee_info *, const bfd_byte **));
+static bfd_boolean ieee_read_cxx_misc
PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_cxx_class
+static bfd_boolean ieee_read_cxx_class
PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_cxx_defaults
+static bfd_boolean ieee_read_cxx_defaults
PARAMS ((struct ieee_info *, const bfd_byte **, unsigned long));
-static boolean ieee_read_reference
+static bfd_boolean ieee_read_reference
PARAMS ((struct ieee_info *, const bfd_byte **));
-static boolean ieee_require_asn
+static bfd_boolean ieee_require_asn
PARAMS ((struct ieee_info *, const bfd_byte **, bfd_vma *));
-static boolean ieee_require_atn65
+static bfd_boolean ieee_require_atn65
PARAMS ((struct ieee_info *, const bfd_byte **, const char **,
unsigned long *));
@@ -334,24 +343,24 @@ savestring (start, len)
/* Read a number which must be present in an IEEE file. */
-static boolean
+static bfd_boolean
ieee_read_number (info, pp, pv)
struct ieee_info *info;
const bfd_byte **pp;
bfd_vma *pv;
{
- return ieee_read_optional_number (info, pp, pv, (boolean *) NULL);
+ return ieee_read_optional_number (info, pp, pv, (bfd_boolean *) NULL);
}
/* Read a number in an IEEE file. If ppresent is not NULL, the number
need not be there. */
-static boolean
+static bfd_boolean
ieee_read_optional_number (info, pp, pv, ppresent)
struct ieee_info *info;
const bfd_byte **pp;
bfd_vma *pv;
- boolean *ppresent;
+ bfd_boolean *ppresent;
{
ieee_record_enum_type b;
@@ -359,11 +368,11 @@ ieee_read_optional_number (info, pp, pv, ppresent)
{
if (ppresent != NULL)
{
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_eof (info);
- return false;
+ return FALSE;
}
b = (ieee_record_enum_type) **pp;
@@ -373,8 +382,8 @@ ieee_read_optional_number (info, pp, pv, ppresent)
{
*pv = (bfd_vma) b;
if (ppresent != NULL)
- *ppresent = true;
- return true;
+ *ppresent = TRUE;
+ return TRUE;
}
if (b >= ieee_number_repeat_start_enum && b <= ieee_number_repeat_end_enum)
@@ -385,7 +394,7 @@ ieee_read_optional_number (info, pp, pv, ppresent)
if (*pp + i - 1 >= info->pend)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
*pv = 0;
@@ -397,44 +406,44 @@ ieee_read_optional_number (info, pp, pv, ppresent)
}
if (ppresent != NULL)
- *ppresent = true;
+ *ppresent = TRUE;
- return true;
+ return TRUE;
}
if (ppresent != NULL)
{
--*pp;
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_error (info, *pp - 1, _("invalid number"));
- return false;
+ return FALSE;
}
/* Read a required string from an IEEE file. */
-static boolean
+static bfd_boolean
ieee_read_id (info, pp, pname, pnamlen)
struct ieee_info *info;
const bfd_byte **pp;
const char **pname;
unsigned long *pnamlen;
{
- return ieee_read_optional_id (info, pp, pname, pnamlen, (boolean *) NULL);
+ return ieee_read_optional_id (info, pp, pname, pnamlen, (bfd_boolean *) NULL);
}
/* Read a string from an IEEE file. If ppresent is not NULL, the
string is optional. */
-static boolean
+static bfd_boolean
ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
struct ieee_info *info;
const bfd_byte **pp;
const char **pname;
unsigned long *pnamlen;
- boolean *ppresent;
+ bfd_boolean *ppresent;
{
bfd_byte b;
unsigned long len;
@@ -442,7 +451,7 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
if (*pp >= info->pend)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
b = **pp;
@@ -465,17 +474,17 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
if (ppresent != NULL)
{
--*pp;
- *ppresent = false;
- return true;
+ *ppresent = FALSE;
+ return TRUE;
}
ieee_error (info, *pp - 1, _("invalid string length"));
- return false;
+ return FALSE;
}
if ((unsigned long) (info->pend - *pp) < len)
{
ieee_eof (info);
- return false;
+ return FALSE;
}
*pname = (const char *) *pp;
@@ -483,9 +492,9 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
*pp += len;
if (ppresent != NULL)
- *ppresent = true;
+ *ppresent = TRUE;
- return true;
+ return TRUE;
}
/* Read an expression from an IEEE file. Since this code is only used
@@ -494,7 +503,7 @@ ieee_read_optional_id (info, pp, pname, pnamlen, ppresent)
seen in debugging information. This can be easily extended if
necessary. */
-static boolean
+static bfd_boolean
ieee_read_expression (info, pp, pv)
struct ieee_info *info;
const bfd_byte **pp;
@@ -513,20 +522,20 @@ ieee_read_expression (info, pp, pv)
{
const bfd_byte *start;
bfd_vma val;
- boolean present;
+ bfd_boolean present;
ieee_record_enum_type c;
start = *pp;
if (! ieee_read_optional_number (info, pp, &val, &present))
- return false;
+ return FALSE;
if (present)
{
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
- return false;
+ return FALSE;
}
*esp++ = val;
continue;
@@ -554,20 +563,20 @@ ieee_read_expression (info, pp, pv)
asection *s;
if (! ieee_read_number (info, pp, &indx))
- return false;
+ return FALSE;
for (s = info->abfd->sections; s != NULL; s = s->next)
if ((bfd_vma) s->target_index == indx)
break;
if (s == NULL)
{
ieee_error (info, start, _("unknown section"));
- return false;
+ return FALSE;
}
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
- return false;
+ return FALSE;
}
*esp++ = bfd_get_section_vma (info->abfd, s);
@@ -582,7 +591,7 @@ ieee_read_expression (info, pp, pv)
if (esp - expr_stack < 2)
{
ieee_error (info, start, _("expression stack underflow"));
- return false;
+ return FALSE;
}
v1 = *--esp;
@@ -596,12 +605,12 @@ ieee_read_expression (info, pp, pv)
if (esp - 1 != expr_stack)
{
ieee_error (info, expr_start, _("expression stack mismatch"));
- return false;
+ return FALSE;
}
*pv = *--esp;
- return true;
+ return TRUE;
}
/* Return an IEEE builtin type. */
@@ -648,42 +657,42 @@ ieee_builtin_type (info, p, indx)
break;
case builtin_signed_char:
- type = debug_make_int_type (dhandle, 1, false);
+ type = debug_make_int_type (dhandle, 1, FALSE);
name = "signed char";
break;
case builtin_unsigned_char:
- type = debug_make_int_type (dhandle, 1, true);
+ type = debug_make_int_type (dhandle, 1, TRUE);
name = "unsigned char";
break;
case builtin_signed_short_int:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "signed short int";
break;
case builtin_unsigned_short_int:
- type = debug_make_int_type (dhandle, 2, true);
+ type = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short int";
break;
case builtin_signed_long:
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "signed long";
break;
case builtin_unsigned_long:
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned long";
break;
case builtin_signed_long_long:
- type = debug_make_int_type (dhandle, 8, false);
+ type = debug_make_int_type (dhandle, 8, FALSE);
name = "signed long long";
break;
case builtin_unsigned_long_long:
- type = debug_make_int_type (dhandle, 8, true);
+ type = debug_make_int_type (dhandle, 8, TRUE);
name = "unsigned long long";
break;
@@ -717,64 +726,64 @@ ieee_builtin_type (info, p, indx)
ieee_builtin_type (info, p,
((unsigned int)
builtin_int)),
- 0, -1, true);
+ 0, -1, TRUE);
name = "QUOTED STRING";
break;
case builtin_instruction_address:
/* FIXME: This should be a code address. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "instruction address";
break;
case builtin_int:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "int";
break;
case builtin_unsigned:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned";
break;
case builtin_unsigned_int:
/* FIXME: The size for this type should depend upon the
processor. */
- type = debug_make_int_type (dhandle, 4, true);
+ type = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned int";
break;
case builtin_char:
- type = debug_make_int_type (dhandle, 1, false);
+ type = debug_make_int_type (dhandle, 1, FALSE);
name = "char";
break;
case builtin_long:
- type = debug_make_int_type (dhandle, 4, false);
+ type = debug_make_int_type (dhandle, 4, FALSE);
name = "long";
break;
case builtin_short:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "short";
break;
case builtin_unsigned_short:
- type = debug_make_int_type (dhandle, 2, true);
+ type = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short";
break;
case builtin_short_int:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "short int";
break;
case builtin_signed_short:
- type = debug_make_int_type (dhandle, 2, false);
+ type = debug_make_int_type (dhandle, 2, FALSE);
name = "signed short";
break;
@@ -793,15 +802,15 @@ ieee_builtin_type (info, p, indx)
return type;
}
-/* Allocate more space in the type table. If ref is true, this is a
+/* Allocate more space in the type table. If ref is TRUE, this is a
reference to the type; if it is not already defined, we should set
up an indirect type. */
-static boolean
+static bfd_boolean
ieee_alloc_type (info, indx, ref)
struct ieee_info *info;
unsigned int indx;
- boolean ref;
+ bfd_boolean ref;
{
unsigned int nalloc;
register struct ieee_type *t;
@@ -839,16 +848,16 @@ ieee_alloc_type (info, indx, ref)
t->type = debug_make_indirect_type (info->dhandle, t->pslot,
(const char *) NULL);
if (t->type == NULL)
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Read a type index and return the corresponding type. */
-static boolean
+static bfd_boolean
ieee_read_type_index (info, pp, ptype)
struct ieee_info *info;
const bfd_byte **pp;
@@ -860,29 +869,29 @@ ieee_read_type_index (info, pp, ptype)
start = *pp;
if (! ieee_read_number (info, pp, &indx))
- return false;
+ return FALSE;
if (indx < 256)
{
*ptype = ieee_builtin_type (info, start, indx);
if (*ptype == NULL)
- return false;
- return true;
+ return FALSE;
+ return TRUE;
}
indx -= 256;
- if (! ieee_alloc_type (info, indx, true))
- return false;
+ if (! ieee_alloc_type (info, indx, TRUE))
+ return FALSE;
*ptype = info->types.types[indx].type;
- return true;
+ return TRUE;
}
/* Parse IEEE debugging information for a file. This is passed the
bytes which compose the Debug Information Part of an IEEE file. */
-boolean
+bfd_boolean
parse_ieee (dhandle, abfd, bytes, len)
PTR dhandle;
bfd *abfd;
@@ -898,7 +907,7 @@ parse_ieee (dhandle, abfd, bytes, len)
info.bytes = bytes;
info.pend = bytes + len;
info.blockstack.bsp = info.blockstack.stack;
- info.saw_filename = false;
+ info.saw_filename = FALSE;
info.vars.alloc = 0;
info.vars.vars = NULL;
info.global_vars = NULL;
@@ -926,38 +935,38 @@ parse_ieee (dhandle, abfd, bytes, len)
if (c <= ieee_number_repeat_end_enum)
{
ieee_error (&info, record_start, _("unexpected number"));
- return false;
+ return FALSE;
}
switch (c)
{
default:
ieee_error (&info, record_start, _("unexpected record type"));
- return false;
+ return FALSE;
case ieee_bb_record_enum:
if (! parse_ieee_bb (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_be_record_enum:
if (! parse_ieee_be (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_nn_record:
if (! parse_ieee_nn (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_ty_record_enum:
if (! parse_ieee_ty (&info, &p))
- return false;
+ return FALSE;
break;
case ieee_atn_record_enum:
if (! parse_ieee_atn (&info, &p))
- return false;
+ return FALSE;
break;
}
}
@@ -966,15 +975,15 @@ parse_ieee (dhandle, abfd, bytes, len)
{
ieee_error (&info, (const bfd_byte *) NULL,
_("blocks left on stack at end"));
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Handle an IEEE BB record. */
-static boolean
+static bfd_boolean
parse_ieee_bb (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -986,7 +995,7 @@ parse_ieee_bb (info, pp)
unsigned long namlen;
char *namcopy = NULL;
unsigned int fnindx;
- boolean skip;
+ bfd_boolean skip;
block_start = *pp;
@@ -995,10 +1004,10 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &size)
|| ! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
fnindx = (unsigned int) -1;
- skip = false;
+ skip = FALSE;
switch (b)
{
@@ -1006,10 +1015,10 @@ parse_ieee_bb (info, pp)
/* BB1: Type definitions local to a module. */
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_set_filename (info->dhandle, namcopy))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
/* Discard any variables or types we may have seen before. */
if (info->vars.vars != NULL)
@@ -1038,8 +1047,8 @@ parse_ieee_bb (info, pp)
/* BB2: Global type definitions. The name is supposed to be
empty, but we don't check. */
if (! debug_set_filename (info->dhandle, "*global*"))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
break;
case 3:
@@ -1057,7 +1066,7 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &stackspace)
|| ! ieee_read_number (info, pp, &typindx)
|| ! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We have no way to record the stack space. FIXME. */
@@ -1065,13 +1074,13 @@ parse_ieee_bb (info, pp)
{
return_type = ieee_builtin_type (info, block_start, typindx);
if (return_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
else
{
typindx -= 256;
- if (! ieee_alloc_type (info, typindx, true))
- return false;
+ if (! ieee_alloc_type (info, typindx, TRUE))
+ return FALSE;
fnindx = typindx;
return_type = info->types.types[typindx].type;
if (debug_get_type_kind (info->dhandle, return_type)
@@ -1082,10 +1091,10 @@ parse_ieee_bb (info, pp)
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_record_function (info->dhandle, namcopy, return_type,
- true, offset))
- return false;
+ TRUE, offset))
+ return FALSE;
}
break;
@@ -1098,19 +1107,19 @@ parse_ieee_bb (info, pp)
for (i = 0; i < 6; i++)
{
bfd_vma ignore;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_optional_number (info, pp, &ignore, &present))
- return false;
+ return FALSE;
if (! present)
break;
}
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_start_source (info->dhandle, namcopy))
- return false;
+ return FALSE;
}
break;
@@ -1122,14 +1131,14 @@ parse_ieee_bb (info, pp)
if (! ieee_read_number (info, pp, &stackspace)
|| ! ieee_read_number (info, pp, &typindx)
|| ! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We have no way to record the stack space. FIXME. */
if (namlen == 0)
{
if (! debug_start_block (info->dhandle, offset))
- return false;
+ return FALSE;
/* Change b to indicate that this is a block
rather than a function. */
b = 0x86;
@@ -1142,7 +1151,7 @@ parse_ieee_bb (info, pp)
converting from IEEE to other debug formats work
better. */
if (strncmp (name, "__XRYCPP", namlen) == 0)
- skip = true;
+ skip = TRUE;
else
{
debug_type return_type;
@@ -1152,13 +1161,13 @@ parse_ieee_bb (info, pp)
return_type = ieee_builtin_type (info, block_start,
typindx);
if (return_type == NULL)
- return false;
+ return FALSE;
}
else
{
typindx -= 256;
- if (! ieee_alloc_type (info, typindx, true))
- return false;
+ if (! ieee_alloc_type (info, typindx, TRUE))
+ return FALSE;
fnindx = typindx;
return_type = info->types.types[typindx].type;
if (debug_get_type_kind (info->dhandle, return_type)
@@ -1169,10 +1178,10 @@ parse_ieee_bb (info, pp)
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_record_function (info->dhandle, namcopy,
- return_type, false, offset))
- return false;
+ return_type, FALSE, offset))
+ return FALSE;
}
}
}
@@ -1185,29 +1194,29 @@ parse_ieee_bb (info, pp)
const char *inam, *vstr;
unsigned long inamlen, vstrlen;
bfd_vma tool_type;
- boolean present;
+ bfd_boolean present;
unsigned int i;
if (! info->saw_filename)
{
namcopy = savestring (name, namlen);
if (namcopy == NULL)
- return false;
+ return FALSE;
if (! debug_set_filename (info->dhandle, namcopy))
- return false;
- info->saw_filename = true;
+ return FALSE;
+ info->saw_filename = TRUE;
}
if (! ieee_read_id (info, pp, &inam, &inamlen)
|| ! ieee_read_number (info, pp, &tool_type)
|| ! ieee_read_optional_id (info, pp, &vstr, &vstrlen, &present))
- return false;
+ return FALSE;
for (i = 0; i < 6; i++)
{
bfd_vma ignore;
if (! ieee_read_optional_number (info, pp, &ignore, &present))
- return false;
+ return FALSE;
if (! present)
break;
}
@@ -1219,19 +1228,19 @@ parse_ieee_bb (info, pp)
information. FIXME. */
{
bfd_vma sectype, secindx, offset, map;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_number (info, pp, &sectype)
|| ! ieee_read_number (info, pp, &secindx)
|| ! ieee_read_expression (info, pp, &offset)
|| ! ieee_read_optional_number (info, pp, &map, &present))
- return false;
+ return FALSE;
}
break;
default:
ieee_error (info, block_start, _("unknown BB type"));
- return false;
+ return FALSE;
}
@@ -1240,7 +1249,7 @@ parse_ieee_bb (info, pp)
if (info->blockstack.bsp >= info->blockstack.stack + BLOCKSTACK_SIZE)
{
ieee_error (info, (const bfd_byte *) NULL, _("stack overflow"));
- return false;
+ return FALSE;
}
info->blockstack.bsp->kind = b;
@@ -1250,12 +1259,12 @@ parse_ieee_bb (info, pp)
info->blockstack.bsp->skip = skip;
++info->blockstack.bsp;
- return true;
+ return TRUE;
}
/* Handle an IEEE BE record. */
-static boolean
+static bfd_boolean
parse_ieee_be (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -1265,7 +1274,7 @@ parse_ieee_be (info, pp)
if (info->blockstack.bsp <= info->blockstack.stack)
{
ieee_error (info, *pp, _("stack underflow"));
- return false;
+ return FALSE;
}
--info->blockstack.bsp;
@@ -1305,11 +1314,11 @@ parse_ieee_be (info, pp)
case 4:
case 6:
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
if (! info->blockstack.bsp->skip)
{
if (! debug_end_function (info->dhandle, offset + 1))
- return false;
+ return FALSE;
}
break;
@@ -1317,9 +1326,9 @@ parse_ieee_be (info, pp)
/* This is BE6 when BB6 started a block rather than a local
function. */
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
if (! debug_end_block (info->dhandle, offset + 1))
- return false;
+ return FALSE;
break;
case 5:
@@ -1336,7 +1345,7 @@ parse_ieee_be (info, pp)
if (bl->kind == 5)
{
if (! debug_start_source (info->dhandle, bl->filename))
- return false;
+ return FALSE;
break;
}
}
@@ -1346,7 +1355,7 @@ parse_ieee_be (info, pp)
case 11:
if (! ieee_read_expression (info, pp, &offset))
- return false;
+ return FALSE;
/* We just ignore the module size. FIXME. */
break;
@@ -1355,12 +1364,12 @@ parse_ieee_be (info, pp)
break;
}
- return true;
+ return TRUE;
}
/* Parse an NN record. */
-static boolean
+static bfd_boolean
parse_ieee_nn (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -1374,12 +1383,12 @@ parse_ieee_nn (info, pp)
if (! ieee_read_number (info, pp, &varindx)
|| ! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
if (varindx < 32)
{
ieee_error (info, nn_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
varindx -= 32;
@@ -1403,12 +1412,12 @@ parse_ieee_nn (info, pp)
info->vars.vars[varindx].name = name;
info->vars.vars[varindx].namlen = namlen;
- return true;
+ return TRUE;
}
/* Parse a TY record. */
-static boolean
+static bfd_boolean
parse_ieee_ty (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -1416,7 +1425,7 @@ parse_ieee_ty (info, pp)
const bfd_byte *ty_start, *ty_var_start, *ty_code_start;
bfd_vma typeindx, varindx, tc;
PTR dhandle;
- boolean tag, typdef;
+ bfd_boolean tag, typdef;
debug_type *arg_slots;
unsigned long type_bitsize;
debug_type type;
@@ -1424,59 +1433,59 @@ parse_ieee_ty (info, pp)
ty_start = *pp;
if (! ieee_read_number (info, pp, &typeindx))
- return false;
+ return FALSE;
if (typeindx < 256)
{
ieee_error (info, ty_start, _("illegal type index"));
- return false;
+ return FALSE;
}
typeindx -= 256;
- if (! ieee_alloc_type (info, typeindx, false))
- return false;
+ if (! ieee_alloc_type (info, typeindx, FALSE))
+ return FALSE;
if (**pp != 0xce)
{
ieee_error (info, *pp, _("unknown TY code"));
- return false;
+ return FALSE;
}
++*pp;
ty_var_start = *pp;
if (! ieee_read_number (info, pp, &varindx))
- return false;
+ return FALSE;
if (varindx < 32)
{
ieee_error (info, ty_var_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
varindx -= 32;
if (varindx >= info->vars.alloc || info->vars.vars[varindx].name == NULL)
{
ieee_error (info, ty_var_start, _("undefined variable in TY"));
- return false;
+ return FALSE;
}
ty_code_start = *pp;
if (! ieee_read_number (info, pp, &tc))
- return false;
+ return FALSE;
dhandle = info->dhandle;
- tag = false;
- typdef = false;
+ tag = FALSE;
+ typdef = FALSE;
arg_slots = NULL;
type_bitsize = 0;
switch (tc)
{
default:
ieee_error (info, ty_code_start, _("unknown TY code"));
- return false;
+ return FALSE;
case '!':
/* Unknown type, with size. We treat it as int. FIXME. */
@@ -1484,8 +1493,8 @@ parse_ieee_ty (info, pp)
bfd_vma size;
if (! ieee_read_number (info, pp, &size))
- return false;
- type = debug_make_int_type (dhandle, size, false);
+ return FALSE;
+ type = debug_make_int_type (dhandle, size, FALSE);
}
break;
@@ -1499,14 +1508,14 @@ parse_ieee_ty (info, pp)
if (! ieee_read_type_index (info, pp, &ele_type)
|| ! ieee_read_number (info, pp, &lower)
|| ! ieee_read_number (info, pp, &upper))
- return false;
+ return FALSE;
type = debug_make_array_type (dhandle, ele_type,
ieee_builtin_type (info, ty_code_start,
((unsigned int)
builtin_int)),
(bfd_signed_vma) lower,
(bfd_signed_vma) upper,
- false);
+ FALSE);
}
break;
@@ -1521,7 +1530,7 @@ parse_ieee_ty (info, pp)
unsigned int i;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
/* FIXME: we ignore the enumeration size. */
alloc = 10;
@@ -1532,10 +1541,10 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
@@ -1548,7 +1557,7 @@ parse_ieee_ty (info, pp)
names[c] = savestring (name, namlen);
if (names[c] == NULL)
- return false;
+ return FALSE;
++c;
}
@@ -1559,7 +1568,7 @@ parse_ieee_ty (info, pp)
vals[i] = i;
type = debug_make_enum_type (dhandle, names, vals);
- tag = true;
+ tag = TRUE;
}
break;
@@ -1572,7 +1581,7 @@ parse_ieee_ty (info, pp)
unsigned int c;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
alloc = 10;
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
@@ -1581,18 +1590,18 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
debug_type ftype;
bfd_vma bitpos, bitsize;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_type_index (info, pp, &ftype)
|| ! ieee_read_number (info, pp, &bitpos)
|| ! ieee_read_number (info, pp, &bitsize))
- return false;
+ return FALSE;
if (c + 1 >= alloc)
{
@@ -1605,14 +1614,14 @@ parse_ieee_ty (info, pp)
ftype, bitpos, bitsize,
DEBUG_VISIBILITY_PUBLIC);
if (fields[c] == NULL)
- return false;
+ return FALSE;
++c;
}
fields[c] = NULL;
- type = debug_make_struct_type (dhandle, true, size, fields);
- tag = true;
+ type = debug_make_struct_type (dhandle, TRUE, size, fields);
+ tag = TRUE;
}
break;
@@ -1632,15 +1641,15 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
bfd_vma val;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_number (info, pp, &val))
- return false;
+ return FALSE;
/* If the length of the name is zero, then the value is
actually the size of the enum. We ignore this
@@ -1659,7 +1668,7 @@ parse_ieee_ty (info, pp)
names[c] = savestring (name, namlen);
if (names[c] == NULL)
- return false;
+ return FALSE;
vals[c] = (bfd_signed_vma) val;
++c;
}
@@ -1667,7 +1676,7 @@ parse_ieee_ty (info, pp)
names[c] = NULL;
type = debug_make_enum_type (dhandle, names, vals);
- tag = true;
+ tag = TRUE;
}
break;
@@ -1678,7 +1687,7 @@ parse_ieee_ty (info, pp)
debug_type t;
if (! ieee_read_type_index (info, pp, &t))
- return false;
+ return FALSE;
type = debug_make_pointer_type (dhandle, t);
}
break;
@@ -1692,7 +1701,7 @@ parse_ieee_ty (info, pp)
|| ! ieee_read_number (info, pp, &high)
|| ! ieee_read_number (info, pp, &signedp)
|| ! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
type = debug_make_range_type (dhandle,
debug_make_int_type (dhandle, size,
@@ -1711,7 +1720,7 @@ parse_ieee_ty (info, pp)
unsigned int c;
if (! ieee_read_number (info, pp, &size))
- return false;
+ return FALSE;
alloc = 10;
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
@@ -1720,19 +1729,19 @@ parse_ieee_ty (info, pp)
{
const char *name;
unsigned long namlen;
- boolean present;
+ bfd_boolean present;
bfd_vma tindx;
bfd_vma offset;
debug_type ftype;
bfd_vma bitsize;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (! present)
break;
if (! ieee_read_number (info, pp, &tindx)
|| ! ieee_read_number (info, pp, &offset))
- return false;
+ return FALSE;
if (tindx < 256)
{
@@ -1745,8 +1754,8 @@ parse_ieee_ty (info, pp)
struct ieee_type *t;
tindx -= 256;
- if (! ieee_alloc_type (info, tindx, true))
- return false;
+ if (! ieee_alloc_type (info, tindx, TRUE))
+ return FALSE;
t = info->types.types + tindx;
ftype = t->type;
bitsize = t->bitsize;
@@ -1765,22 +1774,22 @@ parse_ieee_ty (info, pp)
ftype, offset, bitsize,
DEBUG_VISIBILITY_PUBLIC);
if (fields[c] == NULL)
- return false;
+ return FALSE;
++c;
}
fields[c] = NULL;
type = debug_make_struct_type (dhandle, tc == 'S', size, fields);
- tag = true;
+ tag = TRUE;
}
break;
case 'T':
/* Typedef. */
if (! ieee_read_type_index (info, pp, &type))
- return false;
- typdef = true;
+ return FALSE;
+ typdef = TRUE;
break;
case 'X':
@@ -1790,7 +1799,7 @@ parse_ieee_ty (info, pp)
bfd_vma attr;
debug_type rtype;
bfd_vma nargs;
- boolean present;
+ bfd_boolean present;
struct ieee_var *pv;
/* FIXME: We ignore the attribute and the argument names. */
@@ -1798,14 +1807,14 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &attr)
|| ! ieee_read_type_index (info, pp, &rtype)
|| ! ieee_read_number (info, pp, &nargs))
- return false;
+ return FALSE;
do
{
const char *name;
unsigned long namlen;
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
}
while (present);
@@ -1824,7 +1833,7 @@ parse_ieee_ty (info, pp)
}
type = debug_make_function_type (dhandle, rtype, (debug_type *) NULL,
- false);
+ FALSE);
}
break;
@@ -1841,13 +1850,13 @@ parse_ieee_ty (info, pp)
if (! ieee_read_type_index (info, pp, &etype)
|| ! ieee_read_number (info, pp, &high))
- return false;
+ return FALSE;
type = debug_make_array_type (dhandle, etype,
ieee_builtin_type (info, ty_code_start,
((unsigned int)
builtin_int)),
- 0, (bfd_signed_vma) high, false);
+ 0, (bfd_signed_vma) high, FALSE);
}
break;
@@ -1860,7 +1869,7 @@ parse_ieee_ty (info, pp)
/* FIXME: I don't know what the name means. */
if (! ieee_read_id (info, pp, &name, &namlen))
- return false;
+ return FALSE;
type = debug_make_complex_type (dhandle, tc == 'c' ? 4 : 8);
}
@@ -1869,35 +1878,35 @@ parse_ieee_ty (info, pp)
case 'f':
/* Pascal file name. FIXME. */
ieee_error (info, ty_code_start, _("Pascal file name not supported"));
- return false;
+ return FALSE;
case 'g':
/* Bitfield type. */
{
bfd_vma signedp, bitsize, dummy;
const bfd_byte *hold;
- boolean present;
+ bfd_boolean present;
if (! ieee_read_number (info, pp, &signedp)
|| ! ieee_read_number (info, pp, &bitsize))
- return false;
+ return FALSE;
/* I think the documentation says that there is a type index,
but some actual files do not have one. */
hold = *pp;
if (! ieee_read_optional_number (info, pp, &dummy, &present))
- return false;
+ return FALSE;
if (! present)
{
/* FIXME: This is just a guess. */
type = debug_make_int_type (dhandle, 4,
- signedp ? false : true);
+ signedp ? FALSE : TRUE);
}
else
{
*pp = hold;
if (! ieee_read_type_index (info, pp, &type))
- return false;
+ return FALSE;
}
type_bitsize = bitsize;
}
@@ -1911,13 +1920,13 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &kind)
|| ! ieee_read_type_index (info, pp, &t))
- return false;
+ return FALSE;
switch (kind)
{
default:
ieee_error (info, ty_start, _("unsupported qualifier"));
- return false;
+ return FALSE;
case 1:
type = debug_make_const_type (dhandle, t);
@@ -1938,11 +1947,11 @@ parse_ieee_ty (info, pp)
if (! ieee_read_number (info, pp, &size)
|| ! ieee_read_type_index (info, pp, &etype))
- return false;
+ return FALSE;
/* FIXME: We ignore the size. */
- type = debug_make_set_type (dhandle, etype, false);
+ type = debug_make_set_type (dhandle, etype, FALSE);
}
break;
@@ -1953,8 +1962,8 @@ parse_ieee_ty (info, pp)
bfd_vma attr, frame_type, push_mask, nargs, level, father;
debug_type rtype;
debug_type *arg_types;
- boolean varargs;
- boolean present;
+ bfd_boolean varargs;
+ bfd_boolean present;
/* FIXME: We ignore some of this information. */
@@ -1965,11 +1974,11 @@ parse_ieee_ty (info, pp)
|| ! ieee_read_number (info, pp, &push_mask)
|| ! ieee_read_type_index (info, pp, &rtype)
|| ! ieee_read_number (info, pp, &nargs))
- return false;
+ return FALSE;
if (nargs == (bfd_vma) -1)
{
arg_types = NULL;
- varargs = false;
+ varargs = FALSE;
}
else
{
@@ -1979,11 +1988,11 @@ parse_ieee_ty (info, pp)
xmalloc ((nargs + 1) * sizeof *arg_types));
for (i = 0; i < nargs; i++)
if (! ieee_read_type_index (info, pp, arg_types + i))
- return false;
+ return FALSE;
/* If the last type is pointer to void, this is really a
varargs function. */
- varargs = false;
+ varargs = FALSE;
if (nargs > 0)
{
debug_type last;
@@ -1996,7 +2005,7 @@ parse_ieee_ty (info, pp)
== DEBUG_KIND_VOID))
{
--nargs;
- varargs = true;
+ varargs = TRUE;
}
}
@@ -2026,7 +2035,7 @@ parse_ieee_ty (info, pp)
}
if (! ieee_read_number (info, pp, &level)
|| ! ieee_read_optional_number (info, pp, &father, &present))
- return false;
+ return FALSE;
/* We can't distinguish between a global function and a static
function. */
@@ -2052,7 +2061,7 @@ parse_ieee_ty (info, pp)
/* Record the type in the table. */
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
info->vars.vars[varindx].type = type;
@@ -2088,7 +2097,7 @@ parse_ieee_ty (info, pp)
it->type = type;
}
if (type == NULL)
- return false;
+ return FALSE;
}
info->types.types[typeindx].type = type;
@@ -2102,12 +2111,12 @@ parse_ieee_ty (info, pp)
if (info->types.types[typeindx].pslot != NULL)
*info->types.types[typeindx].pslot = type;
- return true;
+ return TRUE;
}
/* Parse an ATN record. */
-static boolean
+static bfd_boolean
parse_ieee_atn (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -2122,19 +2131,19 @@ parse_ieee_atn (info, pp)
const char *name;
unsigned long namlen;
char *namcopy;
- boolean present;
+ bfd_boolean present;
int blocktype;
atn_start = *pp;
if (! ieee_read_number (info, pp, &varindx)
|| ! ieee_read_type_index (info, pp, &type))
- return false;
+ return FALSE;
atn_code_start = *pp;
if (! ieee_read_number (info, pp, &atn_code))
- return false;
+ return FALSE;
if (varindx == 0)
{
@@ -2150,7 +2159,7 @@ parse_ieee_atn (info, pp)
return ieee_read_number (info, pp, &v);
ieee_error (info, atn_start, _("illegal variable index"));
- return false;
+ return FALSE;
}
else
{
@@ -2188,7 +2197,7 @@ parse_ieee_atn (info, pp)
else
{
ieee_error (info, atn_start, _("undefined variable in ATN"));
- return false;
+ return FALSE;
}
}
@@ -2231,12 +2240,12 @@ parse_ieee_atn (info, pp)
{
default:
ieee_error (info, atn_code_start, _("unknown ATN type"));
- return false;
+ return FALSE;
case 1:
/* Automatic variable. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2247,7 +2256,7 @@ parse_ieee_atn (info, pp)
case 2:
/* Register variable. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2259,7 +2268,7 @@ parse_ieee_atn (info, pp)
case 3:
/* Static variable. */
if (! ieee_require_asn (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2284,30 +2293,30 @@ parse_ieee_atn (info, pp)
/* External function. We don't currently record these. FIXME. */
if (pvar != NULL)
pvar->kind = IEEE_EXTERNAL;
- return true;
+ return TRUE;
case 5:
/* External variable. We don't currently record these. FIXME. */
if (pvar != NULL)
pvar->kind = IEEE_EXTERNAL;
- return true;
+ return TRUE;
case 7:
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_number (info, pp, &v3, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v4, &present))
- return false;
+ return FALSE;
}
/* We just ignore the two optional fields in v3 and v4, since
they are not defined. */
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
/* We have no way to record the column number. FIXME. */
@@ -2316,7 +2325,7 @@ parse_ieee_atn (info, pp)
case 8:
/* Global variable. */
if (! ieee_require_asn (info, pp, &v))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
if (type == NULL)
type = debug_make_void_type (dhandle);
@@ -2327,10 +2336,10 @@ parse_ieee_atn (info, pp)
case 9:
/* Variable lifetime information. */
if (! ieee_read_number (info, pp, &v))
- return false;
+ return FALSE;
/* We have no way to record this information. FIXME. */
- return true;
+ return TRUE;
case 10:
/* Locked register. The spec says that there are two required
@@ -2338,7 +2347,7 @@ parse_ieee_atn (info, pp)
one. */
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
/* I think this means a variable that is both in a register and
a frame slot. We ignore the frame slot. FIXME. */
@@ -2354,8 +2363,8 @@ parse_ieee_atn (info, pp)
/* Reserved for FORTRAN common. */
ieee_error (info, atn_code_start, _("unsupported ATN11"));
- /* Return true to keep going. */
- return true;
+ /* Return TRUE to keep going. */
+ return TRUE;
case 12:
/* Based variable. */
@@ -2365,15 +2374,15 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_number (info, pp, &v3, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v4, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v5, &present))
- return false;
+ return FALSE;
}
}
@@ -2381,33 +2390,33 @@ parse_ieee_atn (info, pp)
ieee_error (info, atn_code_start, _("unsupported ATN12"));
- /* Return true to keep going. */
- return true;
+ /* Return TRUE to keep going. */
+ return TRUE;
case 16:
/* Constant. The description of this that I have is ambiguous,
so I'm not going to try to implement it. */
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_number (info, pp, &v2, &present))
- return false;
+ return FALSE;
if (present)
{
if (! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
}
}
if ((ieee_record_enum_type) **pp == ieee_e2_first_byte_enum)
{
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
case 19:
/* Static variable from assembler. */
@@ -2415,7 +2424,7 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_optional_number (info, pp, &v2, &present)
|| ! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
namcopy = savestring (name, namlen);
/* We don't really handle this correctly. FIXME. */
return debug_record_variable (dhandle, namcopy,
@@ -2432,7 +2441,7 @@ parse_ieee_atn (info, pp)
if (! ieee_read_number (info, pp, &v)
|| ! ieee_read_number (info, pp, &v2)
|| ! ieee_read_optional_id (info, pp, &name, &namlen, &present))
- return false;
+ return FALSE;
if (atn_code == 62 && v == 80)
{
@@ -2440,7 +2449,7 @@ parse_ieee_atn (info, pp)
{
ieee_error (info, atn_code_start,
_("unexpected string in C++ misc"));
- return false;
+ return FALSE;
}
return ieee_read_cxx_misc (info, pp, v2);
}
@@ -2453,21 +2462,21 @@ parse_ieee_atn (info, pp)
{
default:
ieee_error (info, *pp, _("bad misc record"));
- return false;
+ return FALSE;
case ieee_at_record_enum:
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
break;
case ieee_e2_first_byte_enum:
if (! ieee_require_asn (info, pp, &v3))
- return false;
+ return FALSE;
break;
}
}
- return true;
+ return TRUE;
}
/*NOTREACHED*/
@@ -2476,7 +2485,7 @@ parse_ieee_atn (info, pp)
/* Handle C++ debugging miscellaneous records. This is called for
procedure miscellaneous records of type 80. */
-static boolean
+static bfd_boolean
ieee_read_cxx_misc (info, pp, count)
struct ieee_info *info;
const bfd_byte **pp;
@@ -2489,18 +2498,18 @@ ieee_read_cxx_misc (info, pp, count)
/* Get the category of C++ misc record. */
if (! ieee_require_asn (info, pp, &category))
- return false;
+ return FALSE;
--count;
switch (category)
{
default:
ieee_error (info, start, _("unrecognized C++ misc record"));
- return false;
+ return FALSE;
case 'T':
if (! ieee_read_cxx_class (info, pp, count))
- return false;
+ return FALSE;
break;
case 'M':
@@ -2514,12 +2523,12 @@ ieee_read_cxx_misc (info, pp, count)
function. */
if (! ieee_require_asn (info, pp, &flags))
- return false;
+ return FALSE;
if (*pp < info->pend
&& (ieee_record_enum_type) **pp == ieee_at_record_enum)
{
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
}
/* This is emitted for method functions, but I don't think we
@@ -2531,7 +2540,7 @@ ieee_read_cxx_misc (info, pp, count)
case 'B':
if (! ieee_read_cxx_defaults (info, pp, count))
- return false;
+ return FALSE;
break;
case 'z':
@@ -2546,7 +2555,7 @@ ieee_read_cxx_misc (info, pp, count)
|| ! ieee_require_atn65 (info, pp, &mangled, &mangledlen)
|| ! ieee_require_atn65 (info, pp, &class, &classlen)
|| ! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
/* FIXME: We should now track down name and change its type. */
}
@@ -2554,17 +2563,17 @@ ieee_read_cxx_misc (info, pp, count)
case 'R':
if (! ieee_read_reference (info, pp))
- return false;
+ return FALSE;
break;
}
- return true;
+ return TRUE;
}
/* Read a C++ class definition. This is a pmisc type 80 record of
category 'T'. */
-static boolean
+static bfd_boolean
ieee_read_cxx_class (info, pp, count)
struct ieee_info *info;
const bfd_byte **pp;
@@ -2591,17 +2600,17 @@ ieee_read_cxx_class (info, pp, count)
} *methods;
unsigned int methods_count, methods_alloc;
debug_type vptrbase;
- boolean ownvptr;
+ bfd_boolean ownvptr;
debug_method *dmethods;
start = *pp;
if (! ieee_require_asn (info, pp, &class))
- return false;
+ return FALSE;
--count;
if (! ieee_require_atn65 (info, pp, &tag, &taglen))
- return false;
+ return FALSE;
--count;
/* Find the C struct with this name. */
@@ -2613,7 +2622,7 @@ ieee_read_cxx_class (info, pp, count)
if (it == NULL)
{
ieee_error (info, start, _("undefined C++ object"));
- return false;
+ return FALSE;
}
dhandle = info->dhandle;
@@ -2628,7 +2637,7 @@ ieee_read_cxx_class (info, pp, count)
methods_count = 0;
methods_alloc = 0;
vptrbase = DEBUG_TYPE_NULL;
- ownvptr = false;
+ ownvptr = FALSE;
structfields = debug_get_fields (dhandle, it->type);
@@ -2640,14 +2649,14 @@ ieee_read_cxx_class (info, pp, count)
spec_start = *pp;
if (! ieee_require_asn (info, pp, &id))
- return false;
+ return FALSE;
--count;
switch (id)
{
default:
ieee_error (info, spec_start, _("unrecognized C++ object spec"));
- return false;
+ return FALSE;
case 'b':
{
@@ -2657,7 +2666,7 @@ ieee_read_cxx_class (info, pp, count)
char *basecopy;
debug_type basetype;
bfd_vma bitpos;
- boolean virtualp;
+ bfd_boolean virtualp;
enum debug_visibility visibility;
debug_baseclass baseclass;
@@ -2667,7 +2676,7 @@ ieee_read_cxx_class (info, pp, count)
|| ! ieee_require_atn65 (info, pp, &basename, &baselen)
|| ! ieee_require_asn (info, pp, &cinline)
|| ! ieee_require_atn65 (info, pp, &fieldname, &fieldlen))
- return false;
+ return FALSE;
count -= 4;
/* We have no way of recording friend information, so we
@@ -2683,7 +2692,7 @@ ieee_read_cxx_class (info, pp, count)
if ((fieldlen == 0) == (cinline == 0))
{
ieee_error (info, start, _("unsupported C++ object type"));
- return false;
+ return FALSE;
}
basecopy = savestring (basename, baselen);
@@ -2693,7 +2702,7 @@ ieee_read_cxx_class (info, pp, count)
if (basetype == DEBUG_TYPE_NULL)
{
ieee_error (info, start, _("C++ base class not defined"));
- return false;
+ return FALSE;
}
if (fieldlen == 0)
@@ -2705,7 +2714,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
ieee_error (info, start, _("C++ object has no fields"));
- return false;
+ return FALSE;
}
for (pf = structfields; *pf != DEBUG_FIELD_NULL; pf++)
@@ -2714,7 +2723,7 @@ ieee_read_cxx_class (info, pp, count)
fname = debug_get_field_name (dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (fname[0] == fieldname[0]
&& strncmp (fname, fieldname, fieldlen) == 0
&& strlen (fname) == fieldlen)
@@ -2724,16 +2733,16 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("C++ base class not found in container"));
- return false;
+ return FALSE;
}
bitpos = debug_get_field_bitpos (dhandle, *pf);
}
if ((flags & BASEFLAGS_VIRTUAL) != 0)
- virtualp = true;
+ virtualp = TRUE;
else
- virtualp = false;
+ virtualp = FALSE;
if ((flags & BASEFLAGS_PRIVATE) != 0)
visibility = DEBUG_VISIBILITY_PRIVATE;
else
@@ -2742,7 +2751,7 @@ ieee_read_cxx_class (info, pp, count)
baseclass = debug_make_baseclass (dhandle, basetype, bitpos,
virtualp, visibility);
if (baseclass == DEBUG_BASECLASS_NULL)
- return false;
+ return FALSE;
if (baseclasses_count + 1 >= baseclasses_alloc)
{
@@ -2765,7 +2774,7 @@ ieee_read_cxx_class (info, pp, count)
const char *fieldname, *mangledname;
unsigned long fieldlen, mangledlen;
char *fieldcopy;
- boolean staticp;
+ bfd_boolean staticp;
debug_type ftype;
const debug_field *pf = NULL;
enum debug_visibility visibility;
@@ -2776,12 +2785,12 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_asn (info, pp, &flags)
|| ! ieee_require_atn65 (info, pp, &fieldname, &fieldlen)
|| ! ieee_require_atn65 (info, pp, &mangledname, &mangledlen))
- return false;
+ return FALSE;
count -= 3;
fieldcopy = savestring (fieldname, fieldlen);
- staticp = (flags & CXXFLAGS_STATIC) != 0 ? true : false;
+ staticp = (flags & CXXFLAGS_STATIC) != 0 ? TRUE : FALSE;
if (staticp)
{
@@ -2810,7 +2819,7 @@ ieee_read_cxx_class (info, pp, count)
if (structfields == NULL)
{
ieee_error (info, start, _("C++ object has no fields"));
- return false;
+ return FALSE;
}
for (pf = structfields, findx = 0;
@@ -2821,7 +2830,7 @@ ieee_read_cxx_class (info, pp, count)
fname = debug_get_field_name (dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (fname[0] == mangledname[0]
&& strncmp (fname, mangledname, mangledlen) == 0
&& strlen (fname) == mangledlen)
@@ -2831,7 +2840,7 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("C++ data member not found in container"));
- return false;
+ return FALSE;
}
ftype = debug_get_field_type (dhandle, *pf);
@@ -2858,7 +2867,7 @@ ieee_read_cxx_class (info, pp, count)
}
if (ftype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
it->fslots[findx] = ftype;
ftype = debug_make_indirect_type (dhandle,
it->fslots + findx,
@@ -2866,13 +2875,13 @@ ieee_read_cxx_class (info, pp, count)
}
}
if (ftype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
ieee_error (info, start, _("unknown C++ visibility"));
- return false;
+ return FALSE;
case CXXFLAGS_VISIBILITY_PUBLIC:
visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -2906,14 +2915,14 @@ ieee_read_cxx_class (info, pp, count)
if (bitpos == (bfd_vma) -1 || bitsize == (bfd_vma) -1)
{
ieee_error (info, start, _("bad C++ field bit pos or size"));
- return false;
+ return FALSE;
}
field = debug_make_field (dhandle, fieldcopy, ftype, bitpos,
bitsize, visibility);
}
if (field == DEBUG_FIELD_NULL)
- return false;
+ return FALSE;
if (field_count + 1 >= field_alloc)
{
@@ -2937,7 +2946,7 @@ ieee_read_cxx_class (info, pp, count)
struct ieee_var *pv, *pvend;
debug_type type;
enum debug_visibility visibility;
- boolean constp, volatilep;
+ bfd_boolean constp, volatilep;
char *mangledcopy;
debug_method_variant mv;
struct ieee_method *meth;
@@ -2946,18 +2955,18 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_asn (info, pp, &flags)
|| ! ieee_require_atn65 (info, pp, &name, &namlen)
|| ! ieee_require_atn65 (info, pp, &mangled, &mangledlen))
- return false;
+ return FALSE;
count -= 3;
if (id != 'v')
voffset = 0;
else
{
if (! ieee_require_asn (info, pp, &voffset))
- return false;
+ return FALSE;
--count;
}
if (! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
--count;
/* We just ignore the control information. */
@@ -2985,20 +2994,20 @@ ieee_read_cxx_class (info, pp, count)
ieee_builtin_type (info, start,
(unsigned int) builtin_void),
(debug_type *) NULL,
- false));
+ FALSE));
}
else
{
debug_type return_type;
const debug_type *arg_types;
- boolean varargs;
+ bfd_boolean varargs;
if (debug_get_type_kind (dhandle, pv->type)
!= DEBUG_KIND_FUNCTION)
{
ieee_error (info, start,
_("bad type for C++ method function"));
- return false;
+ return FALSE;
}
return_type = debug_get_return_type (dhandle, pv->type);
@@ -3008,7 +3017,7 @@ ieee_read_cxx_class (info, pp, count)
{
ieee_error (info, start,
_("no type information for C++ method function"));
- return false;
+ return FALSE;
}
type = debug_make_method_type (dhandle, return_type, it->type,
@@ -3016,13 +3025,13 @@ ieee_read_cxx_class (info, pp, count)
varargs);
}
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (flags & CXXFLAGS_VISIBILITY)
{
default:
ieee_error (info, start, _("unknown C++ visibility"));
- return false;
+ return FALSE;
case CXXFLAGS_VISIBILITY_PUBLIC:
visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -3037,8 +3046,8 @@ ieee_read_cxx_class (info, pp, count)
break;
}
- constp = (flags & CXXFLAGS_CONST) != 0 ? true : false;
- volatilep = (flags & CXXFLAGS_VOLATILE) != 0 ? true : false;
+ constp = (flags & CXXFLAGS_CONST) != 0 ? TRUE : FALSE;
+ volatilep = (flags & CXXFLAGS_VOLATILE) != 0 ? TRUE : FALSE;
mangledcopy = savestring (mangled, mangledlen);
@@ -3047,7 +3056,7 @@ ieee_read_cxx_class (info, pp, count)
if (id == 'v')
{
ieee_error (info, start, _("C++ static virtual method"));
- return false;
+ return FALSE;
}
mv = debug_make_static_method_variant (dhandle, mangledcopy,
type, visibility,
@@ -3070,7 +3079,7 @@ ieee_read_cxx_class (info, pp, count)
vcontext);
}
if (mv == DEBUG_METHOD_VARIANT_NULL)
- return false;
+ return FALSE;
for (meth = methods, im = 0; im < methods_count; meth++, im++)
if (meth->namlen == namlen
@@ -3116,7 +3125,7 @@ ieee_read_cxx_class (info, pp, count)
/* We have no way to store this information, so we just
ignore it. */
if (! ieee_require_asn (info, pp, &spec))
- return false;
+ return FALSE;
--count;
if ((spec & 4) != 0)
{
@@ -3126,7 +3135,7 @@ ieee_read_cxx_class (info, pp, count)
if (! ieee_require_atn65 (info, pp, &filename, &filenamlen)
|| ! ieee_require_asn (info, pp, &lineno))
- return false;
+ return FALSE;
count -= 2;
}
else if ((spec & 8) != 0)
@@ -3135,14 +3144,14 @@ ieee_read_cxx_class (info, pp, count)
unsigned long mangledlen;
if (! ieee_require_atn65 (info, pp, &mangled, &mangledlen))
- return false;
+ return FALSE;
--count;
}
else
{
ieee_error (info, start,
_("unrecognized C++ object overhead spec"));
- return false;
+ return FALSE;
}
}
break;
@@ -3159,7 +3168,7 @@ ieee_read_cxx_class (info, pp, count)
|| ! ieee_require_asn (info, pp, &vsize)
|| ! ieee_require_atn65 (info, pp, &basename, &baselen)
|| ! ieee_require_asn (info, pp, &control))
- return false;
+ return FALSE;
count -= 4;
/* We just ignore the control number. We don't care what
@@ -3169,7 +3178,7 @@ ieee_read_cxx_class (info, pp, count)
/* FIXME: We can't handle multiple virtual table pointers. */
if (baselen == 0)
- ownvptr = true;
+ ownvptr = TRUE;
else
{
char *basecopy;
@@ -3181,7 +3190,7 @@ ieee_read_cxx_class (info, pp, count)
if (vptrbase == DEBUG_TYPE_NULL)
{
ieee_error (info, start, _("undefined C++ vtable"));
- return false;
+ return FALSE;
}
}
}
@@ -3208,7 +3217,7 @@ ieee_read_cxx_class (info, pp, count)
dmethods[i] = debug_make_method (dhandle, namcopy,
methods[i].variants);
if (dmethods[i] == DEBUG_METHOD_NULL)
- return false;
+ return FALSE;
}
dmethods[i] = DEBUG_METHOD_NULL;
free (methods);
@@ -3224,14 +3233,14 @@ ieee_read_cxx_class (info, pp, count)
fields, baseclasses, dmethods,
vptrbase, ownvptr);
if (it->slot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Read C++ default argument value and reference type information. */
-static boolean
+static bfd_boolean
ieee_read_cxx_defaults (info, pp, count)
struct ieee_info *info;
const bfd_byte **pp;
@@ -3252,12 +3261,12 @@ ieee_read_cxx_defaults (info, pp, count)
|| info->blockstack.bsp[-1].fnindx == (unsigned int) -1)
{
ieee_error (info, start, _("C++ default values not in a function"));
- return false;
+ return FALSE;
}
if (! ieee_require_atn65 (info, pp, &fnname, &fnlen)
|| ! ieee_require_asn (info, pp, &defcount))
- return false;
+ return FALSE;
count -= 2;
while (defcount-- > 0)
@@ -3267,7 +3276,7 @@ ieee_read_cxx_defaults (info, pp, count)
unsigned long strvallen;
if (! ieee_require_asn (info, pp, &type))
- return false;
+ return FALSE;
--count;
switch (type)
@@ -3279,20 +3288,20 @@ ieee_read_cxx_defaults (info, pp, count)
case 1:
case 2:
if (! ieee_require_asn (info, pp, &val))
- return false;
+ return FALSE;
--count;
break;
case 3:
case 7:
if (! ieee_require_atn65 (info, pp, &strval, &strvallen))
- return false;
+ return FALSE;
--count;
break;
default:
ieee_error (info, start, _("unrecognized C++ default type"));
- return false;
+ return FALSE;
}
/* We have no way to record the default argument values, so we
@@ -3314,7 +3323,7 @@ ieee_read_cxx_defaults (info, pp, count)
debug_type target;
if (! ieee_require_asn (info, pp, &indx))
- return false;
+ return FALSE;
/* The index is 1 based. */
--indx;
if (arg_slots == NULL
@@ -3323,22 +3332,22 @@ ieee_read_cxx_defaults (info, pp, count)
!= DEBUG_KIND_POINTER))
{
ieee_error (info, start, _("reference parameter is not a pointer"));
- return false;
+ return FALSE;
}
target = debug_get_target_type (dhandle, arg_slots[indx]);
arg_slots[indx] = debug_make_reference_type (dhandle, target);
if (arg_slots[indx] == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Read a C++ reference definition. */
-static boolean
+static bfd_boolean
ieee_read_reference (info, pp)
struct ieee_info *info;
const bfd_byte **pp;
@@ -3353,18 +3362,18 @@ ieee_read_reference (info, pp)
start = *pp;
if (! ieee_require_asn (info, pp, &flags))
- return false;
+ return FALSE;
/* Giving the class name before the member name is in an addendum to
the spec. */
if (flags == 3)
{
if (! ieee_require_atn65 (info, pp, &class, &classlen))
- return false;
+ return FALSE;
}
if (! ieee_require_atn65 (info, pp, &name, &namlen))
- return false;
+ return FALSE;
pslot = NULL;
if (flags != 3)
@@ -3393,7 +3402,7 @@ ieee_read_reference (info, pp)
for (i = (int) vars->alloc - 1; i >= 0; i--)
{
- boolean found;
+ bfd_boolean found;
pv = vars->vars + i;
@@ -3402,33 +3411,33 @@ ieee_read_reference (info, pp)
|| strncmp (pv->name, name, namlen) != 0)
continue;
- found = false;
+ found = FALSE;
switch (flags)
{
default:
ieee_error (info, start,
_("unrecognized C++ reference type"));
- return false;
+ return FALSE;
case 0:
/* Global variable or function. */
if (pv->kind == IEEE_GLOBAL
|| pv->kind == IEEE_EXTERNAL
|| pv->kind == IEEE_FUNCTION)
- found = true;
+ found = TRUE;
break;
case 1:
/* Global static variable or function. */
if (pv->kind == IEEE_STATIC
|| pv->kind == IEEE_FUNCTION)
- found = true;
+ found = TRUE;
break;
case 2:
/* Local variable. */
if (pv->kind == IEEE_LOCAL)
- found = true;
+ found = TRUE;
break;
}
@@ -3463,7 +3472,7 @@ ieee_read_reference (info, pp)
{
ieee_error (info, start,
"C++ reference in class with no fields");
- return false;
+ return FALSE;
}
for (findx = 0; *pf != DEBUG_FIELD_NULL; pf++, findx++)
@@ -3472,7 +3481,7 @@ ieee_read_reference (info, pp)
fname = debug_get_field_name (info->dhandle, *pf);
if (fname == NULL)
- return false;
+ return FALSE;
if (strncmp (fname, name, namlen) == 0
&& strlen (fname) == namlen)
{
@@ -3490,7 +3499,7 @@ ieee_read_reference (info, pp)
if (pslot == NULL)
{
ieee_error (info, start, _("C++ reference not found"));
- return false;
+ return FALSE;
}
/* We allocated the type of the object as an indirect type pointing
@@ -3498,20 +3507,20 @@ ieee_read_reference (info, pp)
if (debug_get_type_kind (info->dhandle, *pslot) != DEBUG_KIND_POINTER)
{
ieee_error (info, start, _("C++ reference is not pointer"));
- return false;
+ return FALSE;
}
target = debug_get_target_type (info->dhandle, *pslot);
*pslot = debug_make_reference_type (info->dhandle, target);
if (*pslot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Require an ASN record. */
-static boolean
+static bfd_boolean
ieee_require_asn (info, pp, pv)
struct ieee_info *info;
const bfd_byte **pp;
@@ -3527,7 +3536,7 @@ ieee_require_asn (info, pp, pv)
if (c != ieee_e2_first_byte_enum)
{
ieee_error (info, start, _("missing required ASN"));
- return false;
+ return FALSE;
}
++*pp;
@@ -3535,20 +3544,20 @@ ieee_require_asn (info, pp, pv)
if (c != ieee_asn_record_enum)
{
ieee_error (info, start, _("missing required ASN"));
- return false;
+ return FALSE;
}
++*pp;
/* Just ignore the variable index. */
if (! ieee_read_number (info, pp, &varindx))
- return false;
+ return FALSE;
return ieee_read_expression (info, pp, pv);
}
/* Require an ATN65 record. */
-static boolean
+static bfd_boolean
ieee_require_atn65 (info, pp, pname, pnamlen)
struct ieee_info *info;
const bfd_byte **pp;
@@ -3565,7 +3574,7 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
if (c != ieee_at_record_enum)
{
ieee_error (info, start, _("missing required ATN65"));
- return false;
+ return FALSE;
}
++*pp;
@@ -3573,21 +3582,21 @@ ieee_require_atn65 (info, pp, pname, pnamlen)
if (c != ieee_atn_record_enum)
{
ieee_error (info, start, _("missing required ATN65"));
- return false;
+ return FALSE;
}
++*pp;
if (! ieee_read_number (info, pp, &name_indx)
|| ! ieee_read_number (info, pp, &type_indx)
|| ! ieee_read_number (info, pp, &atn_code))
- return false;
+ return FALSE;
/* Just ignore name_indx. */
if (type_indx != 0 || atn_code != 65)
{
ieee_error (info, start, _("bad ATN65 record"));
- return false;
+ return FALSE;
}
return ieee_read_id (info, pp, pname, pnamlen);
@@ -3709,7 +3718,7 @@ struct ieee_type_class
class. */
const char *vclass;
/* Whether this class holds its own virtual table. */
- boolean ownvptr;
+ bfd_boolean ownvptr;
/* The largest virtual table offset seen so far. */
bfd_vma voffset;
/* The current method. */
@@ -3800,7 +3809,7 @@ struct ieee_defined_enum
/* Type index. */
unsigned int indx;
/* Whether this enum has been defined. */
- boolean defined;
+ bfd_boolean defined;
/* Tag. */
const char *tag;
/* Names. */
@@ -3852,7 +3861,7 @@ struct ieee_pending_parm
/* Type index. */
unsigned int type;
/* Whether the type is a reference. */
- boolean referencep;
+ bfd_boolean referencep;
/* Kind. */
enum debug_parm_kind kind;
/* Value. */
@@ -3867,7 +3876,7 @@ struct ieee_handle
bfd *abfd;
/* Whether we got an error in a subroutine called via traverse or
map_over_sections. */
- boolean error;
+ bfd_boolean error;
/* Current data buffer list. */
struct ieee_buflist *current;
/* Current data buffer. */
@@ -3945,111 +3954,154 @@ struct ieee_handle
bfd_vma highaddr;
};
-static boolean ieee_init_buffer
+static bfd_boolean ieee_init_buffer
PARAMS ((struct ieee_handle *, struct ieee_buflist *));
-static boolean ieee_change_buffer
+static bfd_boolean ieee_change_buffer
PARAMS ((struct ieee_handle *, struct ieee_buflist *));
-static boolean ieee_append_buffer
+static bfd_boolean ieee_append_buffer
PARAMS ((struct ieee_handle *, struct ieee_buflist *,
struct ieee_buflist *));
-static boolean ieee_real_write_byte PARAMS ((struct ieee_handle *, int));
-static boolean ieee_write_2bytes PARAMS ((struct ieee_handle *, int));
-static boolean ieee_write_number PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_write_id PARAMS ((struct ieee_handle *, const char *));
-static boolean ieee_write_asn
+static bfd_boolean ieee_real_write_byte
+ PARAMS ((struct ieee_handle *, int));
+static bfd_boolean ieee_write_2bytes
+ PARAMS ((struct ieee_handle *, int));
+static bfd_boolean ieee_write_number
+ PARAMS ((struct ieee_handle *, bfd_vma));
+static bfd_boolean ieee_write_id
+ PARAMS ((struct ieee_handle *, const char *));
+static bfd_boolean ieee_write_asn
PARAMS ((struct ieee_handle *, unsigned int, bfd_vma));
-static boolean ieee_write_atn65
+static bfd_boolean ieee_write_atn65
PARAMS ((struct ieee_handle *, unsigned int, const char *));
-static boolean ieee_push_type
- PARAMS ((struct ieee_handle *, unsigned int, unsigned int, boolean,
- boolean));
-static unsigned int ieee_pop_type PARAMS ((struct ieee_handle *));
-static void ieee_pop_unused_type PARAMS ((struct ieee_handle *));
+static bfd_boolean ieee_push_type
+ PARAMS ((struct ieee_handle *, unsigned int, unsigned int, bfd_boolean,
+ bfd_boolean));
+static unsigned int ieee_pop_type
+ PARAMS ((struct ieee_handle *));
+static void ieee_pop_unused_type
+ PARAMS ((struct ieee_handle *));
static unsigned int ieee_pop_type_used
- PARAMS ((struct ieee_handle *, boolean));
-static boolean ieee_add_range
- PARAMS ((struct ieee_handle *, boolean, bfd_vma, bfd_vma));
-static boolean ieee_start_range PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_end_range PARAMS ((struct ieee_handle *, bfd_vma));
-static boolean ieee_define_type
- PARAMS ((struct ieee_handle *, unsigned int, boolean, boolean));
-static boolean ieee_define_named_type
+ PARAMS ((struct ieee_handle *, bfd_boolean));
+static bfd_boolean ieee_add_range
+ PARAMS ((struct ieee_handle *, bfd_boolean, bfd_vma, bfd_vma));
+static bfd_boolean ieee_start_range
+ PARAMS ((struct ieee_handle *, bfd_vma));
+static bfd_boolean ieee_end_range
+ PARAMS ((struct ieee_handle *, bfd_vma));
+static bfd_boolean ieee_define_type
+ PARAMS ((struct ieee_handle *, unsigned int, bfd_boolean, bfd_boolean));
+static bfd_boolean ieee_define_named_type
PARAMS ((struct ieee_handle *, const char *, unsigned int, unsigned int,
- boolean, boolean, struct ieee_buflist *));
+ bfd_boolean, bfd_boolean, struct ieee_buflist *));
static struct ieee_modified_type *ieee_get_modified_info
PARAMS ((struct ieee_handle *, unsigned int));
static struct bfd_hash_entry *ieee_name_type_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-static boolean ieee_write_undefined_tag
+static bfd_boolean ieee_write_undefined_tag
PARAMS ((struct ieee_name_type_hash_entry *, PTR));
-static boolean ieee_finish_compilation_unit PARAMS ((struct ieee_handle *));
-static void ieee_add_bb11_blocks PARAMS ((bfd *, asection *, PTR));
-static boolean ieee_add_bb11
+static bfd_boolean ieee_finish_compilation_unit
+ PARAMS ((struct ieee_handle *));
+static void ieee_add_bb11_blocks
+ PARAMS ((bfd *, asection *, PTR));
+static bfd_boolean ieee_add_bb11
PARAMS ((struct ieee_handle *, asection *, bfd_vma, bfd_vma));
-static boolean ieee_output_pending_parms PARAMS ((struct ieee_handle *));
-static unsigned int ieee_vis_to_flags PARAMS ((enum debug_visibility));
-static boolean ieee_class_method_var
- PARAMS ((struct ieee_handle *, const char *, enum debug_visibility, boolean,
- boolean, boolean, bfd_vma, boolean));
-
-static boolean ieee_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean ieee_start_source PARAMS ((PTR, const char *));
-static boolean ieee_empty_type PARAMS ((PTR));
-static boolean ieee_void_type PARAMS ((PTR));
-static boolean ieee_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean ieee_float_type PARAMS ((PTR, unsigned int));
-static boolean ieee_complex_type PARAMS ((PTR, unsigned int));
-static boolean ieee_bool_type PARAMS ((PTR, unsigned int));
-static boolean ieee_enum_type
+static bfd_boolean ieee_output_pending_parms
+ PARAMS ((struct ieee_handle *));
+static unsigned int ieee_vis_to_flags
+ PARAMS ((enum debug_visibility));
+static bfd_boolean ieee_class_method_var
+ PARAMS ((struct ieee_handle *, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean, bfd_boolean, bfd_vma, bfd_boolean));
+
+static bfd_boolean ieee_start_compilation_unit
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_start_source
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_empty_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_void_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_int_type
+ PARAMS ((PTR, unsigned int, bfd_boolean));
+static bfd_boolean ieee_float_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean ieee_complex_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean ieee_bool_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean ieee_enum_type
PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean ieee_pointer_type PARAMS ((PTR));
-static boolean ieee_function_type PARAMS ((PTR, int, boolean));
-static boolean ieee_reference_type PARAMS ((PTR));
-static boolean ieee_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean ieee_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean ieee_set_type PARAMS ((PTR, boolean));
-static boolean ieee_offset_type PARAMS ((PTR));
-static boolean ieee_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean ieee_const_type PARAMS ((PTR));
-static boolean ieee_volatile_type PARAMS ((PTR));
-static boolean ieee_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean ieee_struct_field
+static bfd_boolean ieee_pointer_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_function_type
+ PARAMS ((PTR, int, bfd_boolean));
+static bfd_boolean ieee_reference_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_range_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+static bfd_boolean ieee_array_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
+static bfd_boolean ieee_set_type
+ PARAMS ((PTR, bfd_boolean));
+static bfd_boolean ieee_offset_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_method_type
+ PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
+static bfd_boolean ieee_const_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_volatile_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_start_struct_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+static bfd_boolean ieee_struct_field
PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean ieee_end_struct_type PARAMS ((PTR));
-static boolean ieee_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean ieee_class_static_member
+static bfd_boolean ieee_end_struct_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_start_class_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int, bfd_boolean,
+ bfd_boolean));
+static bfd_boolean ieee_class_static_member
PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean ieee_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean ieee_class_start_method PARAMS ((PTR, const char *));
-static boolean ieee_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean ieee_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean ieee_class_end_method PARAMS ((PTR));
-static boolean ieee_end_class_type PARAMS ((PTR));
-static boolean ieee_typedef_type PARAMS ((PTR, const char *));
-static boolean ieee_tag_type
+static bfd_boolean ieee_class_baseclass
+ PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
+static bfd_boolean ieee_class_start_method
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_class_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean));
+static bfd_boolean ieee_class_static_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean));
+static bfd_boolean ieee_class_end_method
+ PARAMS ((PTR));
+static bfd_boolean ieee_end_class_type
+ PARAMS ((PTR));
+static bfd_boolean ieee_typedef_type
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_tag_type
PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean ieee_typdef PARAMS ((PTR, const char *));
-static boolean ieee_tag PARAMS ((PTR, const char *));
-static boolean ieee_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean ieee_float_constant PARAMS ((PTR, const char *, double));
-static boolean ieee_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean ieee_variable
+static bfd_boolean ieee_typdef
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_tag
+ PARAMS ((PTR, const char *));
+static bfd_boolean ieee_int_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean ieee_float_constant
+ PARAMS ((PTR, const char *, double));
+static bfd_boolean ieee_typed_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean ieee_variable
PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean ieee_start_function PARAMS ((PTR, const char *, boolean));
-static boolean ieee_function_parameter
+static bfd_boolean ieee_start_function
+ PARAMS ((PTR, const char *, bfd_boolean));
+static bfd_boolean ieee_function_parameter
PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean ieee_start_block PARAMS ((PTR, bfd_vma));
-static boolean ieee_end_block PARAMS ((PTR, bfd_vma));
-static boolean ieee_end_function PARAMS ((PTR));
-static boolean ieee_lineno
+static bfd_boolean ieee_start_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean ieee_end_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean ieee_end_function
+ PARAMS ((PTR));
+static bfd_boolean ieee_lineno
PARAMS ((PTR, const char *, unsigned long, bfd_vma));
static const struct debug_write_fns ieee_fns =
@@ -4102,14 +4154,14 @@ static const struct debug_write_fns ieee_fns =
/* Initialize a buffer to be empty. */
-static boolean
+static bfd_boolean
ieee_init_buffer (info, buflist)
struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist;
{
buflist->head = NULL;
buflist->tail = NULL;
- return true;
+ return TRUE;
}
/* See whether a buffer list has any data. */
@@ -4118,7 +4170,7 @@ ieee_init_buffer (info, buflist)
/* Change the current buffer to a specified buffer chain. */
-static boolean
+static bfd_boolean
ieee_change_buffer (info, buflist)
struct ieee_handle *info;
struct ieee_buflist *buflist;
@@ -4137,12 +4189,12 @@ ieee_change_buffer (info, buflist)
info->current = buflist;
info->curbuf = buflist->tail;
- return true;
+ return TRUE;
}
/* Append a buffer chain. */
-static boolean
+static bfd_boolean
ieee_append_buffer (info, mainbuf, newbuf)
struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf;
@@ -4156,7 +4208,7 @@ ieee_append_buffer (info, mainbuf, newbuf)
mainbuf->tail->next = newbuf->head;
mainbuf->tail = newbuf->tail;
}
- return true;
+ return TRUE;
}
/* Write a byte into the buffer. We use a macro for speed and a
@@ -4164,10 +4216,10 @@ ieee_append_buffer (info, mainbuf, newbuf)
#define ieee_write_byte(info, b) \
((info)->curbuf->c < IEEE_BUFSIZE \
- ? ((info)->curbuf->buf[(info)->curbuf->c++] = (b), true) \
+ ? ((info)->curbuf->buf[(info)->curbuf->c++] = (b), TRUE) \
: ieee_real_write_byte ((info), (b)))
-static boolean
+static bfd_boolean
ieee_real_write_byte (info, b)
struct ieee_handle *info;
int b;
@@ -4190,12 +4242,12 @@ ieee_real_write_byte (info, b)
info->curbuf->buf[info->curbuf->c] = b;
++info->curbuf->c;
- return true;
+ return TRUE;
}
/* Write out two bytes. */
-static boolean
+static bfd_boolean
ieee_write_2bytes (info, i)
struct ieee_handle *info;
int i;
@@ -4206,7 +4258,7 @@ ieee_write_2bytes (info, i)
/* Write out an integer. */
-static boolean
+static bfd_boolean
ieee_write_number (info, v)
struct ieee_handle *info;
bfd_vma v;
@@ -4234,23 +4286,23 @@ ieee_write_number (info, v)
fprintf (stderr, _("IEEE numeric overflow: 0x"));
fprintf_vma (stderr, v);
fprintf (stderr, "\n");
- return false;
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_number_repeat_start_enum + c))
- return false;
+ return FALSE;
for (; c > 0; --c, ++p)
{
if (! ieee_write_byte (info, *p))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Write out a string. */
-static boolean
+static bfd_boolean
ieee_write_id (info, s)
struct ieee_handle *info;
const char *s;
@@ -4261,36 +4313,36 @@ ieee_write_id (info, s)
if (len <= 0x7f)
{
if (! ieee_write_byte (info, len))
- return false;
+ return FALSE;
}
else if (len <= 0xff)
{
if (! ieee_write_byte (info, (int) ieee_extension_length_1_enum)
|| ! ieee_write_byte (info, len))
- return false;
+ return FALSE;
}
else if (len <= 0xffff)
{
if (! ieee_write_byte (info, (int) ieee_extension_length_2_enum)
|| ! ieee_write_2bytes (info, len))
- return false;
+ return FALSE;
}
else
{
fprintf (stderr, _("IEEE string length overflow: %u\n"), len);
- return false;
+ return FALSE;
}
for (; *s != '\0'; s++)
if (! ieee_write_byte (info, *s))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Write out an ASN record. */
-static boolean
+static bfd_boolean
ieee_write_asn (info, indx, val)
struct ieee_handle *info;
unsigned int indx;
@@ -4303,7 +4355,7 @@ ieee_write_asn (info, indx, val)
/* Write out an ATN65 record. */
-static boolean
+static bfd_boolean
ieee_write_atn65 (info, indx, s)
struct ieee_handle *info;
unsigned int indx;
@@ -4318,13 +4370,13 @@ ieee_write_atn65 (info, indx, s)
/* Push a type index onto the type stack. */
-static boolean
+static bfd_boolean
ieee_push_type (info, indx, size, unsignedp, localp)
struct ieee_handle *info;
unsigned int indx;
unsigned int size;
- boolean unsignedp;
- boolean localp;
+ bfd_boolean unsignedp;
+ bfd_boolean localp;
{
struct ieee_type_stack *ts;
@@ -4339,7 +4391,7 @@ ieee_push_type (info, indx, size, unsignedp, localp)
ts->next = info->type_stack;
info->type_stack = ts;
- return true;
+ return TRUE;
}
/* Pop a type index off the type stack. */
@@ -4348,7 +4400,7 @@ static unsigned int
ieee_pop_type (info)
struct ieee_handle *info;
{
- return ieee_pop_type_used (info, true);
+ return ieee_pop_type_used (info, TRUE);
}
/* Pop an unused type index off the type stack. */
@@ -4357,7 +4409,7 @@ static void
ieee_pop_unused_type (info)
struct ieee_handle *info;
{
- (void) ieee_pop_type_used (info, false);
+ (void) ieee_pop_type_used (info, FALSE);
}
/* Pop a used or unused type index off the type stack. */
@@ -4365,7 +4417,7 @@ ieee_pop_unused_type (info)
static unsigned int
ieee_pop_type_used (info, used)
struct ieee_handle *info;
- boolean used;
+ bfd_boolean used;
{
struct ieee_type_stack *ts;
unsigned int ret;
@@ -4389,7 +4441,7 @@ ieee_pop_type_used (info, used)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
buflist = &info->types;
}
@@ -4403,13 +4455,13 @@ ieee_pop_type_used (info, used)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
buflist = &info->global_types;
}
if (! ieee_append_buffer (info, buflist, &ts->type.fndef))
- return false;
+ return FALSE;
}
ret = ts->type.indx;
@@ -4420,17 +4472,17 @@ ieee_pop_type_used (info, used)
/* Add a range of bytes included in the current compilation unit. */
-static boolean
+static bfd_boolean
ieee_add_range (info, global, low, high)
struct ieee_handle *info;
- boolean global;
+ bfd_boolean global;
bfd_vma low;
bfd_vma high;
{
struct ieee_range **plist, *r, **pr;
if (low == (bfd_vma) -1 || high == (bfd_vma) -1 || low == high)
- return true;
+ return TRUE;
if (global)
plist = &info->global_ranges;
@@ -4457,7 +4509,7 @@ ieee_add_range (info, global, low, high)
free (*pr);
*pr = n;
}
- return true;
+ return TRUE;
}
}
@@ -4474,12 +4526,12 @@ ieee_add_range (info, global, low, high)
r->next = *pr;
*pr = r;
- return true;
+ return TRUE;
}
/* Start a new range for which we only have the low address. */
-static boolean
+static bfd_boolean
ieee_start_range (info, low)
struct ieee_handle *info;
bfd_vma low;
@@ -4491,12 +4543,12 @@ ieee_start_range (info, low)
r->low = low;
r->next = info->pending_ranges;
info->pending_ranges = r;
- return true;
+ return TRUE;
}
/* Finish a range started by ieee_start_range. */
-static boolean
+static bfd_boolean
ieee_end_range (info, high)
struct ieee_handle *info;
bfd_vma high;
@@ -4509,17 +4561,17 @@ ieee_end_range (info, high)
low = r->low;
info->pending_ranges = r->next;
free (r);
- return ieee_add_range (info, false, low, high);
+ return ieee_add_range (info, FALSE, low, high);
}
/* Start defining a type. */
-static boolean
+static bfd_boolean
ieee_define_type (info, size, unsignedp, localp)
struct ieee_handle *info;
unsigned int size;
- boolean unsignedp;
- boolean localp;
+ bfd_boolean unsignedp;
+ bfd_boolean localp;
{
return ieee_define_named_type (info, (const char *) NULL,
(unsigned int) -1, size, unsignedp,
@@ -4528,14 +4580,14 @@ ieee_define_type (info, size, unsignedp, localp)
/* Start defining a named type. */
-static boolean
+static bfd_boolean
ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
struct ieee_handle *info;
const char *name;
unsigned int indx;
unsigned int size;
- boolean unsignedp;
- boolean localp;
+ bfd_boolean unsignedp;
+ bfd_boolean localp;
struct ieee_buflist *buflist;
{
unsigned int type_indx;
@@ -4561,14 +4613,14 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
if (buflist != NULL)
{
if (! ieee_change_buffer (info, buflist))
- return false;
+ return FALSE;
}
else if (localp)
{
if (! ieee_buffer_emptyp (&info->types))
{
if (! ieee_change_buffer (info, &info->types))
- return false;
+ return FALSE;
}
else
{
@@ -4577,7 +4629,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
}
else
@@ -4585,7 +4637,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
if (! ieee_buffer_emptyp (&info->global_types))
{
if (! ieee_change_buffer (info, &info->global_types))
- return false;
+ return FALSE;
}
else
{
@@ -4594,7 +4646,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
}
@@ -4602,7 +4654,7 @@ ieee_define_named_type (info, name, indx, size, unsignedp, localp, buflist)
write out the start of a TY record. The caller will then finish
the TY record. */
if (! ieee_push_type (info, type_indx, size, unsignedp, localp))
- return false;
+ return FALSE;
return (ieee_write_byte (info, (int) ieee_nn_record)
&& ieee_write_number (info, name_indx)
@@ -4684,12 +4736,12 @@ ieee_name_type_newfunc (entry, table, string)
#define ieee_name_type_hash_traverse(table, func, info) \
(bfd_hash_traverse \
(&(table)->root, \
- (boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
+ (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) (func), \
(info)))
/* The general routine to write out IEEE debugging information. */
-boolean
+bfd_boolean
write_ieee_debugging_info (abfd, dhandle)
bfd *abfd;
PTR dhandle;
@@ -4706,7 +4758,7 @@ write_ieee_debugging_info (abfd, dhandle)
if (! bfd_hash_table_init (&info.typedefs.root, ieee_name_type_newfunc)
|| ! bfd_hash_table_init (&info.tags.root, ieee_name_type_newfunc))
- return false;
+ return FALSE;
if (! ieee_init_buffer (&info, &info.global_types)
|| ! ieee_init_buffer (&info, &info.data)
@@ -4716,24 +4768,24 @@ write_ieee_debugging_info (abfd, dhandle)
|| ! ieee_init_buffer (&info, &info.linenos)
|| ! ieee_init_buffer (&info, &info.fntype)
|| ! ieee_init_buffer (&info, &info.fnargs))
- return false;
+ return FALSE;
if (! debug_write (dhandle, &ieee_fns, (PTR) &info))
- return false;
+ return FALSE;
if (info.filename != NULL)
{
if (! ieee_finish_compilation_unit (&info))
- return false;
+ return FALSE;
}
/* Put any undefined tags in the global typedef information. */
- info.error = false;
+ info.error = FALSE;
ieee_name_type_hash_traverse (&info.tags,
ieee_write_undefined_tag,
(PTR) &info);
if (info.error)
- return false;
+ return FALSE;
/* Prepend the global typedef information to the other data. */
if (! ieee_buffer_emptyp (&info.global_types))
@@ -4751,29 +4803,29 @@ write_ieee_debugging_info (abfd, dhandle)
|| ! ieee_write_number (&info, 'P')
|| ! ieee_write_number (&info, (int) builtin_void + 32)
|| ! ieee_write_byte (&info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (! ieee_append_buffer (&info, &info.global_types, &info.data))
- return false;
+ return FALSE;
info.data = info.global_types;
}
/* Make sure that we have declare BB11 blocks for each range in the
file. They are added to info->vars. */
- info.error = false;
+ info.error = FALSE;
if (! ieee_init_buffer (&info, &info.vars))
- return false;
+ return FALSE;
bfd_map_over_sections (abfd, ieee_add_bb11_blocks, (PTR) &info);
if (info.error)
- return false;
+ return FALSE;
if (! ieee_buffer_emptyp (&info.vars))
{
if (! ieee_change_buffer (&info, &info.vars)
|| ! ieee_write_byte (&info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (! ieee_append_buffer (&info, &info.data, &info.vars))
- return false;
+ return FALSE;
}
/* Now all the data is in info.data. Write it out to the BFD. We
@@ -4783,7 +4835,7 @@ write_ieee_debugging_info (abfd, dhandle)
if (ieee_buffer_emptyp (&info.data))
{
/* There is no debugging information. */
- return true;
+ return TRUE;
}
err = NULL;
s = bfd_make_section (abfd, ".debug");
@@ -4824,19 +4876,19 @@ write_ieee_debugging_info (abfd, dhandle)
{
fprintf (stderr, "%s: %s: %s\n", bfd_get_filename (abfd), err,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
bfd_hash_table_free (&info.typedefs.root);
bfd_hash_table_free (&info.tags.root);
- return true;
+ return TRUE;
}
/* Write out information for an undefined tag. This is called via
ieee_name_type_hash_traverse. */
-static boolean
+static bfd_boolean
ieee_write_undefined_tag (h, p)
struct ieee_name_type_hash_entry *h;
PTR p;
@@ -4860,16 +4912,16 @@ ieee_write_undefined_tag (h, p)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
else
{
if (! ieee_change_buffer (info, &info->global_types))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
@@ -4883,16 +4935,16 @@ ieee_write_undefined_tag (h, p)
|| ! ieee_write_byte (info, 0xce)
|| ! ieee_write_number (info, name_indx))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
switch (nt->kind)
{
default:
abort ();
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
case DEBUG_KIND_STRUCT:
case DEBUG_KIND_CLASS:
code = 'S';
@@ -4908,17 +4960,17 @@ ieee_write_undefined_tag (h, p)
if (! ieee_write_number (info, code)
|| ! ieee_write_number (info, 0))
{
- info->error = true;
- return false;
+ info->error = TRUE;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Start writing out information for a compilation unit. */
-static boolean
+static bfd_boolean
ieee_start_compilation_unit (p, filename)
PTR p;
const char *filename;
@@ -4934,7 +4986,7 @@ ieee_start_compilation_unit (p, filename)
if (info->filename != NULL)
{
if (! ieee_finish_compilation_unit (info))
- return false;
+ return FALSE;
}
info->filename = filename;
@@ -4965,7 +5017,7 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_init_buffer (info, &info->vars)
|| ! ieee_init_buffer (info, &info->cxx)
|| ! ieee_init_buffer (info, &info->linenos))
- return false;
+ return FALSE;
info->ranges = NULL;
/* Always include a BB1 and a BB3 block. That is what the output of
@@ -4975,7 +5027,7 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
nindx = info->name_indx;
++info->name_indx;
@@ -4984,14 +5036,14 @@ ieee_start_compilation_unit (p, filename)
|| ! ieee_write_byte (info, 3)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Finish up a compilation unit. */
-static boolean
+static bfd_boolean
ieee_finish_compilation_unit (info)
struct ieee_handle *info;
{
@@ -5001,7 +5053,7 @@ ieee_finish_compilation_unit (info)
{
if (! ieee_change_buffer (info, &info->types)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->cxx))
@@ -5010,7 +5062,7 @@ ieee_finish_compilation_unit (info)
variable information. */
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
/* We put the pmisc records in a dummy procedure, just as the
MRI compiler does. */
@@ -5025,45 +5077,45 @@ ieee_finish_compilation_unit (info)
|| ! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, info->highaddr - 1))
- return false;
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->vars))
{
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
if (info->pending_lineno_filename != NULL)
{
/* Force out the pending line number. */
if (! ieee_lineno ((PTR) info, (const char *) NULL, 0, (bfd_vma) -1))
- return false;
+ return FALSE;
}
if (! ieee_buffer_emptyp (&info->linenos))
{
if (! ieee_change_buffer (info, &info->linenos)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (strcmp (info->filename, info->lineno_filename) != 0)
{
/* We were not in the main file. We just closed the
included line number block, and now we must close the
main line number block. */
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
}
}
if (! ieee_append_buffer (info, &info->data, &info->types)
|| ! ieee_append_buffer (info, &info->data, &info->vars)
|| ! ieee_append_buffer (info, &info->data, &info->linenos))
- return false;
+ return FALSE;
/* Build BB10/BB11 blocks based on the ranges we recorded. */
if (! ieee_change_buffer (info, &info->data))
- return false;
+ return FALSE;
if (! ieee_write_byte (info, (int) ieee_bb_record_enum)
|| ! ieee_write_byte (info, 10)
@@ -5072,7 +5124,7 @@ ieee_finish_compilation_unit (info)
|| ! ieee_write_id (info, "")
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, "GNU objcopy"))
- return false;
+ return FALSE;
for (r = info->ranges; r != NULL; r = r->next)
{
@@ -5125,17 +5177,17 @@ ieee_finish_compilation_unit (info)
|| ! ieee_write_number (info, low)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, high - low))
- return false;
+ return FALSE;
/* Add this range to the list of global ranges. */
- if (! ieee_add_range (info, true, low, high))
- return false;
+ if (! ieee_add_range (info, TRUE, low, high))
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Add BB11 blocks describing each range that we have not already
@@ -5165,7 +5217,7 @@ ieee_add_bb11_blocks (abfd, sec, data)
if (r == NULL || r->low >= high)
{
if (! ieee_add_bb11 (info, sec, low, high))
- info->error = true;
+ info->error = TRUE;
return;
}
@@ -5174,7 +5226,7 @@ ieee_add_bb11_blocks (abfd, sec, data)
{
if (! ieee_add_bb11 (info, sec, low, r->low))
{
- info->error = true;
+ info->error = TRUE;
return;
}
}
@@ -5186,7 +5238,7 @@ ieee_add_bb11_blocks (abfd, sec, data)
/* Add a single BB11 block for a range. We add it to info->vars. */
-static boolean
+static bfd_boolean
ieee_add_bb11 (info, sec, low, high)
struct ieee_handle *info;
asection *sec;
@@ -5198,7 +5250,7 @@ ieee_add_bb11 (info, sec, low, high)
if (! ieee_buffer_emptyp (&info->vars))
{
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
}
else
{
@@ -5239,7 +5291,7 @@ ieee_add_bb11 (info, sec, low, high)
|| ! ieee_write_id (info, "")
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, "GNU objcopy"))
- return false;
+ return FALSE;
free (c);
}
@@ -5260,9 +5312,9 @@ ieee_add_bb11 (info, sec, low, high)
|| ! ieee_write_number (info, low)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, high - low))
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Start recording information from a particular source file. This is
@@ -5271,43 +5323,43 @@ ieee_add_bb11 (info, sec, low, high)
down the file name anyhow. IEEE debugging information doesn't seem
to store this information anywhere. */
-static boolean
+static bfd_boolean
ieee_start_source (p, filename)
PTR p ATTRIBUTE_UNUSED;
const char *filename ATTRIBUTE_UNUSED;
{
- return true;
+ return TRUE;
}
/* Make an empty type. */
-static boolean
+static bfd_boolean
ieee_empty_type (p)
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_push_type (info, (int) builtin_unknown, 0, false, false);
+ return ieee_push_type (info, (int) builtin_unknown, 0, FALSE, FALSE);
}
/* Make a void type. */
-static boolean
+static bfd_boolean
ieee_void_type (p)
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_push_type (info, (int) builtin_void, 0, false, false);
+ return ieee_push_type (info, (int) builtin_void, 0, FALSE, FALSE);
}
/* Make an integer type. */
-static boolean
+static bfd_boolean
ieee_int_type (p, size, unsignedp)
PTR p;
unsigned int size;
- boolean unsignedp;
+ bfd_boolean unsignedp;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int indx;
@@ -5328,18 +5380,18 @@ ieee_int_type (p, size, unsignedp)
break;
default:
fprintf (stderr, _("IEEE unsupported integer type size %u\n"), size);
- return false;
+ return FALSE;
}
if (unsignedp)
++indx;
- return ieee_push_type (info, indx, size, unsignedp, false);
+ return ieee_push_type (info, indx, size, unsignedp, FALSE);
}
/* Make a floating point type. */
-static boolean
+static bfd_boolean
ieee_float_type (p, size)
PTR p;
unsigned int size;
@@ -5364,15 +5416,15 @@ ieee_float_type (p, size)
break;
default:
fprintf (stderr, _("IEEE unsupported float type size %u\n"), size);
- return false;
+ return FALSE;
}
- return ieee_push_type (info, indx, size, false, false);
+ return ieee_push_type (info, indx, size, FALSE, FALSE);
}
/* Make a complex type. */
-static boolean
+static bfd_boolean
ieee_complex_type (p, size)
PTR p;
unsigned int size;
@@ -5385,7 +5437,7 @@ ieee_complex_type (p, size)
case 4:
if (info->complex_float_index != 0)
return ieee_push_type (info, info->complex_float_index, size * 2,
- false, false);
+ FALSE, FALSE);
code = 'c';
break;
case 12:
@@ -5395,42 +5447,42 @@ ieee_complex_type (p, size)
case 8:
if (info->complex_double_index != 0)
return ieee_push_type (info, info->complex_double_index, size * 2,
- false, false);
+ FALSE, FALSE);
code = 'd';
break;
default:
fprintf (stderr, _("IEEE unsupported complex type size %u\n"), size);
- return false;
+ return FALSE;
}
/* FIXME: I don't know what the string is for. */
- if (! ieee_define_type (info, size * 2, false, false)
+ if (! ieee_define_type (info, size * 2, FALSE, FALSE)
|| ! ieee_write_number (info, code)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
if (size == 4)
info->complex_float_index = info->type_stack->type.indx;
else
info->complex_double_index = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a boolean type. IEEE doesn't support these, so we just make
an integer type instead. */
-static boolean
+static bfd_boolean
ieee_bool_type (p, size)
PTR p;
unsigned int size;
{
- return ieee_int_type (p, size, true);
+ return ieee_int_type (p, size, TRUE);
}
/* Make an enumeration. */
-static boolean
+static bfd_boolean
ieee_enum_type (p, tag, names, vals)
PTR p;
const char *tag;
@@ -5439,11 +5491,11 @@ ieee_enum_type (p, tag, names, vals)
{
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_defined_enum *e;
- boolean localp, simple;
+ bfd_boolean localp, simple;
unsigned int indx;
int i = 0;
- localp = false;
+ localp = FALSE;
indx = (unsigned int) -1;
for (e = info->enums; e != NULL; e = e->next)
{
@@ -5485,14 +5537,14 @@ ieee_enum_type (p, tag, names, vals)
&& e->names[i] == NULL))
{
/* We've seen this enum before. */
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
}
if (tag != NULL)
{
/* We've already seen an enum of the same name, so we must make
sure to output this one locally. */
- localp = true;
+ localp = TRUE;
break;
}
}
@@ -5501,40 +5553,40 @@ ieee_enum_type (p, tag, names, vals)
and always increment by 1, we can use type E. Otherwise we must
use type N. */
- simple = true;
+ simple = TRUE;
if (names != NULL)
{
for (i = 0; names[i] != NULL; i++)
{
if (vals[i] != i)
{
- simple = false;
+ simple = FALSE;
break;
}
}
}
- if (! ieee_define_named_type (info, tag, indx, 0, true, localp,
+ if (! ieee_define_named_type (info, tag, indx, 0, TRUE, localp,
(struct ieee_buflist *) NULL)
|| ! ieee_write_number (info, simple ? 'E' : 'N'))
- return false;
+ return FALSE;
if (simple)
{
/* FIXME: This is supposed to be the enumeration size, but we
don't store that. */
if (! ieee_write_number (info, 4))
- return false;
+ return FALSE;
}
if (names != NULL)
{
for (i = 0; names[i] != NULL; i++)
{
if (! ieee_write_id (info, names[i]))
- return false;
+ return FALSE;
if (! simple)
{
if (! ieee_write_number (info, vals[i]))
- return false;
+ return FALSE;
}
}
}
@@ -5554,20 +5606,20 @@ ieee_enum_type (p, tag, names, vals)
e->names = names;
e->vals = vals;
- e->defined = true;
+ e->defined = TRUE;
}
- return true;
+ return TRUE;
}
/* Make a pointer type. */
-static boolean
+static bfd_boolean
ieee_pointer_type (p)
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5577,28 +5629,28 @@ ieee_pointer_type (p)
/* A pointer to a simple builtin type can be obtained by adding 32.
FIXME: Will this be a short pointer, and will that matter? */
if (indx < 32)
- return ieee_push_type (info, indx + 32, 0, true, false);
+ return ieee_push_type (info, indx + 32, 0, TRUE, FALSE);
if (! localp)
{
m = ieee_get_modified_info (p, indx);
if (m == NULL)
- return false;
+ return FALSE;
/* FIXME: The size should depend upon the architecture. */
if (m->pointer > 0)
- return ieee_push_type (info, m->pointer, 4, true, false);
+ return ieee_push_type (info, m->pointer, 4, TRUE, FALSE);
}
- if (! ieee_define_type (info, 4, true, localp)
+ if (! ieee_define_type (info, 4, TRUE, localp)
|| ! ieee_write_number (info, 'P')
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->pointer = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a function type. This will be called for a method, but we
@@ -5606,21 +5658,21 @@ ieee_pointer_type (p)
handle this by defining the type in a private buffer, and only
adding that buffer to the typedef block if we are going to use it. */
-static boolean
+static bfd_boolean
ieee_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs;
+ bfd_boolean varargs;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int *args = NULL;
int i;
unsigned int retindx;
struct ieee_buflist fndef;
struct ieee_modified_type *m;
- localp = false;
+ localp = FALSE;
if (argcount > 0)
{
@@ -5628,15 +5680,15 @@ ieee_function_type (p, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (info->type_stack->type.localp)
- localp = true;
+ localp = TRUE;
args[i] = ieee_pop_type (info);
}
}
else if (argcount < 0)
- varargs = false;
+ varargs = FALSE;
if (info->type_stack->type.localp)
- localp = true;
+ localp = TRUE;
retindx = ieee_pop_type (info);
m = NULL;
@@ -5644,17 +5696,17 @@ ieee_function_type (p, argcount, varargs)
{
m = ieee_get_modified_info (p, retindx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->function > 0)
- return ieee_push_type (info, m->function, 0, true, false);
+ return ieee_push_type (info, m->function, 0, TRUE, FALSE);
}
/* An attribute of 0x41 means that the frame and push mask are
unknown. */
if (! ieee_init_buffer (info, &fndef)
|| ! ieee_define_named_type (info, (const char *) NULL,
- (unsigned int) -1, 0, true, localp,
+ (unsigned int) -1, 0, TRUE, localp,
&fndef)
|| ! ieee_write_number (info, 'x')
|| ! ieee_write_number (info, 0x41)
@@ -5662,12 +5714,12 @@ ieee_function_type (p, argcount, varargs)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, retindx)
|| ! ieee_write_number (info, (bfd_vma) argcount + (varargs ? 1 : 0)))
- return false;
+ return FALSE;
if (argcount > 0)
{
for (i = 0; i < argcount; i++)
if (! ieee_write_number (info, args[i]))
- return false;
+ return FALSE;
free (args);
}
if (varargs)
@@ -5675,11 +5727,11 @@ ieee_function_type (p, argcount, varargs)
/* A varargs function is represented by writing out the last
argument as type void *, although this makes little sense. */
if (! ieee_write_number (info, (bfd_vma) builtin_void + 32))
- return false;
+ return FALSE;
}
if (! ieee_write_number (info, 0))
- return false;
+ return FALSE;
/* We wrote the information into fndef, in case we don't need it.
It will be appended to info->types by ieee_pop_type. */
@@ -5688,12 +5740,12 @@ ieee_function_type (p, argcount, varargs)
if (m != NULL)
m->function = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a reference type. */
-static boolean
+static bfd_boolean
ieee_reference_type (p)
PTR p;
{
@@ -5703,14 +5755,14 @@ ieee_reference_type (p)
pmisc record to indicate that it is really a reference. */
if (! ieee_pointer_type (p))
- return false;
- info->type_stack->type.referencep = true;
- return true;
+ return FALSE;
+ info->type_stack->type.referencep = TRUE;
+ return TRUE;
}
/* Make a range type. */
-static boolean
+static bfd_boolean
ieee_range_type (p, low, high)
PTR p;
bfd_signed_vma low;
@@ -5718,7 +5770,7 @@ ieee_range_type (p, low, high)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
size = info->type_stack->type.size;
unsignedp = info->type_stack->type.unsignedp;
@@ -5734,16 +5786,16 @@ ieee_range_type (p, low, high)
/* Make an array type. */
-static boolean
+static bfd_boolean
ieee_array_type (p, low, high, stringp)
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp ATTRIBUTE_UNUSED;
+ bfd_boolean stringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
- boolean localp;
+ bfd_boolean localp;
unsigned int size;
struct ieee_modified_type *m = NULL;
struct ieee_modified_array_type *a;
@@ -5763,27 +5815,27 @@ ieee_array_type (p, low, high, stringp)
{
m = ieee_get_modified_info (info, eleindx);
if (m == NULL)
- return false;
+ return FALSE;
for (a = m->arrays; a != NULL; a = a->next)
{
if (a->low == low && a->high == high)
- return ieee_push_type (info, a->indx, size, false, false);
+ return ieee_push_type (info, a->indx, size, FALSE, FALSE);
}
}
- if (! ieee_define_type (info, size, false, localp)
+ if (! ieee_define_type (info, size, FALSE, localp)
|| ! ieee_write_number (info, low == 0 ? 'Z' : 'C')
|| ! ieee_write_number (info, eleindx))
- return false;
+ return FALSE;
if (low != 0)
{
if (! ieee_write_number (info, low))
- return false;
+ return FALSE;
}
if (! ieee_write_number (info, high + 1))
- return false;
+ return FALSE;
if (! localp)
{
@@ -5798,18 +5850,18 @@ ieee_array_type (p, low, high, stringp)
m->arrays = a;
}
- return true;
+ return TRUE;
}
/* Make a set type. */
-static boolean
+static bfd_boolean
ieee_set_type (p, bitstringp)
PTR p;
- boolean bitstringp ATTRIBUTE_UNUSED;
+ bfd_boolean bitstringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
+ bfd_boolean localp;
unsigned int eleindx;
localp = info->type_stack->type.localp;
@@ -5817,7 +5869,7 @@ ieee_set_type (p, bitstringp)
/* FIXME: We don't know the size, so we just use 4. */
- return (ieee_define_type (info, 0, true, localp)
+ return (ieee_define_type (info, 0, TRUE, localp)
&& ieee_write_number (info, 's')
&& ieee_write_number (info, 4)
&& ieee_write_number (info, eleindx));
@@ -5825,7 +5877,7 @@ ieee_set_type (p, bitstringp)
/* Make an offset type. */
-static boolean
+static bfd_boolean
ieee_offset_type (p)
PTR p;
{
@@ -5842,17 +5894,17 @@ ieee_offset_type (p)
member. Unfortunately, it does not describe the target type,
which seems pretty important. I'm going to punt this for now. */
- return ieee_int_type (p, 4, true);
+ return ieee_int_type (p, 4, TRUE);
}
/* Make a method type. */
-static boolean
+static bfd_boolean
ieee_method_type (p, domain, argcount, varargs)
PTR p;
- boolean domain;
+ bfd_boolean domain;
int argcount;
- boolean varargs;
+ bfd_boolean varargs;
{
struct ieee_handle *info = (struct ieee_handle *) p;
@@ -5868,13 +5920,13 @@ ieee_method_type (p, domain, argcount, varargs)
/* Make a const qualified type. */
-static boolean
+static bfd_boolean
ieee_const_type (p)
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5887,34 +5939,34 @@ ieee_const_type (p)
{
m = ieee_get_modified_info (info, indx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->const_qualified > 0)
return ieee_push_type (info, m->const_qualified, size, unsignedp,
- false);
+ FALSE);
}
if (! ieee_define_type (info, size, unsignedp, localp)
|| ! ieee_write_number (info, 'n')
|| ! ieee_write_number (info, 1)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->const_qualified = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Make a volatile qualified type. */
-static boolean
+static bfd_boolean
ieee_volatile_type (p)
PTR p;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp, localp;
+ bfd_boolean unsignedp, localp;
unsigned int indx;
struct ieee_modified_type *m = NULL;
@@ -5927,23 +5979,23 @@ ieee_volatile_type (p)
{
m = ieee_get_modified_info (info, indx);
if (m == NULL)
- return false;
+ return FALSE;
if (m->volatile_qualified > 0)
return ieee_push_type (info, m->volatile_qualified, size, unsignedp,
- false);
+ FALSE);
}
if (! ieee_define_type (info, size, unsignedp, localp)
|| ! ieee_write_number (info, 'n')
|| ! ieee_write_number (info, 2)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
if (! localp)
m->volatile_qualified = info->type_stack->type.indx;
- return true;
+ return TRUE;
}
/* Convert an enum debug_visibility into a CXXFLAGS value. */
@@ -5970,25 +6022,25 @@ ieee_vis_to_flags (visibility)
the stack, to avoid confusing type definitions required by the
fields with the struct type itself. */
-static boolean
+static bfd_boolean
ieee_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 ieee_handle *info = (struct ieee_handle *) p;
- boolean localp, ignorep;
- boolean copy;
+ bfd_boolean localp, ignorep;
+ bfd_boolean copy;
char ab[20];
const char *look;
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt, *ntlook;
struct ieee_buflist strdef;
- localp = false;
- ignorep = false;
+ localp = FALSE;
+ ignorep = FALSE;
/* We need to create a tag for internal use even if we don't want
one for external use. This will let us refer to an anonymous
@@ -5996,20 +6048,20 @@ ieee_start_struct_type (p, tag, id, structp, size)
if (tag != NULL)
{
look = tag;
- copy = false;
+ copy = FALSE;
}
else
{
sprintf (ab, "__anon%u", id);
look = ab;
- copy = true;
+ copy = TRUE;
}
/* If we already have references to the tag, we must use the
existing type index. */
- h = ieee_name_type_hash_lookup (&info->tags, look, true, copy);
+ h = ieee_name_type_hash_lookup (&info->tags, look, TRUE, copy);
if (h == NULL)
- return false;
+ return FALSE;
nt = NULL;
for (ntlook = h->types; ntlook != NULL; ntlook = ntlook->next)
@@ -6021,7 +6073,7 @@ ieee_start_struct_type (p, tag, id, structp, size)
/* We are creating a duplicate definition of a globally
defined tag. Force it to be local to avoid
confusion. */
- localp = true;
+ localp = TRUE;
}
}
@@ -6032,7 +6084,7 @@ ieee_start_struct_type (p, tag, id, structp, size)
{
/* We've already seen a global definition of the type.
Ignore this new definition. */
- ignorep = true;
+ ignorep = TRUE;
}
}
else
@@ -6050,11 +6102,11 @@ ieee_start_struct_type (p, tag, id, structp, size)
nt->kind = DEBUG_KIND_ILLEGAL;
if (! ieee_init_buffer (info, &strdef)
- || ! ieee_define_named_type (info, tag, nt->type.indx, size, true,
+ || ! ieee_define_named_type (info, tag, nt->type.indx, size, TRUE,
localp, &strdef)
|| ! ieee_write_number (info, structp ? 'S' : 'U')
|| ! ieee_write_number (info, size))
- return false;
+ return FALSE;
if (! ignorep)
{
@@ -6072,12 +6124,12 @@ ieee_start_struct_type (p, tag, id, structp, size)
info->type_stack->type.strdef = strdef;
info->type_stack->type.ignorep = ignorep;
- return true;
+ return TRUE;
}
/* Add a field to a struct. */
-static boolean
+static bfd_boolean
ieee_struct_field (p, name, bitpos, bitsize, visibility)
PTR p;
const char *name;
@@ -6087,9 +6139,9 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int size;
- boolean unsignedp;
- boolean referencep;
- boolean localp;
+ bfd_boolean unsignedp;
+ bfd_boolean referencep;
+ bfd_boolean localp;
unsigned int indx;
bfd_vma offset;
@@ -6102,7 +6154,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
if (info->type_stack->next->type.ignorep)
{
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
size = info->type_stack->type.size;
@@ -6112,7 +6164,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
indx = ieee_pop_type (info);
if (localp)
- info->type_stack->type.localp = true;
+ info->type_stack->type.localp = TRUE;
if (info->type_stack->type.classdef != NULL)
{
@@ -6130,7 +6182,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_asn (info, nindx, flags)
|| ! ieee_write_atn65 (info, nindx, name)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 4;
if (referencep)
@@ -6160,7 +6212,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_asn (info, nindx, 3)
|| ! ieee_write_atn65 (info, nindx, info->type_stack->type.name)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
}
@@ -6176,7 +6228,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
|| ! ieee_write_number (info, unsignedp ? 0 : 1)
|| ! ieee_write_number (info, bitsize)
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
indx = ieee_pop_type (info);
offset = bitpos;
}
@@ -6191,7 +6243,7 @@ ieee_struct_field (p, name, bitpos, bitsize, visibility)
/* Finish up a struct type. */
-static boolean
+static bfd_boolean
ieee_end_struct_type (p)
PTR p;
{
@@ -6205,10 +6257,10 @@ ieee_end_struct_type (p)
duplicate defintion, just through away whatever bytes we have
accumulated. Leave the type on the stack. */
if (info->type_stack->type.ignorep)
- return true;
+ return TRUE;
/* If this is not a duplicate definition of this tag, then localp
- will be false, and we can put it in the global type block.
+ will be FALSE, and we can put it in the global type block.
FIXME: We should avoid outputting duplicate definitions which are
the same. */
if (! info->type_stack->type.localp)
@@ -6221,7 +6273,7 @@ ieee_end_struct_type (p)
|| ! ieee_write_byte (info, 2)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
pb = &info->global_types;
}
@@ -6235,7 +6287,7 @@ ieee_end_struct_type (p)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
pb = &info->types;
}
@@ -6243,24 +6295,24 @@ ieee_end_struct_type (p)
/* Append the struct definition to the types. */
if (! ieee_append_buffer (info, pb, &info->type_stack->type.strdef)
|| ! ieee_init_buffer (info, &info->type_stack->type.strdef))
- return false;
+ return FALSE;
/* Leave the struct on the type stack. */
- return true;
+ return TRUE;
}
/* Start a class type. */
-static boolean
+static bfd_boolean
ieee_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 ieee_handle *info = (struct ieee_handle *) p;
const char *vclass;
@@ -6296,7 +6348,7 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
}
if (! ieee_start_struct_type (p, tag, id, structp, size))
- return false;
+ return FALSE;
indx = info->name_indx;
++info->name_indx;
@@ -6309,7 +6361,7 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
|| ! ieee_write_asn (info, indx, 'T')
|| ! ieee_write_asn (info, indx, structp ? 'o' : 'u')
|| ! ieee_write_atn65 (info, indx, tag))
- return false;
+ return FALSE;
classdef = (struct ieee_type_class *) xmalloc (sizeof *classdef);
memset (classdef, 0, sizeof *classdef);
@@ -6322,12 +6374,12 @@ ieee_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
info->type_stack->type.classdef = classdef;
- return true;
+ return TRUE;
}
/* Add a static member to a class. */
-static boolean
+static bfd_boolean
ieee_class_static_member (p, name, physname, visibility)
PTR p;
const char *name;
@@ -6356,24 +6408,24 @@ ieee_class_static_member (p, name, physname, visibility)
|| ! ieee_write_asn (info, nindx, flags)
|| ! ieee_write_atn65 (info, nindx, name)
|| ! ieee_write_atn65 (info, nindx, physname))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 4;
- return true;
+ return TRUE;
}
/* Add a base class to a class. */
-static boolean
+static bfd_boolean
ieee_class_baseclass (p, bitpos, virtual, visibility)
PTR p;
bfd_vma bitpos;
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *bname;
- boolean localp;
+ bfd_boolean localp;
unsigned int bindx;
char *fname;
unsigned int flags;
@@ -6403,7 +6455,7 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
else
{
if (localp)
- info->type_stack->type.localp = true;
+ info->type_stack->type.localp = TRUE;
fname = (char *) xmalloc (strlen (bname) + sizeof "_b$");
sprintf (fname, "_b$%s", bname);
@@ -6412,7 +6464,7 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
|| ! ieee_write_id (info, fname)
|| ! ieee_write_number (info, bindx)
|| ! ieee_write_number (info, bitpos / 8))
- return false;
+ return FALSE;
flags = 0;
}
@@ -6427,17 +6479,17 @@ ieee_class_baseclass (p, bitpos, virtual, visibility)
|| ! ieee_write_atn65 (info, nindx, bname)
|| ! ieee_write_asn (info, nindx, 0)
|| ! ieee_write_atn65 (info, nindx, fname))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
free (fname);
- return true;
+ return TRUE;
}
/* Start building a method for a class. */
-static boolean
+static bfd_boolean
ieee_class_start_method (p, name)
PTR p;
const char *name;
@@ -6450,26 +6502,26 @@ ieee_class_start_method (p, name)
info->type_stack->type.classdef->method = name;
- return true;
+ return TRUE;
}
/* Define a new method variant, either static or not. */
-static boolean
+static bfd_boolean
ieee_class_method_var (info, physname, visibility, staticp, constp,
volatilep, voffset, context)
struct ieee_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 context;
+ bfd_boolean context;
{
unsigned int flags;
unsigned int nindx;
- boolean virtual;
+ bfd_boolean 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
@@ -6508,63 +6560,63 @@ ieee_class_method_var (info, physname, visibility, staticp, constp,
|| ! ieee_write_atn65 (info, nindx,
info->type_stack->type.classdef->method)
|| ! ieee_write_atn65 (info, nindx, physname))
- return false;
+ return FALSE;
if (virtual)
{
if (voffset > info->type_stack->type.classdef->voffset)
info->type_stack->type.classdef->voffset = voffset;
if (! ieee_write_asn (info, nindx, voffset))
- return false;
+ return FALSE;
++info->type_stack->type.classdef->pmisccount;
}
if (! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
- return true;
+ return TRUE;
}
/* Define a new method variant. */
-static boolean
+static bfd_boolean
ieee_class_method_variant (p, physname, visibility, constp, volatilep,
voffset, context)
PTR p;
const char *physname;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
bfd_vma voffset;
- boolean context;
+ bfd_boolean context;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- return ieee_class_method_var (info, physname, visibility, false, constp,
+ return ieee_class_method_var (info, physname, visibility, FALSE, constp,
volatilep, voffset, context);
}
/* Define a new static method variant. */
-static boolean
+static bfd_boolean
ieee_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 ieee_handle *info = (struct ieee_handle *) p;
- return ieee_class_method_var (info, physname, visibility, true, constp,
- volatilep, 0, false);
+ return ieee_class_method_var (info, physname, visibility, TRUE, constp,
+ volatilep, 0, FALSE);
}
/* Finish up a method. */
-static boolean
+static bfd_boolean
ieee_class_end_method (p)
PTR p;
{
@@ -6576,12 +6628,12 @@ ieee_class_end_method (p)
info->type_stack->type.classdef->method = NULL;
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
+static bfd_boolean
ieee_end_class_type (p)
PTR p;
{
@@ -6595,7 +6647,7 @@ ieee_end_class_type (p)
duplicate definition, just through away whatever bytes we have
accumulated. Leave the type on the stack. */
if (info->type_stack->type.ignorep)
- return true;
+ return TRUE;
nindx = info->type_stack->type.classdef->indx;
@@ -6609,20 +6661,20 @@ ieee_end_class_type (p)
|| ! ieee_write_atn65 (info, nindx, "")
|| ! ieee_write_asn (info, nindx,
info->type_stack->type.classdef->voffset))
- return false;
+ return FALSE;
if (info->type_stack->type.classdef->ownvptr)
{
if (! ieee_write_atn65 (info, nindx, ""))
- return false;
+ return FALSE;
}
else
{
if (! ieee_write_atn65 (info, nindx,
info->type_stack->type.classdef->vclass))
- return false;
+ return FALSE;
}
if (! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
info->type_stack->type.classdef->pmisccount += 5;
}
@@ -6641,16 +6693,16 @@ ieee_end_class_type (p)
|| ! ieee_write_number (info, 80)
|| ! ieee_write_number (info,
info->type_stack->type.classdef->pmisccount))
- return false;
+ return FALSE;
if (! ieee_append_buffer (info, &info->cxx,
&info->type_stack->type.classdef->pmiscbuf))
- return false;
+ return FALSE;
if (! ieee_buffer_emptyp (&info->type_stack->type.classdef->refs))
{
if (! ieee_append_buffer (info, &info->cxx,
&info->type_stack->type.classdef->refs))
- return false;
+ return FALSE;
}
return ieee_end_struct_type (p);
@@ -6658,7 +6710,7 @@ ieee_end_class_type (p)
/* Push a previously seen typedef onto the type stack. */
-static boolean
+static bfd_boolean
ieee_typedef_type (p, name)
PTR p;
const char *name;
@@ -6667,7 +6719,7 @@ ieee_typedef_type (p, name)
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
- h = ieee_name_type_hash_lookup (&info->typedefs, name, false, false);
+ h = ieee_name_type_hash_lookup (&info->typedefs, name, FALSE, FALSE);
/* h should never be NULL, since that would imply that the generic
debugging code has asked for a typedef which it has not yet
@@ -6680,17 +6732,17 @@ ieee_typedef_type (p, name)
nt = h->types;
if (! ieee_push_type (info, nt->type.indx, nt->type.size,
nt->type.unsignedp, nt->type.localp))
- return false;
+ return FALSE;
/* Copy over any other type information we may have. */
info->type_stack->type = nt->type;
- return true;
+ return TRUE;
}
/* Push a tagged type onto the type stack. */
-static boolean
+static bfd_boolean
ieee_tag_type (p, name, id, kind)
PTR p;
const char *name;
@@ -6698,8 +6750,8 @@ ieee_tag_type (p, name, id, kind)
enum debug_type_kind kind;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean localp;
- boolean copy;
+ bfd_boolean localp;
+ bfd_boolean copy;
char ab[20];
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
@@ -6712,7 +6764,7 @@ ieee_tag_type (p, name, id, kind)
abort ();
for (e = info->enums; e != NULL; e = e->next)
if (e->tag != NULL && strcmp (e->tag, name) == 0)
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
e = (struct ieee_defined_enum *) xmalloc (sizeof *e);
memset (e, 0, sizeof *e);
@@ -6720,27 +6772,27 @@ ieee_tag_type (p, name, id, kind)
e->indx = info->type_indx;
++info->type_indx;
e->tag = name;
- e->defined = false;
+ e->defined = FALSE;
e->next = info->enums;
info->enums = e;
- return ieee_push_type (info, e->indx, 0, true, false);
+ return ieee_push_type (info, e->indx, 0, TRUE, FALSE);
}
- localp = false;
+ localp = FALSE;
- copy = false;
+ copy = FALSE;
if (name == NULL)
{
sprintf (ab, "__anon%u", id);
name = ab;
- copy = true;
+ copy = TRUE;
}
- h = ieee_name_type_hash_lookup (&info->tags, name, true, copy);
+ h = ieee_name_type_hash_lookup (&info->tags, name, TRUE, copy);
if (h == NULL)
- return false;
+ return FALSE;
for (nt = h->types; nt != NULL; nt = nt->next)
{
@@ -6748,17 +6800,17 @@ ieee_tag_type (p, name, id, kind)
{
if (! ieee_push_type (info, nt->type.indx, nt->type.size,
nt->type.unsignedp, nt->type.localp))
- return false;
+ return FALSE;
/* Copy over any other type information we may have. */
info->type_stack->type = nt->type;
- return true;
+ return TRUE;
}
if (! nt->type.localp)
{
/* This is a duplicate of a global type, so it must be
local. */
- localp = true;
+ localp = TRUE;
}
}
@@ -6775,17 +6827,17 @@ ieee_tag_type (p, name, id, kind)
nt->next = h->types;
h->types = nt;
- if (! ieee_push_type (info, nt->type.indx, 0, false, localp))
- return false;
+ if (! ieee_push_type (info, nt->type.indx, 0, FALSE, localp))
+ return FALSE;
info->type_stack->type.name = h->root.string;
- return true;
+ return TRUE;
}
/* Output a typedef. */
-static boolean
+static bfd_boolean
ieee_typdef (p, name)
PTR p;
const char *name;
@@ -6793,8 +6845,8 @@ ieee_typdef (p, name)
struct ieee_handle *info = (struct ieee_handle *) p;
struct ieee_write_type type;
unsigned int indx;
- boolean found;
- boolean localp;
+ bfd_boolean found;
+ bfd_boolean localp;
struct ieee_name_type_hash_entry *h;
struct ieee_name_type *nt;
@@ -6806,7 +6858,7 @@ ieee_typdef (p, name)
type index to correspond to the name being used. We recognize
names used in stabs debugging output even if they don't exactly
correspond to the names used for the IEEE builtin types. */
- found = false;
+ found = FALSE;
if (indx <= (unsigned int) builtin_bcd_float)
{
switch ((enum builtin_types) indx)
@@ -6816,7 +6868,7 @@ ieee_typdef (p, name)
case builtin_void:
if (strcmp (name, "void") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_signed_char:
@@ -6824,18 +6876,18 @@ ieee_typdef (p, name)
if (strcmp (name, "signed char") == 0)
{
indx = (unsigned int) builtin_signed_char;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "char") == 0)
{
indx = (unsigned int) builtin_char;
- found = true;
+ found = TRUE;
}
break;
case builtin_unsigned_char:
if (strcmp (name, "unsigned char") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_signed_short_int:
@@ -6845,22 +6897,22 @@ ieee_typdef (p, name)
if (strcmp (name, "signed short int") == 0)
{
indx = (unsigned int) builtin_signed_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "short") == 0)
{
indx = (unsigned int) builtin_short;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "short int") == 0)
{
indx = (unsigned int) builtin_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "signed short") == 0)
{
indx = (unsigned int) builtin_signed_short;
- found = true;
+ found = TRUE;
}
break;
@@ -6870,12 +6922,12 @@ ieee_typdef (p, name)
|| strcmp (name, "short unsigned int") == 0)
{
indx = builtin_unsigned_short_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned short") == 0)
{
indx = builtin_unsigned_short;
- found = true;
+ found = TRUE;
}
break;
@@ -6885,18 +6937,18 @@ ieee_typdef (p, name)
if (strcmp (name, "signed long") == 0)
{
indx = builtin_signed_long;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "int") == 0)
{
indx = builtin_int;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "long") == 0
|| strcmp (name, "long int") == 0)
{
indx = builtin_long;
- found = true;
+ found = TRUE;
}
break;
@@ -6907,50 +6959,50 @@ ieee_typdef (p, name)
|| strcmp (name, "long unsigned int") == 0)
{
indx = builtin_unsigned_long;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned") == 0)
{
indx = builtin_unsigned;
- found = true;
+ found = TRUE;
}
else if (strcmp (name, "unsigned int") == 0)
{
indx = builtin_unsigned_int;
- found = true;
+ found = TRUE;
}
break;
case builtin_signed_long_long:
if (strcmp (name, "signed long long") == 0
|| strcmp (name, "long long int") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_unsigned_long_long:
if (strcmp (name, "unsigned long long") == 0
|| strcmp (name, "long long unsigned int") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_float:
if (strcmp (name, "float") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_double:
if (strcmp (name, "double") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_long_double:
if (strcmp (name, "long double") == 0)
- found = true;
+ found = TRUE;
break;
case builtin_long_long_double:
if (strcmp (name, "long long double") == 0)
- found = true;
+ found = TRUE;
break;
}
@@ -6958,9 +7010,9 @@ ieee_typdef (p, name)
type.indx = indx;
}
- h = ieee_name_type_hash_lookup (&info->typedefs, name, true, false);
+ h = ieee_name_type_hash_lookup (&info->typedefs, name, TRUE, FALSE);
if (h == NULL)
- return false;
+ return FALSE;
/* See if we have already defined this type with this name. */
localp = type.localp;
@@ -6973,13 +7025,13 @@ ieee_typdef (p, name)
if (! nt->type.localp)
{
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
}
else
{
/* This is a duplicate definition, so make this one local. */
- localp = true;
+ localp = TRUE;
}
}
@@ -7001,7 +7053,7 @@ ieee_typdef (p, name)
/* This is one of the builtin typedefs, so we don't need to
actually define it. */
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
indx = ieee_pop_type (info);
@@ -7011,19 +7063,19 @@ ieee_typdef (p, name)
(struct ieee_buflist *) NULL)
|| ! ieee_write_number (info, 'T')
|| ! ieee_write_number (info, indx))
- return false;
+ return FALSE;
/* Remove the type we just added to the type stack. This should not
be ieee_pop_unused_type, since the type is used, we just don't
need it now. */
(void) ieee_pop_type (info);
- return true;
+ return TRUE;
}
/* Output a tag for a type. We don't have to do anything here. */
-static boolean
+static bfd_boolean
ieee_tag (p, name)
PTR p;
const char *name ATTRIBUTE_UNUSED;
@@ -7033,36 +7085,36 @@ ieee_tag (p, name)
/* This should not be ieee_pop_unused_type, since we want the type
to be defined. */
(void) ieee_pop_type (info);
- return true;
+ return TRUE;
}
/* Output an integer constant. */
-static boolean
+static bfd_boolean
ieee_int_constant (p, name, val)
PTR p ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
bfd_vma val ATTRIBUTE_UNUSED;
{
/* FIXME. */
- return true;
+ return TRUE;
}
/* Output a floating point constant. */
-static boolean
+static bfd_boolean
ieee_float_constant (p, name, val)
PTR p ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
double val ATTRIBUTE_UNUSED;
{
/* FIXME. */
- return true;
+ return TRUE;
}
/* Output a typed constant. */
-static boolean
+static bfd_boolean
ieee_typed_constant (p, name, val)
PTR p;
const char *name ATTRIBUTE_UNUSED;
@@ -7072,12 +7124,12 @@ ieee_typed_constant (p, name, val)
/* FIXME. */
ieee_pop_unused_type (info);
- return true;
+ return TRUE;
}
/* Output a variable. */
-static boolean
+static bfd_boolean
ieee_variable (p, name, kind, val)
PTR p;
const char *name;
@@ -7087,9 +7139,9 @@ ieee_variable (p, name, kind, val)
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int name_indx;
unsigned int size;
- boolean referencep;
+ bfd_boolean referencep;
unsigned int type_indx;
- boolean asn;
+ bfd_boolean asn;
int refflag;
size = info->type_stack->type.size;
@@ -7098,7 +7150,7 @@ ieee_variable (p, name, kind, val)
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
name_indx = info->name_indx;
++info->name_indx;
@@ -7110,54 +7162,54 @@ ieee_variable (p, name, kind, val)
|| ! ieee_write_2bytes (info, (int) ieee_atn_record_enum)
|| ! ieee_write_number (info, name_indx)
|| ! ieee_write_number (info, type_indx))
- return false;
+ return FALSE;
switch (kind)
{
default:
abort ();
- return false;
+ return FALSE;
case DEBUG_GLOBAL:
if (! ieee_write_number (info, 8)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 0;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_STATIC:
if (! ieee_write_number (info, 3)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 1;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_LOCAL_STATIC:
if (! ieee_write_number (info, 3)
- || ! ieee_add_range (info, false, val, val + size))
- return false;
+ || ! ieee_add_range (info, FALSE, val, val + size))
+ return FALSE;
refflag = 2;
- asn = true;
+ asn = TRUE;
break;
case DEBUG_LOCAL:
if (! ieee_write_number (info, 1)
|| ! ieee_write_number (info, val))
- return false;
+ return FALSE;
refflag = 2;
- asn = false;
+ asn = FALSE;
break;
case DEBUG_REGISTER:
if (! ieee_write_number (info, 2)
|| ! ieee_write_number (info,
ieee_genreg_to_regno (info->abfd, val)))
- return false;
+ return FALSE;
refflag = 2;
- asn = false;
+ asn = FALSE;
break;
}
if (asn)
{
if (! ieee_write_asn (info, name_indx, val))
- return false;
+ return FALSE;
}
/* If this is really a reference type, then we just output it with
@@ -7177,7 +7229,7 @@ ieee_variable (p, name, kind, val)
if (refflag != 2)
{
if (! ieee_change_buffer (info, &info->cxx))
- return false;
+ return FALSE;
}
if (! ieee_write_byte (info, (int) ieee_nn_record)
@@ -7192,22 +7244,22 @@ ieee_variable (p, name, kind, val)
|| ! ieee_write_asn (info, nindx, 'R')
|| ! ieee_write_asn (info, nindx, refflag)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Start outputting information for a function. */
-static boolean
+static bfd_boolean
ieee_start_function (p, name, global)
PTR p;
const char *name;
- boolean global;
+ bfd_boolean global;
{
struct ieee_handle *info = (struct ieee_handle *) p;
- boolean referencep;
+ bfd_boolean referencep;
unsigned int retindx, typeindx;
referencep = info->type_stack->type.referencep;
@@ -7227,19 +7279,19 @@ ieee_start_function (p, name, global)
info->fnname = name;
/* An attribute of 0x40 means that the push mask is unknown. */
- if (! ieee_define_named_type (info, name, (unsigned int) -1, 0, false, true,
+ if (! ieee_define_named_type (info, name, (unsigned int) -1, 0, FALSE, TRUE,
&info->fntype)
|| ! ieee_write_number (info, 'x')
|| ! ieee_write_number (info, 0x40)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, retindx))
- return false;
+ return FALSE;
typeindx = ieee_pop_type (info);
if (! ieee_init_buffer (info, &info->fnargs))
- return false;
+ return FALSE;
info->fnargcount = 0;
/* If the function return value is actually a reference type, we
@@ -7263,12 +7315,12 @@ ieee_start_function (p, name, global)
|| ! ieee_write_asn (info, nindx, 'R')
|| ! ieee_write_asn (info, nindx, global ? 0 : 1)
|| ! ieee_write_atn65 (info, nindx, name))
- return false;
+ return FALSE;
}
assert (! ieee_buffer_emptyp (&info->vars));
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
/* The address is written out as the first block. */
@@ -7285,7 +7337,7 @@ ieee_start_function (p, name, global)
/* Add a function parameter. This will normally be called before the
first block, so we postpone them until we see the block. */
-static boolean
+static bfd_boolean
ieee_function_parameter (p, name, kind, val)
PTR p;
const char *name;
@@ -7314,15 +7366,15 @@ ieee_function_parameter (p, name, kind, val)
/* Add the type to the fnargs list. */
if (! ieee_change_buffer (info, &info->fnargs)
|| ! ieee_write_number (info, m->type))
- return false;
+ return FALSE;
++info->fnargcount;
- return true;
+ return TRUE;
}
/* Output pending function parameters. */
-static boolean
+static bfd_boolean
ieee_output_pending_parms (info)
struct ieee_handle *info;
{
@@ -7338,7 +7390,7 @@ ieee_output_pending_parms (info)
{
default:
abort ();
- return false;
+ return FALSE;
case DEBUG_PARM_STACK:
case DEBUG_PARM_REFERENCE:
vkind = DEBUG_LOCAL;
@@ -7349,13 +7401,13 @@ ieee_output_pending_parms (info)
break;
}
- if (! ieee_push_type (info, m->type, 0, false, false))
- return false;
+ if (! ieee_push_type (info, m->type, 0, FALSE, FALSE))
+ return FALSE;
info->type_stack->type.referencep = m->referencep;
if (m->referencep)
++refcount;
if (! ieee_variable ((PTR) info, m->name, vkind, m->val))
- return false;
+ return FALSE;
}
/* If there are any reference parameters, we need to output a
@@ -7381,7 +7433,7 @@ ieee_output_pending_parms (info)
|| ! ieee_write_asn (info, nindx, 'B')
|| ! ieee_write_atn65 (info, nindx, info->fnname)
|| ! ieee_write_asn (info, nindx, 0))
- return false;
+ return FALSE;
for (m = info->pending_parms, varindx = 1;
m != NULL;
m = m->next, varindx++)
@@ -7389,7 +7441,7 @@ ieee_output_pending_parms (info)
if (m->referencep)
{
if (! ieee_write_asn (info, nindx, varindx))
- return false;
+ return FALSE;
}
}
}
@@ -7406,13 +7458,13 @@ ieee_output_pending_parms (info)
info->pending_parms = NULL;
- return true;
+ return TRUE;
}
/* Start a block. If this is the first block, we output the address
to finish the BB4 or BB6, and then output the function parameters. */
-static boolean
+static bfd_boolean
ieee_start_block (p, addr)
PTR p;
bfd_vma addr;
@@ -7420,13 +7472,13 @@ ieee_start_block (p, addr)
struct ieee_handle *info = (struct ieee_handle *) p;
if (! ieee_change_buffer (info, &info->vars))
- return false;
+ return FALSE;
if (info->block_depth == 1)
{
if (! ieee_write_number (info, addr)
|| ! ieee_output_pending_parms (info))
- return false;
+ return FALSE;
}
else
{
@@ -7437,20 +7489,20 @@ ieee_start_block (p, addr)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_number (info, addr))
- return false;
+ return FALSE;
}
if (! ieee_start_range (info, addr))
- return false;
+ return FALSE;
++info->block_depth;
- return true;
+ return TRUE;
}
/* End a block. */
-static boolean
+static bfd_boolean
ieee_end_block (p, addr)
PTR p;
bfd_vma addr;
@@ -7463,22 +7515,22 @@ ieee_end_block (p, addr)
if (! ieee_change_buffer (info, &info->vars)
|| ! ieee_write_byte (info, (int) ieee_be_record_enum)
|| ! ieee_write_number (info, addr - 1))
- return false;
+ return FALSE;
if (! ieee_end_range (info, addr))
- return false;
+ return FALSE;
--info->block_depth;
if (addr > info->highaddr)
info->highaddr = addr;
- return true;
+ return TRUE;
}
/* End a function. */
-static boolean
+static bfd_boolean
ieee_end_function (p)
PTR p;
{
@@ -7498,7 +7550,7 @@ ieee_end_function (p)
|| ! ieee_write_number (info, info->fnargcount)
|| ! ieee_change_buffer (info, &info->fnargs)
|| ! ieee_write_number (info, 0))
- return false;
+ return FALSE;
/* Make sure the typdef block has been started. */
if (ieee_buffer_emptyp (&info->types))
@@ -7508,25 +7560,25 @@ ieee_end_function (p)
|| ! ieee_write_byte (info, 1)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_id (info, info->modname))
- return false;
+ return FALSE;
}
if (! ieee_append_buffer (info, &info->types, &info->fntype)
|| ! ieee_append_buffer (info, &info->types, &info->fnargs))
- return false;
+ return FALSE;
info->fnname = NULL;
if (! ieee_init_buffer (info, &info->fntype)
|| ! ieee_init_buffer (info, &info->fnargs))
- return false;
+ return FALSE;
info->fnargcount = 0;
- return true;
+ return TRUE;
}
/* Record line number information. */
-static boolean
+static bfd_boolean
ieee_lineno (p, filename, lineno, addr)
PTR p;
const char *filename;
@@ -7548,7 +7600,7 @@ ieee_lineno (p, filename, lineno, addr)
if (! ieee_buffer_emptyp (&info->linenos))
{
if (! ieee_change_buffer (info, &info->linenos))
- return false;
+ return FALSE;
}
else
{
@@ -7562,7 +7614,7 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
info->lineno_filename = info->filename;
}
@@ -7573,7 +7625,7 @@ ieee_lineno (p, filename, lineno, addr)
/* We were not in the main file. Close the block for the
included file. */
if (! ieee_write_byte (info, (int) ieee_be_record_enum))
- return false;
+ return FALSE;
if (strcmp (info->filename, info->pending_lineno_filename) == 0)
{
/* We need a new NN record, and we aren't about to
@@ -7583,7 +7635,7 @@ ieee_lineno (p, filename, lineno, addr)
if (! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
}
if (strcmp (info->filename, info->pending_lineno_filename) != 0)
@@ -7599,7 +7651,7 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_byte (info, (int) ieee_nn_record)
|| ! ieee_write_number (info, info->lineno_name_indx)
|| ! ieee_write_id (info, ""))
- return false;
+ return FALSE;
}
info->lineno_filename = info->pending_lineno_filename;
}
@@ -7612,12 +7664,12 @@ ieee_lineno (p, filename, lineno, addr)
|| ! ieee_write_number (info, 0)
|| ! ieee_write_asn (info, info->lineno_name_indx,
info->pending_lineno_addr))
- return false;
+ return FALSE;
}
info->pending_lineno_filename = filename;
info->pending_lineno = lineno;
info->pending_lineno_addr = addr;
- return true;
+ return TRUE;
}
diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c
index 6b28124..7d68dcd 100644
--- a/binutils/nlmconv.c
+++ b/binutils/nlmconv.c
@@ -124,37 +124,38 @@ static struct option long_options[] =
int main PARAMS ((int, char **));
-static void show_usage PARAMS ((FILE *, int));
-static const char *select_output_format PARAMS ((enum bfd_architecture,
- unsigned long, boolean));
-static void setup_sections PARAMS ((bfd *, asection *, PTR));
-static void copy_sections PARAMS ((bfd *, asection *, PTR));
-static void mangle_relocs PARAMS ((bfd *, asection *, arelent ***,
- long *, char *,
- bfd_size_type));
-static void default_mangle_relocs PARAMS ((bfd *, asection *, arelent ***,
- long *, char *,
- bfd_size_type));
-static char *link_inputs PARAMS ((struct string_list *, char *));
+static void show_usage
+ PARAMS ((FILE *, int));
+static const char *select_output_format
+ PARAMS ((enum bfd_architecture, unsigned long, bfd_boolean));
+static void setup_sections
+ PARAMS ((bfd *, asection *, PTR));
+static void copy_sections
+ PARAMS ((bfd *, asection *, PTR));
+static void mangle_relocs
+ PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+static void default_mangle_relocs
+ PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
+static char *link_inputs
+ PARAMS ((struct string_list *, char *));
#ifdef NLMCONV_I386
-static void i386_mangle_relocs PARAMS ((bfd *, asection *, arelent ***,
- long *, char *,
- bfd_size_type));
+static void i386_mangle_relocs
+ PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
#endif
#ifdef NLMCONV_ALPHA
-static void alpha_mangle_relocs PARAMS ((bfd *, asection *, arelent ***,
- long *, char *,
- bfd_size_type));
+static void alpha_mangle_relocs
+ PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
#endif
#ifdef NLMCONV_POWERPC
-static void powerpc_build_stubs PARAMS ((bfd *, bfd *, asymbol ***, long *));
-static void powerpc_resolve_stubs PARAMS ((bfd *, bfd *));
-static void powerpc_mangle_relocs PARAMS ((bfd *, asection *, arelent ***,
- long *, char *,
- bfd_size_type));
+static void powerpc_build_stubs
+ PARAMS ((bfd *, bfd *, asymbol ***, long *));
+static void powerpc_resolve_stubs
+ PARAMS ((bfd *, bfd *));
+static void powerpc_mangle_relocs
+ PARAMS ((bfd *, asection *, arelent ***, long *, char *, bfd_size_type));
#endif
/* The main routine. */
@@ -186,7 +187,7 @@ main (argc, argv)
asymbol *endsym;
long i;
char inlead, outlead;
- boolean gotstart, gotexit, gotcheck;
+ bfd_boolean gotstart, gotexit, gotcheck;
struct stat st;
FILE *custom_data = NULL;
FILE *help_data = NULL;
@@ -296,18 +297,18 @@ main (argc, argv)
memset ((PTR) &extended_hdr_struct, 0, sizeof extended_hdr_struct);
check_procedure = NULL;
custom_file = NULL;
- debug_info = false;
+ debug_info = FALSE;
exit_procedure = "_Stop";
export_symbols = NULL;
map_file = NULL;
- full_map = false;
+ full_map = FALSE;
help_file = NULL;
import_symbols = NULL;
message_file = NULL;
modules = NULL;
sharelib_file = NULL;
start_procedure = "_Prelude";
- verbose = false;
+ verbose = FALSE;
rpc_file = NULL;
parse_errors = 0;
@@ -459,9 +460,9 @@ main (argc, argv)
/* Adjust symbol information. */
inlead = bfd_get_symbol_leading_char (inbfd);
outlead = bfd_get_symbol_leading_char (outbfd);
- gotstart = false;
- gotexit = false;
- gotcheck = false;
+ gotstart = FALSE;
+ gotexit = FALSE;
+ gotcheck = FALSE;
newsymalloc = 10;
newsyms = (asymbol **) xmalloc (newsymalloc * sizeof (asymbol *));
newsymcount = 0;
@@ -653,7 +654,7 @@ main (argc, argv)
val += bfd_section_size (outbfd, text_sec);
if (! bfd_set_start_address (outbfd, val))
bfd_fatal (_("set start address"));
- gotstart = true;
+ gotstart = TRUE;
}
if (strcmp (bfd_asymbol_name (sym), exit_procedure) == 0)
{
@@ -662,7 +663,7 @@ main (argc, argv)
&& text_sec != (asection *) NULL)
val += bfd_section_size (outbfd, text_sec);
nlm_fixed_header (outbfd)->exitProcedureOffset = val;
- gotexit = true;
+ gotexit = TRUE;
}
if (check_procedure != NULL
&& strcmp (bfd_asymbol_name (sym), check_procedure) == 0)
@@ -672,7 +673,7 @@ main (argc, argv)
&& text_sec != (asection *) NULL)
val += bfd_section_size (outbfd, text_sec);
nlm_fixed_header (outbfd)->checkUnloadProcedureOffset = val;
- gotcheck = true;
+ gotcheck = TRUE;
}
}
}
@@ -1127,7 +1128,7 @@ static const char *
select_output_format (arch, mach, bigendian)
enum bfd_architecture arch;
unsigned long mach;
- boolean bigendian ATTRIBUTE_UNUSED;
+ bfd_boolean bigendian ATTRIBUTE_UNUSED;
{
switch (arch)
{
@@ -1253,7 +1254,7 @@ copy_sections (inbfd, insec, data_ptr)
/* FIXME: Why are these necessary? */
insec->_cooked_size = insec->_raw_size;
- insec->reloc_done = true;
+ insec->reloc_done = TRUE;
if ((bfd_get_section_flags (inbfd, insec) & SEC_HAS_CONTENTS) == 0)
contents = NULL;
@@ -1416,15 +1417,15 @@ static reloc_howto_type nlm_i386_pcrel_howto =
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
- true, /* pc_relative */
+ TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
0, /* special_function */
"DISP32", /* name */
- true, /* partial_inplace */
+ TRUE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
- true); /* pcrel_offset */
+ TRUE); /* pcrel_offset */
static void
i386_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
@@ -1574,15 +1575,15 @@ static reloc_howto_type nlm32_alpha_nw_howto =
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
- false, /* pc_relative */
+ FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
0, /* special_function */
"NW_RELOC", /* name */
- false, /* partial_inplace */
+ FALSE, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
- false); /* pcrel_offset */
+ FALSE); /* pcrel_offset */
static void
alpha_mangle_relocs (outbfd, insec, relocs_ptr, reloc_count_ptr, contents,
diff --git a/binutils/nlmconv.h b/binutils/nlmconv.h
index 908a623..e465187 100644
--- a/binutils/nlmconv.h
+++ b/binutils/nlmconv.h
@@ -1,5 +1,5 @@
/* nlmconv.h -- header file for NLM conversion program
- Copyright 1993 Free Software Foundation, Inc.
+ Copyright 1993, 2002 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -44,7 +44,7 @@ extern char *check_procedure;
/* File named by CUSTOM. */
extern char *custom_file;
/* Whether to generate debugging information (DEBUG). */
-extern boolean debug_info;
+extern bfd_boolean debug_info;
/* Procedure named by EXIT. */
extern char *exit_procedure;
/* Exported symbols (EXPORT). */
@@ -54,7 +54,7 @@ extern struct string_list *input_files;
/* Map file name (MAP, FULLMAP). */
extern char *map_file;
/* Whether a full map has been requested (FULLMAP). */
-extern boolean full_map;
+extern bfd_boolean full_map;
/* File named by HELP. */
extern char *help_file;
/* Imported symbols (IMPORT). */
@@ -70,7 +70,7 @@ extern char *sharelib_file;
/* Start procedure name (START). */
extern char *start_procedure;
/* VERBOSE. */
-extern boolean verbose;
+extern bfd_boolean verbose;
/* RPC description file (XDCDATA). */
extern char *rpc_file;
@@ -81,4 +81,4 @@ extern int parse_errors;
extern int yyparse PARAMS ((void));
/* Tell the lexer what file to read. */
-extern boolean nlmlex_file PARAMS ((const char *));
+extern bfd_boolean nlmlex_file PARAMS ((const char *));
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index 01bb5e8..8aef168 100644
--- a/binutils/nlmheader.y
+++ b/binutils/nlmheader.y
@@ -50,7 +50,7 @@ char *check_procedure;
/* File named by CUSTOM. */
char *custom_file;
/* Whether to generate debugging information (DEBUG). */
-boolean debug_info;
+bfd_boolean debug_info;
/* Procedure named by EXIT. */
char *exit_procedure;
/* Exported symbols (EXPORT). */
@@ -60,7 +60,7 @@ struct string_list *input_files;
/* Map file name (MAP, FULLMAP). */
char *map_file;
/* Whether a full map has been requested (FULLMAP). */
-boolean full_map;
+bfd_boolean full_map;
/* File named by HELP. */
char *help_file;
/* Imported symbols (IMPORT). */
@@ -76,7 +76,7 @@ char *sharelib_file;
/* Start procedure name (START). */
char *start_procedure;
/* VERBOSE. */
-boolean verbose;
+bfd_boolean verbose;
/* RPC description file (XDCDATA). */
char *rpc_file;
@@ -93,7 +93,7 @@ static char *symbol_prefix;
/* Local functions. */
static int yylex PARAMS ((void));
static void nlmlex_file_push PARAMS ((const char *));
-static boolean nlmlex_file_open PARAMS ((const char *));
+static bfd_boolean nlmlex_file_open PARAMS ((const char *));
static int nlmlex_buf_init PARAMS ((void));
static char nlmlex_buf_add PARAMS ((int));
static long nlmlex_get_number PARAMS ((const char *));
@@ -141,7 +141,7 @@ static char *xstrdup PARAMS ((const char *));
/* The entire file is just a list of commands. */
-file:
+file:
commands
;
@@ -205,7 +205,7 @@ command:
}
| DEBUG
{
- debug_info = true;
+ debug_info = TRUE;
}
| DESCRIPTION QUOTED_STRING
{
@@ -248,12 +248,12 @@ command:
| FULLMAP
{
map_file = "";
- full_map = true;
+ full_map = TRUE;
}
| FULLMAP STRING
{
map_file = $2;
- full_map = true;
+ full_map = TRUE;
}
| HELP STRING
{
@@ -366,7 +366,7 @@ command:
}
| VERBOSE
{
- verbose = true;
+ verbose = TRUE;
}
| VERSIONK STRING STRING STRING
{
@@ -536,7 +536,7 @@ static struct input current;
/* Start the lexer going on the main input file. */
-boolean
+bfd_boolean
nlmlex_file (name)
const char *name;
{
@@ -565,7 +565,7 @@ nlmlex_file_push (name)
/* Start lexing from a file. */
-static boolean
+static bfd_boolean
nlmlex_file_open (name)
const char *name;
{
@@ -574,12 +574,12 @@ nlmlex_file_open (name)
{
fprintf (stderr, "%s:%s: %s\n", program_name, name, strerror (errno));
++parse_errors;
- return false;
+ return FALSE;
}
current.name = xstrdup (name);
current.lineno = 1;
current.state = BEGINNING_OF_LINE;
- return true;
+ return TRUE;
}
/* Table used to turn keywords into tokens. */
@@ -746,7 +746,7 @@ tail_recurse:
BUF_FINISH ();
ungetc (c, current.file);
-
+
nlmlex_file_push (lex_buf);
goto tail_recurse;
}
@@ -785,7 +785,7 @@ tail_recurse:
return keyword_tokens[i].token;
}
}
-
+
nlmheader_identify ();
fprintf (stderr, _("%s:%d: unrecognized keyword: %s\n"),
current.name, current.lineno, lex_buf);
diff --git a/binutils/nm.c b/binutils/nm.c
index 62bc2b4..06d99af 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -68,47 +68,84 @@ struct extended_symbol_info
#define SYM_SIZE(sym) \
(sym->elfinfo ? sym->elfinfo->internal_elf_sym.st_size: sym->ssize)
-static void usage PARAMS ((FILE *, int));
-static void set_print_radix PARAMS ((char *));
-static void set_output_format PARAMS ((char *));
-static void display_archive PARAMS ((bfd *));
-static boolean display_file PARAMS ((char *));
-static void display_rel_file PARAMS ((bfd *, bfd *));
-static long filter_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int));
-static long sort_symbols_by_size PARAMS ((bfd *, boolean, PTR, long, unsigned int, struct size_sym **));
-static void print_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int, bfd *));
-static void print_size_symbols PARAMS ((bfd *, boolean, struct size_sym *, long, bfd *));
-static void print_symname PARAMS ((const char *, const char *, bfd *));
-static void print_symbol PARAMS ((bfd *, asymbol *, bfd_vma ssize, bfd *));
-static void print_symdef_entry PARAMS ((bfd *));
+static void usage
+ PARAMS ((FILE *, int));
+static void set_print_radix
+ PARAMS ((char *));
+static void set_output_format
+ PARAMS ((char *));
+static void display_archive
+ PARAMS ((bfd *));
+static bfd_boolean display_file
+ PARAMS ((char *));
+static void display_rel_file
+ PARAMS ((bfd *, bfd *));
+static long filter_symbols
+ PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int));
+static long sort_symbols_by_size
+ PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int, struct size_sym **));
+static void print_symbols
+ PARAMS ((bfd *, bfd_boolean, PTR, long, unsigned int, bfd *));
+static void print_size_symbols
+ PARAMS ((bfd *, bfd_boolean, struct size_sym *, long, bfd *));
+static void print_symname
+ PARAMS ((const char *, const char *, bfd *));
+static void print_symbol
+ PARAMS ((bfd *, asymbol *, bfd_vma ssize, bfd *));
+static void print_symdef_entry
+ PARAMS ((bfd *));
/* The sorting functions. */
-static int numeric_forward PARAMS ((const PTR, const PTR));
-static int numeric_reverse PARAMS ((const PTR, const PTR));
-static int non_numeric_forward PARAMS ((const PTR, const PTR));
-static int non_numeric_reverse PARAMS ((const PTR, const PTR));
-static int size_forward1 PARAMS ((const PTR, const PTR));
-static int size_forward2 PARAMS ((const PTR, const PTR));
+static int numeric_forward
+ PARAMS ((const PTR, const PTR));
+static int numeric_reverse
+ PARAMS ((const PTR, const PTR));
+static int non_numeric_forward
+ PARAMS ((const PTR, const PTR));
+static int non_numeric_reverse
+ PARAMS ((const PTR, const PTR));
+static int size_forward1
+ PARAMS ((const PTR, const PTR));
+static int size_forward2
+ PARAMS ((const PTR, const PTR));
/* The output formatting functions. */
-static void print_object_filename_bsd PARAMS ((char *));
-static void print_object_filename_sysv PARAMS ((char *));
-static void print_object_filename_posix PARAMS ((char *));
-static void print_archive_filename_bsd PARAMS ((char *));
-static void print_archive_filename_sysv PARAMS ((char *));
-static void print_archive_filename_posix PARAMS ((char *));
-static void print_archive_member_bsd PARAMS ((char *, const char *));
-static void print_archive_member_sysv PARAMS ((char *, const char *));
-static void print_archive_member_posix PARAMS ((char *, const char *));
-static void print_symbol_filename_bsd PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_sysv PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_posix PARAMS ((bfd *, bfd *));
-static void print_value PARAMS ((bfd *, bfd_vma));
-static void print_symbol_info_bsd PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_sysv PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_posix PARAMS ((struct extended_symbol_info *, bfd *));
-static void get_relocs PARAMS ((bfd *, asection *, PTR));
-static const char * get_symbol_type PARAMS ((unsigned int));
+static void print_object_filename_bsd
+ PARAMS ((char *));
+static void print_object_filename_sysv
+ PARAMS ((char *));
+static void print_object_filename_posix
+ PARAMS ((char *));
+static void print_archive_filename_bsd
+ PARAMS ((char *));
+static void print_archive_filename_sysv
+ PARAMS ((char *));
+static void print_archive_filename_posix
+ PARAMS ((char *));
+static void print_archive_member_bsd
+ PARAMS ((char *, const char *));
+static void print_archive_member_sysv
+ PARAMS ((char *, const char *));
+static void print_archive_member_posix
+ PARAMS ((char *, const char *));
+static void print_symbol_filename_bsd
+ PARAMS ((bfd *, bfd *));
+static void print_symbol_filename_sysv
+ PARAMS ((bfd *, bfd *));
+static void print_symbol_filename_posix
+ PARAMS ((bfd *, bfd *));
+static void print_value
+ PARAMS ((bfd *, bfd_vma));
+static void print_symbol_info_bsd
+ PARAMS ((struct extended_symbol_info *, bfd *));
+static void print_symbol_info_sysv
+ PARAMS ((struct extended_symbol_info *, bfd *));
+static void print_symbol_info_posix
+ PARAMS ((struct extended_symbol_info *, bfd *));
+static void get_relocs
+ PARAMS ((bfd *, asection *, PTR));
+static const char * get_symbol_type
+ PARAMS ((unsigned int));
/* Support for different output formats. */
struct output_fns
@@ -592,11 +629,11 @@ display_archive (file)
}
}
-static boolean
+static bfd_boolean
display_file (filename)
char *filename;
{
- boolean retval = true;
+ bfd_boolean retval = TRUE;
bfd *file;
char **matching;
@@ -604,7 +641,7 @@ display_file (filename)
if (file == NULL)
{
bfd_nonfatal (filename);
- return false;
+ return FALSE;
}
if (bfd_check_format (file, bfd_archive))
@@ -628,10 +665,10 @@ display_file (filename)
list_matching_formats (matching);
free (matching);
}
- retval = false;
+ retval = FALSE;
}
- if (bfd_close (file) == false)
+ if (!bfd_close (file))
bfd_fatal (filename);
lineno_cache_bfd = NULL;
@@ -643,7 +680,7 @@ display_file (filename)
/* These globals are used to pass information into the sorting
routines. */
static bfd *sort_bfd;
-static boolean sort_dynamic;
+static bfd_boolean sort_dynamic;
static asymbol *sort_x;
static asymbol *sort_y;
@@ -847,7 +884,7 @@ size_forward2 (P_x, P_y)
static long
sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
bfd *abfd;
- boolean dynamic;
+ bfd_boolean dynamic;
PTR minisyms;
long symcount;
unsigned int size;
@@ -1010,7 +1047,7 @@ display_rel_file (abfd, archive_bfd)
static long
filter_symbols (abfd, dynamic, minisyms, symcount, size)
bfd *abfd;
- boolean dynamic;
+ bfd_boolean dynamic;
PTR minisyms;
long symcount;
unsigned int size;
@@ -1102,7 +1139,7 @@ print_symname (format, name, abfd)
static void
print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
bfd *abfd;
- boolean dynamic;
+ bfd_boolean dynamic;
PTR minisyms;
long symcount;
unsigned int size;
@@ -1134,7 +1171,7 @@ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
static void
print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd)
bfd *abfd;
- boolean dynamic;
+ bfd_boolean dynamic;
struct size_sym *symsizes;
long symcount;
bfd *archive_bfd;
@@ -1602,7 +1639,7 @@ print_symdef_entry (abfd)
{
symindex idx = BFD_NO_MORE_SYMBOLS;
carsym *thesym;
- boolean everprinted = false;
+ bfd_boolean everprinted = FALSE;
for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
idx != BFD_NO_MORE_SYMBOLS;
@@ -1612,7 +1649,7 @@ print_symdef_entry (abfd)
if (!everprinted)
{
printf (_("\nArchive index:\n"));
- everprinted = true;
+ everprinted = TRUE;
}
elt = bfd_get_elt_at_index (abfd, idx);
if (elt == NULL)
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 978e9c1..fc4bdda 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -60,33 +60,56 @@ section_rename;
/* List of sections to be renamed. */
static section_rename * section_rename_list;
-static void copy_usage PARAMS ((FILE *, int));
-static void strip_usage PARAMS ((FILE *, int));
-static flagword parse_flags PARAMS ((const char *));
-static struct section_list *find_section_list PARAMS ((const char *, boolean));
-static void setup_section PARAMS ((bfd *, asection *, PTR));
-static void copy_section PARAMS ((bfd *, asection *, PTR));
-static void get_sections PARAMS ((bfd *, asection *, PTR));
-static int compare_section_lma PARAMS ((const PTR, const PTR));
-static void add_specific_symbol PARAMS ((const char *, struct symlist **));
-static void add_specific_symbols PARAMS ((const char *, struct symlist **));
-static boolean is_specified_symbol PARAMS ((const char *, struct symlist *));
-static boolean is_strip_section PARAMS ((bfd *, asection *));
+static void copy_usage
+ PARAMS ((FILE *, int));
+static void strip_usage
+ PARAMS ((FILE *, int));
+static flagword parse_flags
+ PARAMS ((const char *));
+static struct section_list *find_section_list
+ PARAMS ((const char *, bfd_boolean));
+static void setup_section
+ PARAMS ((bfd *, asection *, PTR));
+static void copy_section
+ PARAMS ((bfd *, asection *, PTR));
+static void get_sections
+ PARAMS ((bfd *, asection *, PTR));
+static int compare_section_lma
+ PARAMS ((const PTR, const PTR));
+static void add_specific_symbol
+ PARAMS ((const char *, struct symlist **));
+static void add_specific_symbols
+ PARAMS ((const char *, struct symlist **));
+static bfd_boolean is_specified_symbol
+ PARAMS ((const char *, struct symlist *));
+static bfd_boolean is_strip_section
+ PARAMS ((bfd *, asection *));
static unsigned int filter_symbols
PARAMS ((bfd *, bfd *, asymbol **, asymbol **, long));
-static void mark_symbols_used_in_relocations PARAMS ((bfd *, asection *, PTR));
-static void filter_bytes PARAMS ((char *, bfd_size_type *));
-static boolean write_debugging_info PARAMS ((bfd *, PTR, long *, asymbol ***));
-static void copy_object PARAMS ((bfd *, bfd *));
-static void copy_archive PARAMS ((bfd *, bfd *, const char *));
+static void mark_symbols_used_in_relocations
+ PARAMS ((bfd *, asection *, PTR));
+static void filter_bytes
+ PARAMS ((char *, bfd_size_type *));
+static bfd_boolean write_debugging_info
+ PARAMS ((bfd *, PTR, long *, asymbol ***));
+static void copy_object
+ PARAMS ((bfd *, bfd *));
+static void copy_archive
+ PARAMS ((bfd *, bfd *, const char *));
static void copy_file
PARAMS ((const char *, const char *, const char *, const char *));
-static int strip_main PARAMS ((int, char **));
-static int copy_main PARAMS ((int, char **));
-static const char *lookup_sym_redefinition PARAMS((const char *));
-static void redefine_list_append PARAMS ((const char *, const char *));
-static const char * find_section_rename PARAMS ((bfd *, sec_ptr, flagword *));
-static void add_section_rename PARAMS ((const char *, const char *, flagword));
+static int strip_main
+ PARAMS ((int, char **));
+static int copy_main
+ PARAMS ((int, char **));
+static const char *lookup_sym_redefinition
+ PARAMS((const char *));
+static void redefine_list_append
+ PARAMS ((const char *, const char *));
+static const char * find_section_rename
+ PARAMS ((bfd *, sec_ptr, flagword *));
+static void add_section_rename
+ PARAMS ((const char *, const char *, flagword));
#define RETURN_NONFATAL(s) {bfd_nonfatal (s); status = 1; return;}
@@ -97,8 +120,8 @@ static asymbol **osympp = NULL; /* Output symbols that survive stripping */
static int copy_byte = -1;
static int interleave = 4;
-static boolean verbose; /* Print file and target names. */
-static boolean preserve_dates; /* Preserve input file timestamp. */
+static bfd_boolean verbose; /* Print file and target names. */
+static bfd_boolean preserve_dates; /* Preserve input file timestamp. */
static int status = 0; /* Exit status. */
enum strip_action
@@ -134,41 +157,41 @@ enum change_action
/* Structure used to hold lists of sections and actions to take. */
struct section_list
{
- struct section_list * next; /* Next section to change. */
- const char * name; /* Section name. */
- boolean used; /* Whether this entry was used. */
- boolean remove; /* Whether to remove this section. */
- boolean copy; /* Whether to copy this section. */
- enum change_action change_vma;/* Whether to change or set VMA. */
- bfd_vma vma_val; /* Amount to change by or set to. */
- enum change_action change_lma;/* Whether to change or set LMA. */
- bfd_vma lma_val; /* Amount to change by or set to. */
- boolean set_flags; /* Whether to set the section flags. */
- flagword flags; /* What to set the section flags to. */
+ struct section_list * next; /* Next section to change. */
+ const char * name; /* Section name. */
+ bfd_boolean used; /* Whether this entry was used. */
+ bfd_boolean remove; /* Whether to remove this section. */
+ bfd_boolean copy; /* Whether to copy this section. */
+ enum change_action change_vma;/* Whether to change or set VMA. */
+ bfd_vma vma_val; /* Amount to change by or set to. */
+ enum change_action change_lma;/* Whether to change or set LMA. */
+ bfd_vma lma_val; /* Amount to change by or set to. */
+ bfd_boolean set_flags; /* Whether to set the section flags. */
+ flagword flags; /* What to set the section flags to. */
};
static struct section_list *change_sections;
-/* True if some sections are to be removed. */
-static boolean sections_removed;
+/* TRUE if some sections are to be removed. */
+static bfd_boolean sections_removed;
-/* True if only some sections are to be copied. */
-static boolean sections_copied;
+/* TRUE if only some sections are to be copied. */
+static bfd_boolean sections_copied;
/* Changes to the start address. */
static bfd_vma change_start = 0;
-static boolean set_start_set = false;
+static bfd_boolean set_start_set = FALSE;
static bfd_vma set_start;
/* Changes to section addresses. */
static bfd_vma change_section_address = 0;
/* Filling gaps between sections. */
-static boolean gap_fill_set = false;
+static bfd_boolean gap_fill_set = FALSE;
static bfd_byte gap_fill = 0;
/* Pad to a given address. */
-static boolean pad_to_set = false;
+static bfd_boolean pad_to_set = FALSE;
static bfd_vma pad_to;
/* Use alternate machine code? */
@@ -195,13 +218,13 @@ struct section_add
static struct section_add *add_sections;
/* Whether to convert debugging information. */
-static boolean convert_debugging = false;
+static bfd_boolean convert_debugging = FALSE;
/* Whether to change the leading character in symbol names. */
-static boolean change_leading_char = false;
+static bfd_boolean change_leading_char = FALSE;
/* Whether to remove the leading character from global symbol names. */
-static boolean remove_leading_char = false;
+static bfd_boolean remove_leading_char = FALSE;
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
@@ -212,8 +235,8 @@ static struct symlist *keepglobal_specific_list = NULL;
static struct symlist *weaken_specific_list = NULL;
static struct redefine_node *redefine_sym_list = NULL;
-/* If this is true, we weaken global symbols (set BSF_WEAK). */
-static boolean weaken = false;
+/* If this is TRUE, we weaken global symbols (set BSF_WEAK). */
+static bfd_boolean weaken = FALSE;
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
@@ -349,7 +372,7 @@ extern unsigned int Chunk;
/* Restrict the generation of Srecords to type S3 only.
This variable is declare in bfd/srec.c and can be toggled
on by the --srec-forceS3 command line switch. */
-extern boolean S3Forced;
+extern bfd_boolean S3Forced;
/* Defined in bfd/binary.c. Used to set architecture of input binary files. */
extern enum bfd_architecture bfd_external_binary_architecture;
@@ -520,7 +543,7 @@ parse_flags (s)
static struct section_list *
find_section_list (name, add)
const char *name;
- boolean add;
+ bfd_boolean add;
{
register struct section_list *p;
@@ -533,14 +556,14 @@ find_section_list (name, add)
p = (struct section_list *) xmalloc (sizeof (struct section_list));
p->name = name;
- p->used = false;
- p->remove = false;
- p->copy = false;
+ p->used = FALSE;
+ p->remove = FALSE;
+ p->copy = FALSE;
p->change_vma = CHANGE_IGNORE;
p->change_lma = CHANGE_IGNORE;
p->vma_val = 0;
p->lma_val = 0;
- p->set_flags = false;
+ p->set_flags = FALSE;
p->flags = 0;
p->next = change_sections;
@@ -604,7 +627,7 @@ add_specific_symbols (filename, list)
char * eol;
char * name;
char * name_end;
- int finished = false;
+ int finished = FALSE;
for (eol = line;; eol ++)
{
@@ -615,7 +638,7 @@ add_specific_symbols (filename, list)
/* Cope with \n\r. */
if (eol[1] == '\r')
++ eol;
- finished = true;
+ finished = TRUE;
break;
case '\r':
@@ -623,11 +646,11 @@ add_specific_symbols (filename, list)
/* Cope with \r\n. */
if (eol[1] == '\n')
++ eol;
- finished = true;
+ finished = TRUE;
break;
case 0:
- finished = true;
+ finished = TRUE;
break;
case '#':
@@ -683,7 +706,7 @@ add_specific_symbols (filename, list)
/* See whether a symbol should be stripped or kept based on
strip_specific_list and keep_symbols. */
-static boolean
+static bfd_boolean
is_specified_symbol (name, list)
const char *name;
struct symlist *list;
@@ -692,14 +715,14 @@ is_specified_symbol (name, list)
for (tmp_list = list; tmp_list; tmp_list = tmp_list->next)
if (strcmp (name, tmp_list->name) == 0)
- return true;
+ return TRUE;
- return false;
+ return FALSE;
}
/* See if a section is being removed. */
-static boolean
+static bfd_boolean
is_strip_section (abfd, sec)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
@@ -712,17 +735,17 @@ is_strip_section (abfd, sec)
|| strip_symbols == STRIP_ALL
|| discard_locals == LOCALS_ALL
|| convert_debugging))
- return true;
+ return TRUE;
if (! sections_removed && ! sections_copied)
- return false;
+ return FALSE;
- p = find_section_list (bfd_get_section_name (abfd, sec), false);
+ p = find_section_list (bfd_get_section_name (abfd, sec), FALSE);
if (sections_removed && p != NULL && p->remove)
- return true;
+ return TRUE;
if (sections_copied && (p == NULL || ! p->copy))
- return true;
- return false;
+ return TRUE;
+ return FALSE;
}
/* Choose which symbol entries to copy; put the result in OSYMS.
@@ -747,7 +770,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
flagword flags = sym->flags;
const char *name = bfd_asymbol_name (sym);
int keep;
- boolean undefined;
+ bfd_boolean undefined;
if (redefine_sym_list)
{
@@ -802,7 +825,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
keep = 1;
else if (bfd_decode_symclass (sym) == 'I')
/* Global symbols in $idata sections need to be retained
- even if relocatable is false. External users of the
+ even if relocatable is FALSE. External users of the
library containing the $idata section may reference these
symbols. */
keep = 1;
@@ -1015,9 +1038,9 @@ copy_object (ibfd, obfd)
if (! bfd_set_section_size (obfd, padd->section, padd->size))
RETURN_NONFATAL (bfd_get_filename (obfd));
- pset = find_section_list (padd->name, false);
+ pset = find_section_list (padd->name, FALSE);
if (pset != NULL)
- pset->used = true;
+ pset->used = TRUE;
if (pset != NULL && pset->set_flags)
flags = pset->flags | SEC_HAS_CONTENTS;
@@ -1359,7 +1382,7 @@ copy_archive (ibfd, obfd, output_target)
if (output_bfd == (bfd *) NULL)
RETURN_NONFATAL (output_name);
- if (bfd_check_format (this_element, bfd_object) == true)
+ if (bfd_check_format (this_element, bfd_object))
copy_object (this_element, output_bfd);
if (!bfd_close (output_bfd))
@@ -1467,7 +1490,7 @@ copy_file (input_filename, output_filename, input_target, output_target)
{
bfd_error_type obj_error = bfd_get_error ();
bfd_error_type core_error;
-
+
if (bfd_check_format_matches (ibfd, bfd_core, &core_matching))
{
/* This probably can't happen.. */
@@ -1585,9 +1608,9 @@ setup_section (ibfd, isection, obfdarg)
|| convert_debugging))
return;
- p = find_section_list (bfd_section_name (ibfd, isection), false);
+ p = find_section_list (bfd_section_name (ibfd, isection), FALSE);
if (p != NULL)
- p->used = true;
+ p->used = TRUE;
if (sections_removed && p != NULL && p->remove)
return;
@@ -1645,10 +1668,9 @@ setup_section (ibfd, isection, obfdarg)
/* FIXME: This is probably not enough. If we change the LMA we
may have to recompute the header for the file as well. */
- if (bfd_set_section_alignment (obfd,
- osection,
- bfd_section_alignment (ibfd, isection))
- == false)
+ if (!bfd_set_section_alignment (obfd,
+ osection,
+ bfd_section_alignment (ibfd, isection)))
{
err = _("alignment");
goto loser;
@@ -1726,7 +1748,7 @@ copy_section (ibfd, isection, obfdarg)
if ((flags & SEC_GROUP) != 0)
return;
- p = find_section_list (bfd_section_name (ibfd, isection), false);
+ p = find_section_list (bfd_section_name (ibfd, isection), FALSE);
if (sections_removed && p != NULL && p->remove)
return;
@@ -1781,7 +1803,7 @@ copy_section (ibfd, isection, obfdarg)
}
isection->_cooked_size = isection->_raw_size;
- isection->reloc_done = true;
+ isection->reloc_done = TRUE;
if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
&& bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
@@ -1927,7 +1949,7 @@ mark_symbols_used_in_relocations (ibfd, isection, symbolsarg)
/* Write out debugging information. */
-static boolean
+static bfd_boolean
write_debugging_info (obfd, dhandle, symcountp, symppp)
bfd *obfd;
PTR dhandle;
@@ -1947,7 +1969,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
if (! write_stabs_in_sections_debugging_info (obfd, dhandle, &syms,
&symsize, &strings,
&stringsize))
- return false;
+ return FALSE;
stabsec = bfd_make_section (obfd, ".stab");
stabstrsec = bfd_make_section (obfd, ".stabstr");
@@ -1969,7 +1991,7 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
non_fatal (_("%s: can't create debugging section: %s"),
bfd_get_filename (obfd),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
/* We can get away with setting the section contents now because
@@ -1984,15 +2006,15 @@ write_debugging_info (obfd, dhandle, symcountp, symppp)
non_fatal (_("%s: can't set debugging section contents: %s"),
bfd_get_filename (obfd),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
non_fatal (_("%s: don't know how to write debugging information for %s"),
bfd_get_filename (obfd), bfd_get_target (obfd));
- return false;
+ return FALSE;
}
static int
@@ -2001,7 +2023,7 @@ strip_main (argc, argv)
char *argv[];
{
char *input_target = NULL, *output_target = NULL;
- boolean show_version = false;
+ bfd_boolean show_version = FALSE;
int c, i;
struct section_list *p;
char *output_file = NULL;
@@ -2021,9 +2043,9 @@ strip_main (argc, argv)
input_target = output_target = optarg;
break;
case 'R':
- p = find_section_list (optarg, true);
- p->remove = true;
- sections_removed = true;
+ p = find_section_list (optarg, TRUE);
+ p->remove = TRUE;
+ sections_removed = TRUE;
break;
case 's':
strip_symbols = STRIP_ALL;
@@ -2046,7 +2068,7 @@ strip_main (argc, argv)
output_file = optarg;
break;
case 'p':
- preserve_dates = true;
+ preserve_dates = TRUE;
break;
case 'x':
discard_locals = LOCALS_ALL;
@@ -2055,10 +2077,10 @@ strip_main (argc, argv)
discard_locals = LOCALS_START_L;
break;
case 'v':
- verbose = true;
+ verbose = TRUE;
break;
case 'V':
- show_version = true;
+ show_version = TRUE;
break;
case 0:
/* We've been given a long option. */
@@ -2135,8 +2157,8 @@ copy_main (argc, argv)
char * binary_architecture = NULL;
char *input_filename = NULL, *output_filename = NULL;
char *input_target = NULL, *output_target = NULL;
- boolean show_version = false;
- boolean change_warn = true;
+ bfd_boolean show_version = FALSE;
+ bfd_boolean change_warn = TRUE;
int c;
struct section_list *p;
struct stat statbuf;
@@ -2177,19 +2199,19 @@ copy_main (argc, argv)
break;
case 'j':
- p = find_section_list (optarg, true);
+ p = find_section_list (optarg, TRUE);
if (p->remove)
fatal (_("%s both copied and removed"), optarg);
- p->copy = true;
- sections_copied = true;
+ p->copy = TRUE;
+ sections_copied = TRUE;
break;
case 'R':
- p = find_section_list (optarg, true);
+ p = find_section_list (optarg, TRUE);
if (p->copy)
fatal (_("%s both copied and removed"), optarg);
- p->remove = true;
- sections_removed = true;
+ p->remove = TRUE;
+ sections_removed = TRUE;
break;
case 'S':
@@ -2225,7 +2247,7 @@ copy_main (argc, argv)
break;
case 'p':
- preserve_dates = true;
+ preserve_dates = TRUE;
break;
case 'x':
@@ -2237,15 +2259,15 @@ copy_main (argc, argv)
break;
case 'v':
- verbose = true;
+ verbose = TRUE;
break;
case 'V':
- show_version = true;
+ show_version = TRUE;
break;
case OPTION_WEAKEN:
- weaken = true;
+ weaken = TRUE;
break;
case OPTION_ADD_SECTION:
@@ -2339,7 +2361,7 @@ copy_main (argc, argv)
strncpy (name, optarg, len);
name[len] = '\0';
- p = find_section_list (name, true);
+ p = find_section_list (name, TRUE);
val = parse_vma (s + 1, option);
@@ -2376,15 +2398,15 @@ copy_main (argc, argv)
break;
case OPTION_CHANGE_WARNINGS:
- change_warn = true;
+ change_warn = TRUE;
break;
case OPTION_CHANGE_LEADING_CHAR:
- change_leading_char = true;
+ change_leading_char = TRUE;
break;
case OPTION_DEBUGGING:
- convert_debugging = true;
+ convert_debugging = TRUE;
break;
case OPTION_GAP_FILL:
@@ -2402,21 +2424,21 @@ copy_main (argc, argv)
non_fatal (_("Warning: truncating gap-fill from 0x%s to 0x%x"),
buff, gap_fill);
}
- gap_fill_set = true;
+ gap_fill_set = TRUE;
}
break;
case OPTION_NO_CHANGE_WARNINGS:
- change_warn = false;
+ change_warn = FALSE;
break;
case OPTION_PAD_TO:
pad_to = parse_vma (optarg, "--pad-to");
- pad_to_set = true;
+ pad_to_set = TRUE;
break;
case OPTION_REMOVE_LEADING_CHAR:
- remove_leading_char = true;
+ remove_leading_char = TRUE;
break;
case OPTION_REDEFINE_SYM:
@@ -2464,9 +2486,9 @@ copy_main (argc, argv)
strncpy (name, optarg, len);
name[len] = '\0';
- p = find_section_list (name, true);
+ p = find_section_list (name, TRUE);
- p->set_flags = true;
+ p->set_flags = TRUE;
p->flags = parse_flags (s + 1);
}
break;
@@ -2517,7 +2539,7 @@ copy_main (argc, argv)
case OPTION_SET_START:
set_start = parse_vma (optarg, "--set-start");
- set_start_set = true;
+ set_start_set = TRUE;
break;
case OPTION_SREC_LEN:
@@ -2525,7 +2547,7 @@ copy_main (argc, argv)
break;
case OPTION_SREC_FORCES3:
- S3Forced = true;
+ S3Forced = TRUE;
break;
case OPTION_STRIP_SYMBOLS:
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 73abc98..eb777a8 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -38,7 +38,8 @@
#ifdef NEED_DECLARATION_FPRINTF
/* This is needed by INIT_DISASSEMBLE_INFO. */
-extern int fprintf PARAMS ((FILE *, const char *, ...));
+extern int fprintf
+ PARAMS ((FILE *, const char *, ...));
#endif
/* Exit status. */
@@ -49,7 +50,7 @@ static char *default_target = NULL; /* default at runtime */
static int show_version = 0; /* show the version number */
static int dump_section_contents; /* -s */
static int dump_section_headers; /* -h */
-static boolean dump_file_header; /* -f */
+static bfd_boolean dump_file_header; /* -f */
static int dump_symtab; /* -t */
static int dump_dynamic_symtab; /* -T */
static int dump_reloc_info; /* -r */
@@ -58,14 +59,14 @@ static int dump_ar_hdrs; /* -a */
static int dump_private_headers; /* -p */
static int prefix_addresses; /* --prefix-addresses */
static int with_line_numbers; /* -l */
-static boolean with_source_code; /* -S */
+static bfd_boolean with_source_code; /* -S */
static int show_raw_insn; /* --show-raw-insn */
static int dump_stab_section_info; /* --stabs */
static int do_demangle; /* -C, --demangle */
-static boolean disassemble; /* -d */
-static boolean disassemble_all; /* -D */
+static bfd_boolean disassemble; /* -d */
+static bfd_boolean disassemble_all; /* -D */
static int disassemble_zeroes; /* --disassemble-zeroes */
-static boolean formats_info; /* -i */
+static bfd_boolean formats_info; /* -i */
static char *only; /* -j secname */
static int wide_output; /* -w */
static bfd_vma start_address = (bfd_vma) -1; /* --start-address */
@@ -79,7 +80,7 @@ struct objdump_disasm_info
{
bfd *abfd;
asection *sec;
- boolean require_sec;
+ bfd_boolean require_sec;
};
/* Architecture to disassemble for, or default if NULL. */
@@ -111,53 +112,82 @@ static long dynsymcount = 0;
/* Static declarations. */
-static void usage PARAMS ((FILE *, int));
-static void nonfatal PARAMS ((const char *));
-static void display_file PARAMS ((char *filename, char *target));
-static void dump_section_header PARAMS ((bfd *, asection *, PTR));
-static void dump_headers PARAMS ((bfd *));
-static void dump_data PARAMS ((bfd *abfd));
-static void dump_relocs PARAMS ((bfd *abfd));
-static void dump_dynamic_relocs PARAMS ((bfd * abfd));
-static void dump_reloc_set PARAMS ((bfd *, asection *, arelent **, long));
-static void dump_symbols PARAMS ((bfd *abfd, boolean dynamic));
-static void dump_bfd_header PARAMS ((bfd *));
-static void dump_bfd_private_header PARAMS ((bfd *));
-static void dump_bfd PARAMS ((bfd *));
-static void display_bfd PARAMS ((bfd *abfd));
-static void display_target_list PARAMS ((void));
-static void display_info_table PARAMS ((int, int));
-static void display_target_tables PARAMS ((void));
-static void display_info PARAMS ((void));
+static void usage
+ PARAMS ((FILE *, int));
+static void nonfatal
+ PARAMS ((const char *));
+static void display_file
+ PARAMS ((char *filename, char *target));
+static void dump_section_header
+ PARAMS ((bfd *, asection *, PTR));
+static void dump_headers
+ PARAMS ((bfd *));
+static void dump_data
+ PARAMS ((bfd *abfd));
+static void dump_relocs
+ PARAMS ((bfd *abfd));
+static void dump_dynamic_relocs
+ PARAMS ((bfd * abfd));
+static void dump_reloc_set
+ PARAMS ((bfd *, asection *, arelent **, long));
+static void dump_symbols
+ PARAMS ((bfd *abfd, bfd_boolean dynamic));
+static void dump_bfd_header
+ PARAMS ((bfd *));
+static void dump_bfd_private_header
+ PARAMS ((bfd *));
+static void dump_bfd
+ PARAMS ((bfd *));
+static void display_bfd
+ PARAMS ((bfd *abfd));
+static void display_target_list
+ PARAMS ((void));
+static void display_info_table
+ PARAMS ((int, int));
+static void display_target_tables
+ PARAMS ((void));
+static void display_info
+ PARAMS ((void));
static void objdump_print_value
- PARAMS ((bfd_vma, struct disassemble_info *, boolean));
+ PARAMS ((bfd_vma, struct disassemble_info *, bfd_boolean));
static void objdump_print_symname
PARAMS ((bfd *, struct disassemble_info *, asymbol *));
static asymbol *find_symbol_for_address
- PARAMS ((bfd *, asection *, bfd_vma, boolean, long *));
+ PARAMS ((bfd *, asection *, bfd_vma, bfd_boolean, long *));
static void objdump_print_addr_with_sym
PARAMS ((bfd *, asection *, asymbol *, bfd_vma,
- struct disassemble_info *, boolean));
+ struct disassemble_info *, bfd_boolean));
static void objdump_print_addr
- PARAMS ((bfd_vma, struct disassemble_info *, boolean));
+ PARAMS ((bfd_vma, struct disassemble_info *, bfd_boolean));
static void objdump_print_address
PARAMS ((bfd_vma, struct disassemble_info *));
static int objdump_symbol_at_address
PARAMS ((bfd_vma, struct disassemble_info *));
-static void show_line PARAMS ((bfd *, asection *, bfd_vma));
+static void show_line
+ PARAMS ((bfd *, asection *, bfd_vma));
static void disassemble_bytes
- PARAMS ((struct disassemble_info *, disassembler_ftype, boolean,
+ PARAMS ((struct disassemble_info *, disassembler_ftype, bfd_boolean,
bfd_byte *, bfd_vma, bfd_vma, arelent ***, arelent **));
-static void disassemble_data PARAMS ((bfd *));
-static const char *endian_string PARAMS ((enum bfd_endian));
-static asymbol ** slurp_symtab PARAMS ((bfd *));
-static asymbol ** slurp_dynamic_symtab PARAMS ((bfd *));
-static long remove_useless_symbols PARAMS ((asymbol **, long));
-static int compare_symbols PARAMS ((const PTR, const PTR));
-static int compare_relocs PARAMS ((const PTR, const PTR));
-static void dump_stabs PARAMS ((bfd *));
-static boolean read_section_stabs PARAMS ((bfd *, const char *, const char *));
-static void print_section_stabs PARAMS ((bfd *, const char *, const char *));
+static void disassemble_data
+ PARAMS ((bfd *));
+static const char *endian_string
+ PARAMS ((enum bfd_endian));
+static asymbol ** slurp_symtab
+ PARAMS ((bfd *));
+static asymbol ** slurp_dynamic_symtab
+ PARAMS ((bfd *));
+static long remove_useless_symbols
+ PARAMS ((asymbol **, long));
+static int compare_symbols
+ PARAMS ((const PTR, const PTR));
+static int compare_relocs
+ PARAMS ((const PTR, const PTR));
+static void dump_stabs
+ PARAMS ((bfd *));
+static bfd_boolean read_section_stabs
+ PARAMS ((bfd *, const char *, const char *));
+static void print_section_stabs
+ PARAMS ((bfd *, const char *, const char *));
static void
usage (stream, status)
@@ -472,7 +502,7 @@ compare_symbols (ap, bp)
const asymbol *b = *(const asymbol **)bp;
const char *an, *bn;
size_t anl, bnl;
- boolean af, bf;
+ bfd_boolean af, bf;
flagword aflags, bflags;
if (bfd_asymbol_value (a) > bfd_asymbol_value (b))
@@ -594,13 +624,13 @@ compare_relocs (ap, bp)
return 0;
}
-/* Print VMA to STREAM. If SKIP_ZEROES is true, omit leading zeroes. */
+/* Print VMA to STREAM. If SKIP_ZEROES is TRUE, omit leading zeroes. */
static void
objdump_print_value (vma, info, skip_zeroes)
bfd_vma vma;
struct disassemble_info *info;
- boolean skip_zeroes;
+ bfd_boolean skip_zeroes;
{
char buf[30];
char *p;
@@ -650,7 +680,7 @@ objdump_print_symname (abfd, info, sym)
}
/* Locate a symbol given a bfd, a section, and a VMA. If REQUIRE_SEC
- is true, then always require the symbol to be in the section. This
+ is TRUE, then always require the symbol to be in the section. This
returns NULL if there is no suitable symbol. If PLACE is not NULL,
then *PLACE is set to the index of the symbol in sorted_syms. */
@@ -659,7 +689,7 @@ find_symbol_for_address (abfd, sec, vma, require_sec, place)
bfd *abfd;
asection *sec;
bfd_vma vma;
- boolean require_sec;
+ bfd_boolean require_sec;
long *place;
{
/* @@ Would it speed things up to cache the last two symbols returned,
@@ -784,7 +814,7 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
asymbol *sym;
bfd_vma vma;
struct disassemble_info *info;
- boolean skip_zeroes;
+ bfd_boolean skip_zeroes;
{
objdump_print_value (vma, info, skip_zeroes);
@@ -798,12 +828,12 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
if (vma < secaddr)
{
(*info->fprintf_func) (info->stream, "-0x");
- objdump_print_value (secaddr - vma, info, true);
+ objdump_print_value (secaddr - vma, info, TRUE);
}
else if (vma > secaddr)
{
(*info->fprintf_func) (info->stream, "+0x");
- objdump_print_value (vma - secaddr, info, true);
+ objdump_print_value (vma - secaddr, info, TRUE);
}
(*info->fprintf_func) (info->stream, ">");
}
@@ -814,25 +844,25 @@ objdump_print_addr_with_sym (abfd, sec, sym, vma, info, skip_zeroes)
if (bfd_asymbol_value (sym) > vma)
{
(*info->fprintf_func) (info->stream, "-0x");
- objdump_print_value (bfd_asymbol_value (sym) - vma, info, true);
+ objdump_print_value (bfd_asymbol_value (sym) - vma, info, TRUE);
}
else if (vma > bfd_asymbol_value (sym))
{
(*info->fprintf_func) (info->stream, "+0x");
- objdump_print_value (vma - bfd_asymbol_value (sym), info, true);
+ objdump_print_value (vma - bfd_asymbol_value (sym), info, TRUE);
}
(*info->fprintf_func) (info->stream, ">");
}
}
/* Print VMA to INFO, symbolically if possible. If SKIP_ZEROES is
- true, don't output leading zeroes. */
+ TRUE, don't output leading zeroes. */
static void
objdump_print_addr (vma, info, skip_zeroes)
bfd_vma vma;
struct disassemble_info *info;
- boolean skip_zeroes;
+ bfd_boolean skip_zeroes;
{
struct objdump_disasm_info *aux;
asymbol *sym;
@@ -911,14 +941,14 @@ static struct print_file_list *print_files;
/* Skip ahead to a given line in a file, optionally printing each
line. */
-static void
-skip_to_line PARAMS ((struct print_file_list *, unsigned int, boolean));
+static void skip_to_line
+ PARAMS ((struct print_file_list *, unsigned int, bfd_boolean));
static void
skip_to_line (p, line, show)
struct print_file_list *p;
unsigned int line;
- boolean show;
+ bfd_boolean show;
{
while (p->line < line)
{
@@ -1017,7 +1047,7 @@ show_line (abfd, section, addr_offset)
p->line = 0;
}
if (p->f != NULL)
- skip_to_line (p, l, false);
+ skip_to_line (p, l, FALSE);
if (print_files->f != NULL)
{
@@ -1028,7 +1058,7 @@ show_line (abfd, section, addr_offset)
if (p->f != NULL)
{
- skip_to_line (p, line, true);
+ skip_to_line (p, line, TRUE);
*pp = p->next;
p->next = print_files;
print_files = p;
@@ -1064,9 +1094,9 @@ show_line (abfd, section, addr_offset)
l = line - SHOW_PRECEDING_CONTEXT_LINES;
if (l < 0)
l = 0;
- skip_to_line (p, l, false);
+ skip_to_line (p, l, FALSE);
if (p->f != NULL)
- skip_to_line (p, line, true);
+ skip_to_line (p, line, TRUE);
}
}
}
@@ -1161,7 +1191,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
relppend)
struct disassemble_info *info;
disassembler_ftype disassemble_fn;
- boolean insns;
+ bfd_boolean insns;
bfd_byte *data;
bfd_vma start_offset;
bfd_vma stop_offset;
@@ -1171,7 +1201,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
struct objdump_disasm_info *aux;
asection *section;
int octets_per_line;
- boolean done_dot;
+ bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
int opb = info->octets_per_byte;
@@ -1209,13 +1239,13 @@ disassemble_bytes (info, disassemble_fn, insns, data,
info->insn_info_valid = 0;
- done_dot = false;
+ done_dot = FALSE;
addr_offset = start_offset;
while (addr_offset < stop_offset)
{
bfd_vma z;
int octets = 0;
- boolean need_nl = false;
+ bfd_boolean need_nl = FALSE;
/* If we see more than SKIP_ZEROES octets of zeroes, we just
print `...'. */
@@ -1247,7 +1277,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
int bpc = 0;
int pb = 0;
- done_dot = false;
+ done_dot = FALSE;
if (with_line_numbers || with_source_code)
/* The line number tables will refer to unadjusted
@@ -1268,9 +1298,9 @@ disassemble_bytes (info, disassemble_fn, insns, data,
}
else
{
- aux->require_sec = true;
+ aux->require_sec = TRUE;
objdump_print_address (section->vma + addr_offset, info);
- aux->require_sec = false;
+ aux->require_sec = FALSE;
putchar (' ');
}
@@ -1429,7 +1459,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
if (!wide_output)
putchar ('\n');
else
- need_nl = true;
+ need_nl = TRUE;
}
if ((section->flags & SEC_RELOC) != 0
@@ -1456,7 +1486,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
else
printf ("\t\t\t");
- objdump_print_value (section->vma + q->address, info, true);
+ objdump_print_value (section->vma + q->address, info, TRUE);
printf (": %s\t", q->howto->name);
@@ -1484,11 +1514,11 @@ disassemble_bytes (info, disassemble_fn, insns, data,
if (q->addend)
{
printf ("+0x");
- objdump_print_value (q->addend, info, true);
+ objdump_print_value (q->addend, info, TRUE);
}
printf ("\n");
- need_nl = false;
+ need_nl = FALSE;
++(*relppp);
}
}
@@ -1530,7 +1560,7 @@ disassemble_data (abfd)
INIT_DISASSEMBLE_INFO(disasm_info, stdout, fprintf);
disasm_info.application_data = (PTR) &aux;
aux.abfd = abfd;
- aux.require_sec = false;
+ aux.require_sec = FALSE;
disasm_info.print_address_func = objdump_print_address;
disasm_info.symbol_at_address_func = objdump_symbol_at_address;
@@ -1672,13 +1702,13 @@ disassemble_data (abfd)
}
sym = find_symbol_for_address (abfd, section, section->vma + addr_offset,
- true, &place);
+ TRUE, &place);
while (addr_offset < stop_offset)
{
asymbol *nextsym;
unsigned long nextstop_offset;
- boolean insns;
+ bfd_boolean insns;
if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + addr_offset)
{
@@ -1701,7 +1731,7 @@ disassemble_data (abfd)
objdump_print_addr_with_sym (abfd, section, sym,
section->vma + addr_offset,
&disasm_info,
- false);
+ FALSE);
printf (":\n");
}
@@ -1753,9 +1783,9 @@ disassemble_data (abfd)
&& (strstr (bfd_asymbol_name (sym), "gcc2_compiled")
== NULL))
|| (sym->flags & BSF_FUNCTION) != 0)
- insns = true;
+ insns = TRUE;
else
- insns = false;
+ insns = FALSE;
disassemble_bytes (&disasm_info, disassemble_fn, insns, data,
addr_offset, nextstop_offset, &relpp, relppend);
@@ -1776,8 +1806,8 @@ disassemble_data (abfd)
could be a direct-mapped table, but instead we build one the first
time we need it. */
-static void dump_section_stabs PARAMS ((bfd *abfd, char *stabsect_name,
- char *strsect_name));
+static void dump_section_stabs
+ PARAMS ((bfd *abfd, char *stabsect_name, char *strsect_name));
/* Dump the stabs sections from an object file that has a section that
uses Sun stabs encoding. */
@@ -1800,10 +1830,10 @@ static bfd_size_type stabstr_size;
/* Read ABFD's stabs section STABSECT_NAME into `stabs'
and string table section STRSECT_NAME into `strtab'.
- If the section exists and was read, allocate the space and return true.
- Otherwise return false. */
+ If the section exists and was read, allocate the space and return TRUE.
+ Otherwise return FALSE. */
-static boolean
+static bfd_boolean
read_section_stabs (abfd, stabsect_name, strsect_name)
bfd *abfd;
const char *stabsect_name;
@@ -1815,7 +1845,7 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
if (0 == stabsect)
{
printf (_("No %s section present\n\n"), stabsect_name);
- return false;
+ return FALSE;
}
stabstrsect = bfd_get_section_by_name (abfd, strsect_name);
@@ -1824,7 +1854,7 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
non_fatal (_("%s has no %s section"),
bfd_get_filename (abfd), strsect_name);
exit_status = 1;
- return false;
+ return FALSE;
}
stab_size = bfd_section_size (abfd, stabsect);
@@ -1841,7 +1871,7 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
free (stabs);
free (strtab);
exit_status = 1;
- return false;
+ return FALSE;
}
if (! bfd_get_section_contents (abfd, stabstrsect, (PTR) strtab, 0,
@@ -1853,10 +1883,10 @@ read_section_stabs (abfd, stabsect_name, strsect_name)
free (stabs);
free (strtab);
exit_status = 1;
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Stabs entries use a 12 byte format:
@@ -2042,7 +2072,7 @@ dump_bfd (abfd)
printf (_("\n%s: file format %s\n"), bfd_get_filename (abfd),
abfd->xvec->name);
if (dump_ar_hdrs)
- print_arelt_descr (stdout, abfd, true);
+ print_arelt_descr (stdout, abfd, TRUE);
if (dump_file_header)
dump_bfd_header (abfd);
if (dump_private_headers)
@@ -2057,9 +2087,9 @@ dump_bfd (abfd)
dynsyms = slurp_dynamic_symtab (abfd);
if (dump_symtab)
- dump_symbols (abfd, false);
+ dump_symbols (abfd, FALSE);
if (dump_dynamic_symtab)
- dump_symbols (abfd, true);
+ dump_symbols (abfd, TRUE);
if (dump_stab_section_info)
dump_stabs (abfd);
if (dump_reloc_info && ! disassemble)
@@ -2154,7 +2184,7 @@ display_file (filename, target)
return;
}
- if (bfd_check_format (file, bfd_archive) == true)
+ if (bfd_check_format (file, bfd_archive))
{
bfd *last_arfile = NULL;
@@ -2275,7 +2305,7 @@ dump_data (abfd)
static void
dump_symbols (abfd, dynamic)
bfd *abfd ATTRIBUTE_UNUSED;
- boolean dynamic;
+ bfd_boolean dynamic;
{
asymbol **current;
long max;
@@ -2631,13 +2661,13 @@ display_info_table (first, last)
for (t = first; t < last && bfd_target_vector[t]; t++)
{
const bfd_target *p = bfd_target_vector[t];
- boolean ok = true;
+ bfd_boolean ok = TRUE;
bfd *abfd = bfd_openw (dummy_name, p->name);
if (abfd == NULL)
{
nonfatal (p->name);
- ok = false;
+ ok = FALSE;
}
if (ok)
@@ -2646,14 +2676,14 @@ display_info_table (first, last)
{
if (bfd_get_error () != bfd_error_invalid_operation)
nonfatal (p->name);
- ok = false;
+ ok = FALSE;
}
}
if (ok)
{
if (! bfd_set_arch_mach (abfd, a, 0))
- ok = false;
+ ok = FALSE;
}
if (ok)
@@ -2729,7 +2759,7 @@ main (argc, argv)
{
int c;
char *target = default_target;
- boolean seenflag = false;
+ bfd_boolean seenflag = FALSE;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
@@ -2766,13 +2796,13 @@ main (argc, argv)
only = optarg;
break;
case 'l':
- with_line_numbers = true;
+ with_line_numbers = TRUE;
break;
case 'b':
target = optarg;
break;
case 'C':
- do_demangle = true;
+ do_demangle = TRUE;
if (optarg != NULL)
{
enum demangling_styles style;
@@ -2786,7 +2816,7 @@ main (argc, argv)
}
break;
case 'w':
- wide_output = true;
+ wide_output = TRUE;
break;
case OPTION_ADJUST_VMA:
adjust_section_vma = parse_vma (optarg, "--adjust-vma");
@@ -2821,86 +2851,86 @@ main (argc, argv)
break;
case 'f':
- dump_file_header = true;
- seenflag = true;
+ dump_file_header = TRUE;
+ seenflag = TRUE;
break;
case 'i':
- formats_info = true;
- seenflag = true;
+ formats_info = TRUE;
+ seenflag = TRUE;
break;
case 'p':
- dump_private_headers = true;
- seenflag = true;
+ dump_private_headers = TRUE;
+ seenflag = TRUE;
break;
case 'x':
- dump_private_headers = true;
- dump_symtab = true;
- dump_reloc_info = true;
- dump_file_header = true;
- dump_ar_hdrs = true;
- dump_section_headers = true;
- seenflag = true;
+ dump_private_headers = TRUE;
+ dump_symtab = TRUE;
+ dump_reloc_info = TRUE;
+ dump_file_header = TRUE;
+ dump_ar_hdrs = TRUE;
+ dump_section_headers = TRUE;
+ seenflag = TRUE;
break;
case 't':
- dump_symtab = true;
- seenflag = true;
+ dump_symtab = TRUE;
+ seenflag = TRUE;
break;
case 'T':
- dump_dynamic_symtab = true;
- seenflag = true;
+ dump_dynamic_symtab = TRUE;
+ seenflag = TRUE;
break;
case 'd':
- disassemble = true;
- seenflag = true;
+ disassemble = TRUE;
+ seenflag = TRUE;
break;
case 'z':
- disassemble_zeroes = true;
+ disassemble_zeroes = TRUE;
break;
case 'D':
- disassemble = true;
- disassemble_all = true;
- seenflag = true;
+ disassemble = TRUE;
+ disassemble_all = TRUE;
+ seenflag = TRUE;
break;
case 'S':
- disassemble = true;
- with_source_code = true;
- seenflag = true;
+ disassemble = TRUE;
+ with_source_code = TRUE;
+ seenflag = TRUE;
break;
case 'g':
dump_debugging = 1;
- seenflag = true;
+ seenflag = TRUE;
break;
case 'G':
- dump_stab_section_info = true;
- seenflag = true;
+ dump_stab_section_info = TRUE;
+ seenflag = TRUE;
break;
case 's':
- dump_section_contents = true;
- seenflag = true;
+ dump_section_contents = TRUE;
+ seenflag = TRUE;
break;
case 'r':
- dump_reloc_info = true;
- seenflag = true;
+ dump_reloc_info = TRUE;
+ seenflag = TRUE;
break;
case 'R':
- dump_dynamic_reloc_info = true;
- seenflag = true;
+ dump_dynamic_reloc_info = TRUE;
+ seenflag = TRUE;
break;
case 'a':
- dump_ar_hdrs = true;
- seenflag = true;
+ dump_ar_hdrs = TRUE;
+ seenflag = TRUE;
break;
case 'h':
- dump_section_headers = true;
- seenflag = true;
+ dump_section_headers = TRUE;
+ seenflag = TRUE;
break;
case 'H':
usage (stdout, 0);
- seenflag = true;
+ seenflag = TRUE;
case 'v':
case 'V':
- show_version = true;
- seenflag = true;
+ show_version = TRUE;
+ seenflag = TRUE;
break;
default:
@@ -2911,7 +2941,7 @@ main (argc, argv)
if (show_version)
print_version ("objdump");
- if (seenflag == false)
+ if (!seenflag)
usage (stderr, 2);
if (formats_info)
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index a05fe09..b29eec6 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -59,75 +59,115 @@ struct pr_stack
const char *method;
};
-static void indent PARAMS ((struct pr_handle *));
-static boolean push_type PARAMS ((struct pr_handle *, const char *));
-static boolean prepend_type PARAMS ((struct pr_handle *, const char *));
-static boolean append_type PARAMS ((struct pr_handle *, const char *));
-static boolean substitute_type PARAMS ((struct pr_handle *, const char *));
-static boolean indent_type PARAMS ((struct pr_handle *));
-static char *pop_type PARAMS ((struct pr_handle *));
-static void print_vma PARAMS ((bfd_vma, char *, boolean, boolean));
-static boolean pr_fix_visibility
+static void indent
+ PARAMS ((struct pr_handle *));
+static bfd_boolean push_type
+ PARAMS ((struct pr_handle *, const char *));
+static bfd_boolean prepend_type
+ PARAMS ((struct pr_handle *, const char *));
+static bfd_boolean append_type
+ PARAMS ((struct pr_handle *, const char *));
+static bfd_boolean substitute_type
+ PARAMS ((struct pr_handle *, const char *));
+static bfd_boolean indent_type
+ PARAMS ((struct pr_handle *));
+static char *pop_type
+ PARAMS ((struct pr_handle *));
+static void print_vma
+ PARAMS ((bfd_vma, char *, bfd_boolean, bfd_boolean));
+static bfd_boolean pr_fix_visibility
PARAMS ((struct pr_handle *, enum debug_visibility));
-
-static boolean pr_start_compilation_unit PARAMS ((PTR, const char *));
-static boolean pr_start_source PARAMS ((PTR, const char *));
-static boolean pr_empty_type PARAMS ((PTR));
-static boolean pr_void_type PARAMS ((PTR));
-static boolean pr_int_type PARAMS ((PTR, unsigned int, boolean));
-static boolean pr_float_type PARAMS ((PTR, unsigned int));
-static boolean pr_complex_type PARAMS ((PTR, unsigned int));
-static boolean pr_bool_type PARAMS ((PTR, unsigned int));
-static boolean pr_enum_type
+static bfd_boolean pr_start_compilation_unit
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_start_source
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_empty_type
+ PARAMS ((PTR));
+static bfd_boolean pr_void_type
+ PARAMS ((PTR));
+static bfd_boolean pr_int_type
+ PARAMS ((PTR, unsigned int, bfd_boolean));
+static bfd_boolean pr_float_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean pr_complex_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean pr_bool_type
+ PARAMS ((PTR, unsigned int));
+static bfd_boolean pr_enum_type
PARAMS ((PTR, const char *, const char **, bfd_signed_vma *));
-static boolean pr_pointer_type PARAMS ((PTR));
-static boolean pr_function_type PARAMS ((PTR, int, boolean));
-static boolean pr_reference_type PARAMS ((PTR));
-static boolean pr_range_type PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
-static boolean pr_array_type
- PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, boolean));
-static boolean pr_set_type PARAMS ((PTR, boolean));
-static boolean pr_offset_type PARAMS ((PTR));
-static boolean pr_method_type PARAMS ((PTR, boolean, int, boolean));
-static boolean pr_const_type PARAMS ((PTR));
-static boolean pr_volatile_type PARAMS ((PTR));
-static boolean pr_start_struct_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int));
-static boolean pr_struct_field
+static bfd_boolean pr_pointer_type
+ PARAMS ((PTR));
+static bfd_boolean pr_function_type
+ PARAMS ((PTR, int, bfd_boolean));
+static bfd_boolean pr_reference_type
+ PARAMS ((PTR));
+static bfd_boolean pr_range_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma));
+static bfd_boolean pr_array_type
+ PARAMS ((PTR, bfd_signed_vma, bfd_signed_vma, bfd_boolean));
+static bfd_boolean pr_set_type
+ PARAMS ((PTR, bfd_boolean));
+static bfd_boolean pr_offset_type
+ PARAMS ((PTR));
+static bfd_boolean pr_method_type
+ PARAMS ((PTR, bfd_boolean, int, bfd_boolean));
+static bfd_boolean pr_const_type
+ PARAMS ((PTR));
+static bfd_boolean pr_volatile_type
+ PARAMS ((PTR));
+static bfd_boolean pr_start_struct_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int));
+static bfd_boolean pr_struct_field
PARAMS ((PTR, const char *, bfd_vma, bfd_vma, enum debug_visibility));
-static boolean pr_end_struct_type PARAMS ((PTR));
-static boolean pr_start_class_type
- PARAMS ((PTR, const char *, unsigned int, boolean, unsigned int, boolean,
- boolean));
-static boolean pr_class_static_member
+static bfd_boolean pr_end_struct_type
+ PARAMS ((PTR));
+static bfd_boolean pr_start_class_type
+ PARAMS ((PTR, const char *, unsigned int, bfd_boolean, unsigned int,
+ bfd_boolean, bfd_boolean));
+static bfd_boolean pr_class_static_member
PARAMS ((PTR, const char *, const char *, enum debug_visibility));
-static boolean pr_class_baseclass
- PARAMS ((PTR, bfd_vma, boolean, enum debug_visibility));
-static boolean pr_class_start_method PARAMS ((PTR, const char *));
-static boolean pr_class_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean,
- bfd_vma, boolean));
-static boolean pr_class_static_method_variant
- PARAMS ((PTR, const char *, enum debug_visibility, boolean, boolean));
-static boolean pr_class_end_method PARAMS ((PTR));
-static boolean pr_end_class_type PARAMS ((PTR));
-static boolean pr_typedef_type PARAMS ((PTR, const char *));
-static boolean pr_tag_type
+static bfd_boolean pr_class_baseclass
+ PARAMS ((PTR, bfd_vma, bfd_boolean, enum debug_visibility));
+static bfd_boolean pr_class_start_method
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_class_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean));
+static bfd_boolean pr_class_static_method_variant
+ PARAMS ((PTR, const char *, enum debug_visibility, bfd_boolean,
+ bfd_boolean));
+static bfd_boolean pr_class_end_method
+ PARAMS ((PTR));
+static bfd_boolean pr_end_class_type
+ PARAMS ((PTR));
+static bfd_boolean pr_typedef_type
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_tag_type
PARAMS ((PTR, const char *, unsigned int, enum debug_type_kind));
-static boolean pr_typdef PARAMS ((PTR, const char *));
-static boolean pr_tag PARAMS ((PTR, const char *));
-static boolean pr_int_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean pr_float_constant PARAMS ((PTR, const char *, double));
-static boolean pr_typed_constant PARAMS ((PTR, const char *, bfd_vma));
-static boolean pr_variable
+static bfd_boolean pr_typdef
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_tag
+ PARAMS ((PTR, const char *));
+static bfd_boolean pr_int_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean pr_float_constant
+ PARAMS ((PTR, const char *, double));
+static bfd_boolean pr_typed_constant
+ PARAMS ((PTR, const char *, bfd_vma));
+static bfd_boolean pr_variable
PARAMS ((PTR, const char *, enum debug_var_kind, bfd_vma));
-static boolean pr_start_function PARAMS ((PTR, const char *, boolean));
-static boolean pr_function_parameter
+static bfd_boolean pr_start_function
+ PARAMS ((PTR, const char *, bfd_boolean));
+static bfd_boolean pr_function_parameter
PARAMS ((PTR, const char *, enum debug_parm_kind, bfd_vma));
-static boolean pr_start_block PARAMS ((PTR, bfd_vma));
-static boolean pr_end_block PARAMS ((PTR, bfd_vma));
-static boolean pr_end_function PARAMS ((PTR));
-static boolean pr_lineno PARAMS ((PTR, const char *, unsigned long, bfd_vma));
+static bfd_boolean pr_start_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean pr_end_block
+ PARAMS ((PTR, bfd_vma));
+static bfd_boolean pr_end_function
+ PARAMS ((PTR));
+static bfd_boolean pr_lineno
+ PARAMS ((PTR, const char *, unsigned long, bfd_vma));
static const struct debug_write_fns pr_fns =
{
@@ -179,7 +219,7 @@ static const struct debug_write_fns pr_fns =
/* Print out the generic debugging information recorded in dhandle. */
-boolean
+bfd_boolean
print_debugging_info (f, dhandle)
FILE *f;
PTR dhandle;
@@ -208,7 +248,7 @@ indent (info)
/* Push a type on the type stack. */
-static boolean
+static bfd_boolean
push_type (info, type)
struct pr_handle *info;
const char *type;
@@ -216,7 +256,7 @@ push_type (info, type)
struct pr_stack *n;
if (type == NULL)
- return false;
+ return FALSE;
n = (struct pr_stack *) xmalloc (sizeof *n);
memset (n, 0, sizeof *n);
@@ -227,12 +267,12 @@ push_type (info, type)
n->next = info->stack;
info->stack = n;
- return true;
+ return TRUE;
}
/* Prepend a string onto the type on the top of the type stack. */
-static boolean
+static bfd_boolean
prepend_type (info, s)
struct pr_handle *info;
const char *s;
@@ -246,12 +286,12 @@ prepend_type (info, s)
free (info->stack->type);
info->stack->type = n;
- return true;
+ return TRUE;
}
/* Append a string to the type on the top of the type stack. */
-static boolean
+static bfd_boolean
append_type (info, s)
struct pr_handle *info;
const char *s;
@@ -259,7 +299,7 @@ append_type (info, s)
unsigned int len;
if (s == NULL)
- return false;
+ return FALSE;
assert (info->stack != NULL);
@@ -268,14 +308,14 @@ append_type (info, s)
len + strlen (s) + 1);
strcpy (info->stack->type + len, s);
- return true;
+ return TRUE;
}
/* We use an underscore to indicate where the name should go in a type
string. This function substitutes a string for the underscore. If
there is no underscore, the name follows the type. */
-static boolean
+static bfd_boolean
substitute_type (info, s)
struct pr_handle *info;
const char *s;
@@ -298,7 +338,7 @@ substitute_type (info, s)
free (info->stack->type);
info->stack->type = n;
- return true;
+ return TRUE;
}
if (strchr (s, '|') != NULL
@@ -307,11 +347,11 @@ substitute_type (info, s)
{
if (! prepend_type (info, "(")
|| ! append_type (info, ")"))
- return false;
+ return FALSE;
}
if (*s == '\0')
- return true;
+ return TRUE;
return (append_type (info, " ")
&& append_type (info, s));
@@ -319,7 +359,7 @@ substitute_type (info, s)
/* Indent the type at the top of the stack by appending spaces. */
-static boolean
+static bfd_boolean
indent_type (info)
struct pr_handle *info;
{
@@ -328,10 +368,10 @@ indent_type (info)
for (i = 0; i < info->indent; i++)
{
if (! append_type (info, " "))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Pop a type from the type stack. */
@@ -359,8 +399,8 @@ static void
print_vma (vma, buf, unsignedp, hexp)
bfd_vma vma;
char *buf;
- boolean unsignedp;
- boolean hexp;
+ bfd_boolean unsignedp;
+ bfd_boolean hexp;
{
if (sizeof (vma) <= sizeof (unsigned long))
{
@@ -381,7 +421,7 @@ print_vma (vma, buf, unsignedp, hexp)
/* Start a new compilation unit. */
-static boolean
+static bfd_boolean
pr_start_compilation_unit (p, filename)
PTR p;
const char *filename;
@@ -392,12 +432,12 @@ pr_start_compilation_unit (p, filename)
fprintf (info->f, "%s:\n", filename);
- return true;
+ return TRUE;
}
/* Start a source file within a compilation unit. */
-static boolean
+static bfd_boolean
pr_start_source (p, filename)
PTR p;
const char *filename;
@@ -408,12 +448,12 @@ pr_start_source (p, filename)
fprintf (info->f, " %s:\n", filename);
- return true;
+ return TRUE;
}
/* Push an empty type onto the type stack. */
-static boolean
+static bfd_boolean
pr_empty_type (p)
PTR p;
{
@@ -424,7 +464,7 @@ pr_empty_type (p)
/* Push a void type onto the type stack. */
-static boolean
+static bfd_boolean
pr_void_type (p)
PTR p;
{
@@ -435,11 +475,11 @@ pr_void_type (p)
/* Push an integer type onto the type stack. */
-static boolean
+static bfd_boolean
pr_int_type (p, size, unsignedp)
PTR p;
unsigned int size;
- boolean unsignedp;
+ bfd_boolean unsignedp;
{
struct pr_handle *info = (struct pr_handle *) p;
char ab[10];
@@ -450,7 +490,7 @@ pr_int_type (p, size, unsignedp)
/* Push a floating type onto the type stack. */
-static boolean
+static bfd_boolean
pr_float_type (p, size)
PTR p;
unsigned int size;
@@ -469,7 +509,7 @@ pr_float_type (p, size)
/* Push a complex type onto the type stack. */
-static boolean
+static bfd_boolean
pr_complex_type (p, size)
PTR p;
unsigned int size;
@@ -477,14 +517,14 @@ pr_complex_type (p, size)
struct pr_handle *info = (struct pr_handle *) p;
if (! pr_float_type (p, size))
- return false;
+ return FALSE;
return prepend_type (info, "complex ");
}
-/* Push a boolean type onto the type stack. */
+/* Push a bfd_boolean type onto the type stack. */
-static boolean
+static bfd_boolean
pr_bool_type (p, size)
PTR p;
unsigned int size;
@@ -499,7 +539,7 @@ pr_bool_type (p, size)
/* Push an enum type onto the type stack. */
-static boolean
+static bfd_boolean
pr_enum_type (p, tag, names, values)
PTR p;
const char *tag;
@@ -511,20 +551,20 @@ pr_enum_type (p, tag, names, values)
bfd_signed_vma val;
if (! push_type (info, "enum "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
if (! append_type (info, "{ "))
- return false;
+ return FALSE;
if (names == NULL)
{
if (! append_type (info, "/* undefined */"))
- return false;
+ return FALSE;
}
else
{
@@ -534,20 +574,20 @@ pr_enum_type (p, tag, names, values)
if (i > 0)
{
if (! append_type (info, ", "))
- return false;
+ return FALSE;
}
if (! append_type (info, names[i]))
- return false;
+ return FALSE;
if (values[i] != val)
{
char ab[20];
- print_vma (values[i], ab, false, false);
+ print_vma (values[i], ab, FALSE, FALSE);
if (! append_type (info, " = ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
val = values[i];
}
@@ -560,7 +600,7 @@ pr_enum_type (p, tag, names, values)
/* Turn the top type on the stack into a pointer. */
-static boolean
+static bfd_boolean
pr_pointer_type (p)
PTR p;
{
@@ -577,11 +617,11 @@ pr_pointer_type (p)
/* Turn the top type on the stack into a function returning that type. */
-static boolean
+static bfd_boolean
pr_function_type (p, argcount, varargs)
PTR p;
int argcount;
- boolean varargs;
+ bfd_boolean varargs;
{
struct pr_handle *info = (struct pr_handle *) p;
char **arg_types;
@@ -605,10 +645,10 @@ pr_function_type (p, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
arg_types[i] = pop_type (info);
if (arg_types[i] == NULL)
- return false;
+ return FALSE;
len += strlen (arg_types[i]) + 2;
}
if (varargs)
@@ -645,16 +685,16 @@ pr_function_type (p, argcount, varargs)
strcat (s, ")");
if (! substitute_type (info, s))
- return false;
+ return FALSE;
free (s);
- return true;
+ return TRUE;
}
/* Turn the top type on the stack into a reference to that type. */
-static boolean
+static bfd_boolean
pr_reference_type (p)
PTR p;
{
@@ -667,7 +707,7 @@ pr_reference_type (p)
/* Make a range type. */
-static boolean
+static bfd_boolean
pr_range_type (p, lower, upper)
PTR p;
bfd_signed_vma lower;
@@ -679,10 +719,10 @@ pr_range_type (p, lower, upper)
assert (info->stack != NULL);
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
- print_vma (lower, abl, false, false);
- print_vma (upper, abu, false, false);
+ print_vma (lower, abl, FALSE, FALSE);
+ print_vma (upper, abu, FALSE, FALSE);
return (prepend_type (info, "range (")
&& append_type (info, "):")
@@ -693,12 +733,12 @@ pr_range_type (p, lower, upper)
/* Make an array type. */
-static boolean
+static bfd_boolean
pr_array_type (p, lower, upper, stringp)
PTR p;
bfd_signed_vma lower;
bfd_signed_vma upper;
- boolean stringp;
+ bfd_boolean stringp;
{
struct pr_handle *info = (struct pr_handle *) p;
char *range_type;
@@ -706,7 +746,7 @@ pr_array_type (p, lower, upper, stringp)
range_type = pop_type (info);
if (range_type == NULL)
- return false;
+ return FALSE;
if (lower == 0)
{
@@ -714,64 +754,64 @@ pr_array_type (p, lower, upper, stringp)
sprintf (ab, "|[]");
else
{
- print_vma (upper + 1, abu, false, false);
+ print_vma (upper + 1, abu, FALSE, FALSE);
sprintf (ab, "|[%s]", abu);
}
}
else
{
- print_vma (lower, abl, false, false);
- print_vma (upper, abu, false, false);
+ print_vma (lower, abl, FALSE, FALSE);
+ print_vma (upper, abu, FALSE, FALSE);
sprintf (ab, "|[%s:%s]", abl, abu);
}
if (! substitute_type (info, ab))
- return false;
+ return FALSE;
if (strcmp (range_type, "int") != 0)
{
if (! append_type (info, ":")
|| ! append_type (info, range_type))
- return false;
+ return FALSE;
}
if (stringp)
{
if (! append_type (info, " /* string */"))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Make a set type. */
-static boolean
+static bfd_boolean
pr_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ bfd_boolean bitstringp;
{
struct pr_handle *info = (struct pr_handle *) p;
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
if (! prepend_type (info, "set { ")
|| ! append_type (info, " }"))
- return false;
+ return FALSE;
if (bitstringp)
{
if (! append_type (info, "/* bitstring */"))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Make an offset type. */
-static boolean
+static bfd_boolean
pr_offset_type (p)
PTR p;
{
@@ -779,11 +819,11 @@ pr_offset_type (p)
char *t;
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
return (substitute_type (info, "")
&& prepend_type (info, " ")
@@ -793,12 +833,12 @@ pr_offset_type (p)
/* Make a method type. */
-static boolean
+static bfd_boolean
pr_method_type (p, domain, argcount, varargs)
PTR p;
- boolean domain;
+ bfd_boolean domain;
int argcount;
- boolean varargs;
+ bfd_boolean varargs;
{
struct pr_handle *info = (struct pr_handle *) p;
unsigned int len;
@@ -813,10 +853,10 @@ pr_method_type (p, domain, argcount, varargs)
else
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
domain_type = pop_type (info);
if (domain_type == NULL)
- return false;
+ return FALSE;
if (strncmp (domain_type, "class ", sizeof "class " - 1) == 0
&& strchr (domain_type + sizeof "class " - 1, ' ') == NULL)
domain_type += sizeof "class " - 1;
@@ -841,10 +881,10 @@ pr_method_type (p, domain, argcount, varargs)
for (i = argcount - 1; i >= 0; i--)
{
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
arg_types[i] = pop_type (info);
if (arg_types[i] == NULL)
- return false;
+ return FALSE;
len += strlen (arg_types[i]) + 2;
}
if (varargs)
@@ -885,16 +925,16 @@ pr_method_type (p, domain, argcount, varargs)
strcat (s, ")");
if (! substitute_type (info, s))
- return false;
+ return FALSE;
free (s);
- return true;
+ return TRUE;
}
/* Make a const qualified type. */
-static boolean
+static bfd_boolean
pr_const_type (p)
PTR p;
{
@@ -905,7 +945,7 @@ pr_const_type (p)
/* Make a volatile qualified type. */
-static boolean
+static bfd_boolean
pr_volatile_type (p)
PTR p;
{
@@ -916,12 +956,12 @@ pr_volatile_type (p)
/* Start accumulating a struct type. */
-static boolean
+static bfd_boolean
pr_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 pr_handle *info = (struct pr_handle *) p;
@@ -929,11 +969,11 @@ pr_start_struct_type (p, tag, id, structp, size)
info->indent += 2;
if (! push_type (info, structp ? "struct " : "union "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag))
- return false;
+ return FALSE;
}
else
{
@@ -941,35 +981,35 @@ pr_start_struct_type (p, tag, id, structp, size)
sprintf (idbuf, "%%anon%u", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
if (! append_type (info, " {"))
- return false;
+ return FALSE;
if (size != 0 || tag != NULL)
{
char ab[30];
if (! append_type (info, " /*"))
- return false;
+ return FALSE;
if (size != 0)
{
sprintf (ab, " size %u", size);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (tag != NULL)
{
sprintf (ab, " id %u", id);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (! append_type (info, " */"))
- return false;
+ return FALSE;
}
if (! append_type (info, "\n"))
- return false;
+ return FALSE;
info->stack->visibility = DEBUG_VISIBILITY_PUBLIC;
@@ -978,7 +1018,7 @@ pr_start_struct_type (p, tag, id, structp, size)
/* Output the visibility of a field in a struct. */
-static boolean
+static bfd_boolean
pr_fix_visibility (info, visibility)
struct pr_handle *info;
enum debug_visibility visibility;
@@ -990,7 +1030,7 @@ pr_fix_visibility (info, visibility)
assert (info->stack != NULL);
if (info->stack->visibility == visibility)
- return true;
+ return TRUE;
switch (visibility)
{
@@ -1008,7 +1048,7 @@ pr_fix_visibility (info, visibility)
break;
default:
abort ();
- return false;
+ return FALSE;
}
/* Trim off a trailing space in the struct string, to make the
@@ -1022,16 +1062,16 @@ pr_fix_visibility (info, visibility)
if (! append_type (info, s)
|| ! append_type (info, ":\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
info->stack->visibility = visibility;
- return true;
+ return TRUE;
}
/* Add a field to a struct type. */
-static boolean
+static bfd_boolean
pr_struct_field (p, name, bitpos, bitsize, visibility)
PTR p;
const char *name;
@@ -1044,40 +1084,40 @@ pr_struct_field (p, name, bitpos, bitsize, visibility)
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
if (! append_type (info, "; /* "))
- return false;
+ return FALSE;
if (bitsize != 0)
{
- print_vma (bitsize, ab, true, false);
+ print_vma (bitsize, ab, TRUE, FALSE);
if (! append_type (info, "bitsize ")
|| ! append_type (info, ab)
|| ! append_type (info, ", "))
- return false;
+ return FALSE;
}
- print_vma (bitpos, ab, true, false);
+ print_vma (bitpos, ab, TRUE, FALSE);
if (! append_type (info, "bitpos ")
|| ! append_type (info, ab)
|| ! append_type (info, " */\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return append_type (info, t);
}
/* Finish a struct type. */
-static boolean
+static bfd_boolean
pr_end_struct_type (p)
PTR p;
{
@@ -1096,20 +1136,20 @@ pr_end_struct_type (p)
*s++ = '}';
*s = '\0';
- return true;
+ return TRUE;
}
/* Start a class type. */
-static boolean
+static bfd_boolean
pr_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 pr_handle *info = (struct pr_handle *) p;
char *tv = NULL;
@@ -1120,15 +1160,15 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
{
tv = pop_type (info);
if (tv == NULL)
- return false;
+ return FALSE;
}
if (! push_type (info, structp ? "class " : "union class "))
- return false;
+ return FALSE;
if (tag != NULL)
{
if (! append_type (info, tag))
- return false;
+ return FALSE;
}
else
{
@@ -1136,15 +1176,15 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (idbuf, "%%anon%u", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
if (! append_type (info, " {"))
- return false;
+ return FALSE;
if (size != 0 || vptr || ownvptr || tag != NULL)
{
if (! append_type (info, " /*"))
- return false;
+ return FALSE;
if (size != 0)
{
@@ -1153,23 +1193,23 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (ab, "%u", size);
if (! append_type (info, " size ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
}
if (vptr)
{
if (! append_type (info, " vtable "))
- return false;
+ return FALSE;
if (ownvptr)
{
if (! append_type (info, "self "))
- return false;
+ return FALSE;
}
else
{
if (! append_type (info, tv)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
}
@@ -1179,11 +1219,11 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
sprintf (ab, " id %u", id);
if (! append_type (info, ab))
- return false;
+ return FALSE;
}
if (! append_type (info, " */"))
- return false;
+ return FALSE;
}
info->stack->visibility = DEBUG_VISIBILITY_PRIVATE;
@@ -1194,7 +1234,7 @@ pr_start_class_type (p, tag, id, structp, size, vptr, ownvptr)
/* Add a static member to a class. */
-static boolean
+static bfd_boolean
pr_class_static_member (p, name, physname, visibility)
PTR p;
const char *name;
@@ -1205,32 +1245,32 @@ pr_class_static_member (p, name, physname, visibility)
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
if (! prepend_type (info, "static ")
|| ! append_type (info, "; /* ")
|| ! append_type (info, physname)
|| ! append_type (info, " */\n")
|| ! indent_type (info))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return append_type (info, t);
}
/* Add a base class to a class. */
-static boolean
+static bfd_boolean
pr_class_baseclass (p, bitpos, virtual, visibility)
PTR p;
bfd_vma bitpos;
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
{
struct pr_handle *info = (struct pr_handle *) p;
@@ -1242,11 +1282,11 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
assert (info->stack != NULL && info->stack->next != NULL);
if (! substitute_type (info, ""))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (strncmp (t, "class ", sizeof "class " - 1) == 0)
t += sizeof "class " - 1;
@@ -1254,12 +1294,12 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
/* Push it back on to take advantage of the prepend_type and
append_type routines. */
if (! push_type (info, t))
- return false;
+ return FALSE;
if (virtual)
{
if (! prepend_type (info, "virtual "))
- return false;
+ return FALSE;
}
switch (visibility)
@@ -1279,15 +1319,15 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
}
if (! prepend_type (info, prefix))
- return false;
+ return FALSE;
if (bitpos != 0)
{
- print_vma (bitpos, ab, true, false);
+ print_vma (bitpos, ab, TRUE, FALSE);
if (! append_type (info, " /* bitpos ")
|| ! append_type (info, ab)
|| ! append_type (info, " */"))
- return false;
+ return FALSE;
}
/* Now the top of the stack is something like "public A / * bitpos
@@ -1304,11 +1344,11 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
if (*l == ':')
break;
if (! prepend_type (info, l == s ? " : " : ", "))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
n = (char *) xmalloc (strlen (info->stack->type) + strlen (t) + 1);
memcpy (n, info->stack->type, s - info->stack->type);
@@ -1320,12 +1360,12 @@ pr_class_baseclass (p, bitpos, virtual, visibility)
free (t);
- return true;
+ return TRUE;
}
/* Start adding a method to a class. */
-static boolean
+static bfd_boolean
pr_class_start_method (p, name)
PTR p;
const char *name;
@@ -1334,21 +1374,21 @@ pr_class_start_method (p, name)
assert (info->stack != NULL);
info->stack->method = name;
- return true;
+ return TRUE;
}
/* Add a variant to a method. */
-static boolean
+static bfd_boolean
pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
context)
PTR p;
const char *physname;
enum debug_visibility visibility;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
bfd_vma voffset;
- boolean context;
+ bfd_boolean context;
{
struct pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1361,12 +1401,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
if (volatilep)
{
if (! append_type (info, " volatile"))
- return false;
+ return FALSE;
}
if (constp)
{
if (! append_type (info, " const"))
- return false;
+ return FALSE;
}
/* Stick the name of the method into its type. */
@@ -1374,12 +1414,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
(context
? info->stack->next->next->method
: info->stack->next->method)))
- return false;
+ return FALSE;
/* Get the type. */
method_type = pop_type (info);
if (method_type == NULL)
- return false;
+ return FALSE;
/* Pull off the context type if there is one. */
if (! context)
@@ -1388,19 +1428,19 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
{
context_type = pop_type (info);
if (context_type == NULL)
- return false;
+ return FALSE;
}
/* Now the top of the stack is the class. */
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
if (! append_type (info, method_type)
|| ! append_type (info, " /* ")
|| ! append_type (info, physname)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
if (context || voffset != 0)
{
char ab[20];
@@ -1410,12 +1450,12 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
if (! append_type (info, "context ")
|| ! append_type (info, context_type)
|| ! append_type (info, " "))
- return false;
+ return FALSE;
}
- print_vma (voffset, ab, true, false);
+ print_vma (voffset, ab, TRUE, FALSE);
if (! append_type (info, "voffset ")
|| ! append_type (info, ab))
- return false;
+ return FALSE;
}
return (append_type (info, " */;\n")
@@ -1424,13 +1464,13 @@ pr_class_method_variant (p, physname, visibility, constp, volatilep, voffset,
/* Add a static variant to a method. */
-static boolean
+static bfd_boolean
pr_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 pr_handle *info = (struct pr_handle *) p;
char *method_type;
@@ -1443,31 +1483,31 @@ pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
if (volatilep)
{
if (! append_type (info, " volatile"))
- return false;
+ return FALSE;
}
if (constp)
{
if (! append_type (info, " const"))
- return false;
+ return FALSE;
}
/* Mark it as static. */
if (! prepend_type (info, "static "))
- return false;
+ return FALSE;
/* Stick the name of the method into its type. */
if (! substitute_type (info, info->stack->next->method))
- return false;
+ return FALSE;
/* Get the type. */
method_type = pop_type (info);
if (method_type == NULL)
- return false;
+ return FALSE;
/* Now the top of the stack is the class. */
if (! pr_fix_visibility (info, visibility))
- return false;
+ return FALSE;
return (append_type (info, method_type)
&& append_type (info, " /* ")
@@ -1478,19 +1518,19 @@ pr_class_static_method_variant (p, physname, visibility, constp, volatilep)
/* Finish up a method. */
-static boolean
+static bfd_boolean
pr_class_end_method (p)
PTR p;
{
struct pr_handle *info = (struct pr_handle *) p;
info->stack->method = NULL;
- return true;
+ return TRUE;
}
/* Finish up a class. */
-static boolean
+static bfd_boolean
pr_end_class_type (p)
PTR p;
{
@@ -1499,7 +1539,7 @@ pr_end_class_type (p)
/* Push a type on the stack using a typedef name. */
-static boolean
+static bfd_boolean
pr_typedef_type (p, name)
PTR p;
const char *name;
@@ -1511,7 +1551,7 @@ pr_typedef_type (p, name)
/* Push a type on the stack using a tag name. */
-static boolean
+static bfd_boolean
pr_tag_type (p, name, id, kind)
PTR p;
const char *name;
@@ -1541,11 +1581,11 @@ pr_tag_type (p, name, id, kind)
break;
default:
abort ();
- return false;
+ return FALSE;
}
if (! push_type (info, t))
- return false;
+ return FALSE;
if (name != NULL)
tag = name;
else
@@ -1555,20 +1595,20 @@ pr_tag_type (p, name, id, kind)
}
if (! append_type (info, tag))
- return false;
+ return FALSE;
if (name != NULL && kind != DEBUG_KIND_ENUM)
{
sprintf (idbuf, " /* id %u */", id);
if (! append_type (info, idbuf))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Output a typedef. */
-static boolean
+static bfd_boolean
pr_typdef (p, name)
PTR p;
const char *name;
@@ -1577,24 +1617,24 @@ pr_typdef (p, name)
char *s;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
s = pop_type (info);
if (s == NULL)
- return false;
+ return FALSE;
indent (info);
fprintf (info->f, "typedef %s;\n", s);
free (s);
- return true;
+ return TRUE;
}
/* Output a tag. The tag should already be in the string on the
stack, so all we have to do here is print it out. */
-static boolean
+static bfd_boolean
pr_tag (p, name)
PTR p;
const char *name ATTRIBUTE_UNUSED;
@@ -1604,19 +1644,19 @@ pr_tag (p, name)
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
fprintf (info->f, "%s;\n", t);
free (t);
- return true;
+ return TRUE;
}
/* Output an integer constant. */
-static boolean
+static bfd_boolean
pr_int_constant (p, name, val)
PTR p;
const char *name;
@@ -1626,14 +1666,14 @@ pr_int_constant (p, name, val)
char ab[20];
indent (info);
- print_vma (val, ab, false, false);
+ print_vma (val, ab, FALSE, FALSE);
fprintf (info->f, "const int %s = %s;\n", name, ab);
- return true;
+ return TRUE;
}
/* Output a floating point constant. */
-static boolean
+static bfd_boolean
pr_float_constant (p, name, val)
PTR p;
const char *name;
@@ -1643,12 +1683,12 @@ pr_float_constant (p, name, val)
indent (info);
fprintf (info->f, "const double %s = %g;\n", name, val);
- return true;
+ return TRUE;
}
/* Output a typed constant. */
-static boolean
+static bfd_boolean
pr_typed_constant (p, name, val)
PTR p;
const char *name;
@@ -1660,20 +1700,20 @@ pr_typed_constant (p, name, val)
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
- print_vma (val, ab, false, false);
+ print_vma (val, ab, FALSE, FALSE);
fprintf (info->f, "const %s %s = %s;\n", t, name, ab);
free (t);
- return true;
+ return TRUE;
}
/* Output a variable. */
-static boolean
+static bfd_boolean
pr_variable (p, name, kind, val)
PTR p;
const char *name;
@@ -1685,11 +1725,11 @@ pr_variable (p, name, kind, val)
char ab[20];
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
switch (kind)
@@ -1704,31 +1744,31 @@ pr_variable (p, name, kind, val)
default:
break;
}
- print_vma (val, ab, true, true);
+ print_vma (val, ab, TRUE, TRUE);
fprintf (info->f, "%s /* %s */;\n", t, ab);
free (t);
- return true;
+ return TRUE;
}
/* Start outputting a function. */
-static boolean
+static bfd_boolean
pr_start_function (p, name, global)
PTR p;
const char *name;
- boolean global;
+ bfd_boolean global;
{
struct pr_handle *info = (struct pr_handle *) p;
char *t;
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
indent (info);
if (! global)
@@ -1737,12 +1777,12 @@ pr_start_function (p, name, global)
info->parameter = 1;
- return true;
+ return TRUE;
}
/* Output a function parameter. */
-static boolean
+static bfd_boolean
pr_function_parameter (p, name, kind, val)
PTR p;
const char *name;
@@ -1757,15 +1797,15 @@ pr_function_parameter (p, name, kind, val)
|| kind == DEBUG_PARM_REF_REG)
{
if (! pr_reference_type (p))
- return false;
+ return FALSE;
}
if (! substitute_type (info, name))
- return false;
+ return FALSE;
t = pop_type (info);
if (t == NULL)
- return false;
+ return FALSE;
if (info->parameter != 1)
fprintf (info->f, ", ");
@@ -1773,19 +1813,19 @@ pr_function_parameter (p, name, kind, val)
if (kind == DEBUG_PARM_REG || kind == DEBUG_PARM_REF_REG)
fprintf (info->f, "register ");
- print_vma (val, ab, true, true);
+ print_vma (val, ab, TRUE, TRUE);
fprintf (info->f, "%s /* %s */", t, ab);
free (t);
++info->parameter;
- return true;
+ return TRUE;
}
/* Start writing out a block. */
-static boolean
+static bfd_boolean
pr_start_block (p, addr)
PTR p;
bfd_vma addr;
@@ -1800,17 +1840,17 @@ pr_start_block (p, addr)
}
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "{ /* %s */\n", ab);
info->indent += 2;
- return true;
+ return TRUE;
}
/* Write out line number information. */
-static boolean
+static bfd_boolean
pr_lineno (p, filename, lineno, addr)
PTR p;
const char *filename;
@@ -1821,15 +1861,15 @@ pr_lineno (p, filename, lineno, addr)
char ab[20];
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "/* file %s line %lu addr %s */\n", filename, lineno, ab);
- return true;
+ return TRUE;
}
/* Finish writing out a block. */
-static boolean
+static bfd_boolean
pr_end_block (p, addr)
PTR p;
bfd_vma addr;
@@ -1840,17 +1880,17 @@ pr_end_block (p, addr)
info->indent -= 2;
indent (info);
- print_vma (addr, ab, true, true);
+ print_vma (addr, ab, TRUE, TRUE);
fprintf (info->f, "} /* %s */\n", ab);
- return true;
+ return TRUE;
}
/* Finish writing out a function. */
-static boolean
+static bfd_boolean
pr_end_function (p)
PTR p ATTRIBUTE_UNUSED;
{
- return true;
+ return TRUE;
}
diff --git a/binutils/rdcoff.c b/binutils/rdcoff.c
index 2091964..cca9b0e 100644
--- a/binutils/rdcoff.c
+++ b/binutils/rdcoff.c
@@ -1,5 +1,5 @@
/* stabs.c -- Parse COFF debugging information
- Copyright 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 2000, 2002 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -82,10 +82,11 @@ struct coff_types
debug_type basic[T_MAX + 1];
};
-static debug_type *coff_get_slot PARAMS ((struct coff_types *, int));
+static debug_type *coff_get_slot
+ PARAMS ((struct coff_types *, int));
static debug_type parse_coff_type
PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
- union internal_auxent *, boolean, PTR));
+ union internal_auxent *, bfd_boolean, PTR));
static debug_type parse_coff_base_type
PARAMS ((bfd *, struct coff_symbols *, struct coff_types *, long, int,
union internal_auxent *, PTR));
@@ -95,10 +96,11 @@ static debug_type parse_coff_struct_type
static debug_type parse_coff_enum_type
PARAMS ((bfd *, struct coff_symbols *, struct coff_types *,
union internal_auxent *, PTR));
-static boolean parse_coff_symbol
+static bfd_boolean parse_coff_symbol
PARAMS ((bfd *, struct coff_types *, asymbol *, long,
- struct internal_syment *, PTR, debug_type, boolean));
-static boolean external_coff_symbol_p PARAMS ((int sym_class));
+ struct internal_syment *, PTR, debug_type, bfd_boolean));
+static bfd_boolean external_coff_symbol_p
+ PARAMS ((int sym_class));
/* Return the slot for a type. */
@@ -142,7 +144,7 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
long coff_symno;
int ntype;
union internal_auxent *pauxent;
- boolean useaux;
+ bfd_boolean useaux;
PTR dhandle;
{
debug_type type;
@@ -164,7 +166,7 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
pauxent, useaux, dhandle);
type = debug_make_function_type (dhandle, type, (debug_type *) NULL,
- false);
+ FALSE);
}
else if (ISARY (ntype))
{
@@ -190,14 +192,14 @@ parse_coff_type (abfd, symbols, types, coff_symno, ntype, pauxent, useaux,
}
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
- pauxent, false, dhandle);
+ pauxent, FALSE, dhandle);
type = debug_make_array_type (dhandle, type,
parse_coff_base_type (abfd, symbols,
types,
coff_symno,
T_INT,
NULL, dhandle),
- 0, n - 1, false);
+ 0, n - 1, FALSE);
}
else
{
@@ -248,7 +250,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
PTR dhandle;
{
debug_type ret;
- boolean set_basic;
+ bfd_boolean set_basic;
const char *name;
debug_type *slot;
@@ -257,7 +259,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
&& types->basic[ntype] != DEBUG_TYPE_NULL)
return types->basic[ntype];
- set_basic = true;
+ set_basic = TRUE;
name = NULL;
switch (ntype)
@@ -273,23 +275,23 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
break;
case T_CHAR:
- ret = debug_make_int_type (dhandle, 1, false);
+ ret = debug_make_int_type (dhandle, 1, FALSE);
name = "char";
break;
case T_SHORT:
- ret = debug_make_int_type (dhandle, 2, false);
+ ret = debug_make_int_type (dhandle, 2, FALSE);
name = "short";
break;
case T_INT:
/* FIXME: Perhaps the size should depend upon the architecture. */
- ret = debug_make_int_type (dhandle, 4, false);
+ ret = debug_make_int_type (dhandle, 4, FALSE);
name = "int";
break;
case T_LONG:
- ret = debug_make_int_type (dhandle, 4, false);
+ ret = debug_make_int_type (dhandle, 4, FALSE);
name = "long";
break;
@@ -309,28 +311,28 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
break;
case T_UCHAR:
- ret = debug_make_int_type (dhandle, 1, true);
+ ret = debug_make_int_type (dhandle, 1, TRUE);
name = "unsigned char";
break;
case T_USHORT:
- ret = debug_make_int_type (dhandle, 2, true);
+ ret = debug_make_int_type (dhandle, 2, TRUE);
name = "unsigned short";
break;
case T_UINT:
- ret = debug_make_int_type (dhandle, 4, true);
+ ret = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned int";
break;
case T_ULONG:
- ret = debug_make_int_type (dhandle, 4, true);
+ ret = debug_make_int_type (dhandle, 4, TRUE);
name = "unsigned long";
break;
case T_STRUCT:
if (pauxent == NULL)
- ret = debug_make_struct_type (dhandle, true, 0,
+ ret = debug_make_struct_type (dhandle, TRUE, 0,
(debug_field *) NULL);
else
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
@@ -339,12 +341,12 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
case T_UNION:
if (pauxent == NULL)
- ret = debug_make_struct_type (dhandle, false, 0, (debug_field *) NULL);
+ ret = debug_make_struct_type (dhandle, FALSE, 0, (debug_field *) NULL);
else
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
dhandle);
@@ -352,7 +354,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
case T_ENUM:
@@ -365,7 +367,7 @@ parse_coff_base_type (abfd, symbols, types, coff_symno, ntype, pauxent,
slot = coff_get_slot (types, coff_symno);
*slot = ret;
- set_basic = false;
+ set_basic = FALSE;
break;
}
@@ -395,7 +397,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
int alloc;
debug_field *fields;
int count;
- boolean done;
+ bfd_boolean done;
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
@@ -403,7 +405,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
count = 0;
- done = false;
+ done = FALSE;
while (! done
&& symbols->coff_symno < symend
&& symbols->symno < symbols->symcount)
@@ -456,7 +458,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
break;
case C_EOS:
- done = true;
+ done = TRUE;
break;
}
@@ -466,7 +468,7 @@ parse_coff_struct_type (abfd, symbols, types, ntype, pauxent, dhandle)
debug_field f;
ftype = parse_coff_type (abfd, symbols, types, this_coff_symno,
- syment.n_type, psubaux, true, dhandle);
+ syment.n_type, psubaux, TRUE, dhandle);
f = debug_make_field (dhandle, bfd_asymbol_name (sym), ftype,
bitpos, bitsize, DEBUG_VISIBILITY_PUBLIC);
if (f == DEBUG_FIELD_NULL)
@@ -506,7 +508,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
const char **names;
bfd_signed_vma *vals;
int count;
- boolean done;
+ bfd_boolean done;
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
@@ -515,7 +517,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
vals = (bfd_signed_vma *) xmalloc (alloc * sizeof *vals);
count = 0;
- done = false;
+ done = FALSE;
while (! done
&& symbols->coff_symno < symend
&& symbols->symno < symbols->symcount)
@@ -553,7 +555,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
break;
case C_EOS:
- done = true;
+ done = TRUE;
break;
}
}
@@ -565,7 +567,7 @@ parse_coff_enum_type (abfd, symbols, types, pauxent, dhandle)
/* Handle a single COFF symbol. */
-static boolean
+static bfd_boolean
parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
within_function)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -575,7 +577,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
struct internal_syment *psyment;
PTR dhandle;
debug_type type;
- boolean within_function;
+ bfd_boolean within_function;
{
switch (psyment->n_sclass)
{
@@ -585,14 +587,14 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
case C_AUTO:
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_LOCAL, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_WEAKEXT:
case C_EXT:
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_GLOBAL, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_STAT:
@@ -601,14 +603,14 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
? DEBUG_LOCAL_STATIC
: DEBUG_STATIC),
bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_REG:
/* FIXME: We may need to convert the register number. */
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
DEBUG_REGISTER, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_LABEL:
@@ -617,20 +619,20 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
case C_ARG:
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
DEBUG_PARM_STACK, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_REGPARM:
/* FIXME: We may need to convert the register number. */
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
DEBUG_PARM_REG, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
break;
case C_TPDEF:
type = debug_name_type (dhandle, bfd_asymbol_name (sym), type);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
break;
case C_STRTAG:
@@ -641,7 +643,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
type = debug_tag_type (dhandle, bfd_asymbol_name (sym), type);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
/* Store the named type into the slot, so that references get
the name. */
@@ -654,12 +656,12 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type,
break;
}
- return true;
+ return TRUE;
}
/* Determine if a symbol has external visibility. */
-static boolean
+static bfd_boolean
external_coff_symbol_p (sym_class)
int sym_class;
{
@@ -667,17 +669,17 @@ external_coff_symbol_p (sym_class)
{
case C_EXT:
case C_WEAKEXT:
- return true;
+ return TRUE;
default:
break;
}
- return false;
+ return FALSE;
}
/* This is the main routine. It looks through all the symbols and
handles them. */
-boolean
+bfd_boolean
parse_coff (abfd, syms, symcount, dhandle)
bfd *abfd;
asymbol **syms;
@@ -693,7 +695,7 @@ parse_coff (abfd, syms, symcount, dhandle)
int fntype;
bfd_vma fnend;
alent *linenos;
- boolean within_function;
+ bfd_boolean within_function;
long this_coff_symno;
symbols.syms = syms;
@@ -711,7 +713,7 @@ parse_coff (abfd, syms, symcount, dhandle)
fntype = 0;
fnend = 0;
linenos = NULL;
- within_function = false;
+ within_function = FALSE;
while (symbols.symno < symcount)
{
@@ -728,7 +730,7 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("bfd_coff_get_syment failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
name = bfd_asymbol_name (sym);
@@ -748,7 +750,7 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("bfd_coff_get_auxent failed: %s"),
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
paux = &auxent;
}
@@ -758,7 +760,7 @@ parse_coff (abfd, syms, symcount, dhandle)
/* The last C_FILE symbol points to the first external
symbol. */
if (! debug_set_filename (dhandle, "*globals*"))
- return false;
+ return FALSE;
}
switch (syment.n_sclass)
@@ -776,7 +778,7 @@ parse_coff (abfd, syms, symcount, dhandle)
case C_FILE:
next_c_file = syment.n_value;
if (! debug_set_filename (dhandle, name))
- return false;
+ return FALSE;
break;
case C_STAT:
@@ -800,12 +802,12 @@ parse_coff (abfd, syms, symcount, dhandle)
break;
}
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- syment.n_type, paux, true, dhandle);
+ syment.n_type, paux, TRUE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
dhandle, type, within_function))
- return false;
+ return FALSE;
break;
case C_FCN:
@@ -815,18 +817,18 @@ parse_coff (abfd, syms, symcount, dhandle)
{
non_fatal (_("%ld: .bf without preceding function"),
this_coff_symno);
- return false;
+ return FALSE;
}
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- DECREF (fntype), paux, false, dhandle);
+ DECREF (fntype), paux, FALSE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_function (dhandle, fnname, type,
external_coff_symbol_p (fnclass),
bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
if (linenos != NULL)
{
@@ -847,7 +849,7 @@ parse_coff (abfd, syms, symcount, dhandle)
if (! debug_record_line (dhandle,
linenos->line_number + base,
linenos->u.offset + addr))
- return false;
+ return FALSE;
++linenos;
}
}
@@ -857,23 +859,23 @@ parse_coff (abfd, syms, symcount, dhandle)
fnclass = 0;
fntype = 0;
- within_function = true;
+ within_function = TRUE;
}
else if (strcmp (name, ".ef") == 0)
{
if (! within_function)
{
non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
- return false;
+ return FALSE;
}
if (bfd_asymbol_value (sym) > fnend)
fnend = bfd_asymbol_value (sym);
if (! debug_end_function (dhandle, fnend))
- return false;
+ return FALSE;
fnend = 0;
- within_function = false;
+ within_function = FALSE;
}
break;
@@ -881,26 +883,26 @@ parse_coff (abfd, syms, symcount, dhandle)
if (strcmp (name, ".bb") == 0)
{
if (! debug_start_block (dhandle, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
}
else if (strcmp (name, ".eb") == 0)
{
if (! debug_end_block (dhandle, bfd_asymbol_value (sym)))
- return false;
+ return FALSE;
}
break;
default:
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
- syment.n_type, paux, true, dhandle);
+ syment.n_type, paux, TRUE, dhandle);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
dhandle, type, within_function))
- return false;
+ return FALSE;
break;
}
}
- return true;
+ return TRUE;
}
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index b6ca9e1..2e0fd67 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -29,14 +29,18 @@
#include "debug.h"
#include "budbg.h"
-static boolean read_section_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_symbol_stabs_debugging_info
- PARAMS ((bfd *, asymbol **, long, PTR, boolean *));
-static boolean read_ieee_debugging_info PARAMS ((bfd *, PTR, boolean *));
-static void save_stab PARAMS ((int, int, bfd_vma, const char *));
-static void stab_context PARAMS ((void));
-static void free_saved_stabs PARAMS ((void));
+static bfd_boolean read_section_stabs_debugging_info
+ PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
+static bfd_boolean read_symbol_stabs_debugging_info
+ PARAMS ((bfd *, asymbol **, long, PTR, bfd_boolean *));
+static bfd_boolean read_ieee_debugging_info
+ PARAMS ((bfd *, PTR, bfd_boolean *));
+static void save_stab
+ PARAMS ((int, int, bfd_vma, const char *));
+static void stab_context
+ PARAMS ((void));
+static void free_saved_stabs
+ PARAMS ((void));
/* Read debugging information from a BFD. Returns a generic debugging
pointer. */
@@ -48,7 +52,7 @@ read_debugging_info (abfd, syms, symcount)
long symcount;
{
PTR dhandle;
- boolean found;
+ bfd_boolean found;
dhandle = debug_init ();
if (dhandle == NULL)
@@ -79,7 +83,7 @@ read_debugging_info (abfd, syms, symcount)
{
if (! parse_coff (abfd, syms, symcount, dhandle))
return NULL;
- found = true;
+ found = TRUE;
}
if (! found)
@@ -94,13 +98,13 @@ read_debugging_info (abfd, syms, symcount)
/* Read stabs in sections debugging information from a BFD. */
-static boolean
+static bfd_boolean
read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
bfd *abfd;
asymbol **syms;
long symcount;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
static struct
{
@@ -111,7 +115,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
unsigned int i;
PTR shandle;
- *pfound = false;
+ *pfound = FALSE;
shandle = NULL;
for (i = 0; i < sizeof names / sizeof names[0]; i++)
@@ -134,7 +138,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].secname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
strsize = bfd_section_size (abfd, strsec);
@@ -144,17 +148,17 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
fprintf (stderr, "%s: %s: %s\n",
bfd_get_filename (abfd), names[i].strsecname,
bfd_errmsg (bfd_get_error ()));
- return false;
+ return FALSE;
}
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, true, syms, symcount);
+ shandle = start_stab (dhandle, abfd, TRUE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
stroff = 0;
next_stroff = 0;
@@ -227,7 +231,7 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code
@@ -248,21 +252,21 @@ read_section_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read stabs in the symbol table. */
-static boolean
+static bfd_boolean
read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
bfd *abfd;
asymbol **syms;
long symcount;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
PTR shandle;
asymbol **ps, **symend;
@@ -282,12 +286,12 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle == NULL)
{
- shandle = start_stab (dhandle, abfd, false, syms, symcount);
+ shandle = start_stab (dhandle, abfd, FALSE, syms, symcount);
if (shandle == NULL)
- return false;
+ return FALSE;
}
- *pfound = true;
+ *pfound = TRUE;
s = i.name;
f = NULL;
@@ -314,7 +318,7 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
{
stab_context ();
free_saved_stabs ();
- return false;
+ return FALSE;
}
/* Don't free f, since I think the stabs code expects
@@ -328,19 +332,19 @@ read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle, pfound)
if (shandle != NULL)
{
if (! finish_stab (dhandle, shandle))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Read IEEE debugging information. */
-static boolean
+static bfd_boolean
read_ieee_debugging_info (abfd, dhandle, pfound)
bfd *abfd;
PTR dhandle;
- boolean *pfound;
+ bfd_boolean *pfound;
{
asection *dsec;
bfd_size_type size;
@@ -351,21 +355,21 @@ read_ieee_debugging_info (abfd, dhandle, pfound)
dsec = bfd_get_section_by_name (abfd, ".debug");
if (dsec == NULL)
- return true;
+ return TRUE;
size = bfd_section_size (abfd, dsec);
contents = (bfd_byte *) xmalloc (size);
if (! bfd_get_section_contents (abfd, dsec, contents, 0, size))
- return false;
+ return FALSE;
if (! parse_ieee (dhandle, abfd, contents, size))
- return false;
+ return FALSE;
free (contents);
- *pfound = true;
+ *pfound = TRUE;
- return true;
+ return TRUE;
}
/* Record stabs strings, so that we can give some context for errors. */
diff --git a/binutils/readelf.c b/binutils/readelf.c
index ba9529a..ca996ac 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -31,7 +31,7 @@
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
as this will allow us to read in and parse 64bit and 32bit ELF files.
- Only do this if we belive that the compiler can support a 64 bit
+ Only do this if we believe that the compiler can support a 64 bit
data type. For now we only rely on GCC being able to do this. */
#define BFD64
#endif
@@ -89,58 +89,58 @@
#include "bucomm.h"
#include "getopt.h"
-char * program_name = "readelf";
-unsigned int dynamic_addr;
-bfd_size_type dynamic_size;
-unsigned int rela_addr;
-unsigned int rela_size;
-char * dynamic_strings;
-char * string_table;
-unsigned long string_table_length;
-unsigned long num_dynamic_syms;
-Elf_Internal_Sym * dynamic_symbols;
-Elf_Internal_Syminfo * dynamic_syminfo;
-unsigned long dynamic_syminfo_offset;
-unsigned int dynamic_syminfo_nent;
-char program_interpreter [64];
-int dynamic_info[DT_JMPREL + 1];
-int version_info[16];
-int loadaddr = 0;
-Elf_Internal_Ehdr elf_header;
-Elf_Internal_Shdr * section_headers;
-Elf_Internal_Dyn * dynamic_segment;
-Elf_Internal_Shdr * symtab_shndx_hdr;
-int show_name;
-int do_dynamic;
-int do_syms;
-int do_reloc;
-int do_sections;
-int do_segments;
-int do_unwind;
-int do_using_dynamic;
-int do_header;
-int do_dump;
-int do_version;
-int do_wide;
-int do_histogram;
-int do_debugging;
-int do_debug_info;
-int do_debug_abbrevs;
-int do_debug_lines;
-int do_debug_pubnames;
-int do_debug_aranges;
-int do_debug_frames;
-int do_debug_frames_interp;
-int do_debug_macinfo;
-int do_debug_str;
-int do_debug_loc;
-int do_arch;
-int do_notes;
-int is_32bit_elf;
+char *program_name = "readelf";
+unsigned int dynamic_addr;
+bfd_size_type dynamic_size;
+unsigned int rela_addr;
+unsigned int rela_size;
+char *dynamic_strings;
+char *string_table;
+unsigned long string_table_length;
+unsigned long num_dynamic_syms;
+Elf_Internal_Sym *dynamic_symbols;
+Elf_Internal_Syminfo *dynamic_syminfo;
+unsigned long dynamic_syminfo_offset;
+unsigned int dynamic_syminfo_nent;
+char program_interpreter[64];
+int dynamic_info[DT_JMPREL + 1];
+int version_info[16];
+int loadaddr = 0;
+Elf_Internal_Ehdr elf_header;
+Elf_Internal_Shdr *section_headers;
+Elf_Internal_Dyn *dynamic_segment;
+Elf_Internal_Shdr *symtab_shndx_hdr;
+int show_name;
+int do_dynamic;
+int do_syms;
+int do_reloc;
+int do_sections;
+int do_segments;
+int do_unwind;
+int do_using_dynamic;
+int do_header;
+int do_dump;
+int do_version;
+int do_wide;
+int do_histogram;
+int do_debugging;
+int do_debug_info;
+int do_debug_abbrevs;
+int do_debug_lines;
+int do_debug_pubnames;
+int do_debug_aranges;
+int do_debug_frames;
+int do_debug_frames_interp;
+int do_debug_macinfo;
+int do_debug_str;
+int do_debug_loc;
+int do_arch;
+int do_notes;
+int is_32bit_elf;
/* A dynamic array of flags indicating which sections require dumping. */
-char * dump_sects = NULL;
-unsigned int num_dump_sects = 0;
+char *dump_sects = NULL;
+unsigned int num_dump_sects = 0;
#define HEX_DUMP (1 << 0)
#define DISASS_DUMP (1 << 1)
@@ -160,120 +160,226 @@ typedef enum print_mode
print_mode;
/* Forward declarations for dumb compilers. */
-static void print_vma PARAMS ((bfd_vma, print_mode));
-static void print_symbol PARAMS ((int, const char *));
-static bfd_vma (* byte_get) PARAMS ((unsigned char *, int));
-static bfd_vma byte_get_little_endian PARAMS ((unsigned char *, int));
-static bfd_vma byte_get_big_endian PARAMS ((unsigned char *, int));
-static const char * get_mips_dynamic_type PARAMS ((unsigned long));
-static const char * get_sparc64_dynamic_type PARAMS ((unsigned long));
-static const char * get_ppc64_dynamic_type PARAMS ((unsigned long));
-static const char * get_parisc_dynamic_type PARAMS ((unsigned long));
-static const char * get_dynamic_type PARAMS ((unsigned long));
-static int slurp_rela_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *));
-static int slurp_rel_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *));
-static int dump_relocations PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Sym *, unsigned long, char *, int));
-static char * get_file_type PARAMS ((unsigned));
-static char * get_machine_name PARAMS ((unsigned));
-static void decode_ARM_machine_flags PARAMS ((unsigned, char []));
-static char * get_machine_flags PARAMS ((unsigned, unsigned));
-static const char * get_mips_segment_type PARAMS ((unsigned long));
-static const char * get_parisc_segment_type PARAMS ((unsigned long));
-static const char * get_ia64_segment_type PARAMS ((unsigned long));
-static const char * get_segment_type PARAMS ((unsigned long));
-static const char * get_mips_section_type_name PARAMS ((unsigned int));
-static const char * get_parisc_section_type_name PARAMS ((unsigned int));
-static const char * get_ia64_section_type_name PARAMS ((unsigned int));
-static const char * get_section_type_name PARAMS ((unsigned int));
-static const char * get_symbol_binding PARAMS ((unsigned int));
-static const char * get_symbol_type PARAMS ((unsigned int));
-static const char * get_symbol_visibility PARAMS ((unsigned int));
-static const char * get_symbol_index_type PARAMS ((unsigned int));
-static const char * get_dynamic_flags PARAMS ((bfd_vma));
-static void usage PARAMS ((void));
-static void parse_args PARAMS ((int, char **));
-static int process_file_header PARAMS ((void));
-static int process_program_headers PARAMS ((FILE *));
-static int process_section_headers PARAMS ((FILE *));
-static int process_unwind PARAMS ((FILE *));
-static void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *));
-static void dynamic_segment_parisc_val PARAMS ((Elf_Internal_Dyn *));
-static int process_dynamic_segment PARAMS ((FILE *));
-static int process_symbol_table PARAMS ((FILE *));
-static int process_syminfo PARAMS ((FILE *));
-static int process_section_contents PARAMS ((FILE *));
-static void process_mips_fpe_exception PARAMS ((int));
-static int process_mips_specific PARAMS ((FILE *));
-static int process_file PARAMS ((char *));
-static int process_relocs PARAMS ((FILE *));
-static int process_version_sections PARAMS ((FILE *));
-static char * get_ver_flags PARAMS ((unsigned int));
-static int get_32bit_section_headers PARAMS ((FILE *, unsigned int));
-static int get_64bit_section_headers PARAMS ((FILE *, unsigned int));
-static int get_32bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
-static int get_64bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *));
-static int get_file_header PARAMS ((FILE *));
-static Elf_Internal_Sym * get_32bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
-static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
-static const char * get_elf_section_flags PARAMS ((bfd_vma));
-static int * get_dynamic_data PARAMS ((FILE *, unsigned int));
-static int get_32bit_dynamic_segment PARAMS ((FILE *));
-static int get_64bit_dynamic_segment PARAMS ((FILE *));
+static void print_vma
+ PARAMS ((bfd_vma, print_mode));
+static void print_symbol
+ PARAMS ((int, const char *));
+static bfd_vma (*byte_get)
+ PARAMS ((unsigned char *, int));
+static bfd_vma byte_get_little_endian
+ PARAMS ((unsigned char *, int));
+static bfd_vma byte_get_big_endian
+ PARAMS ((unsigned char *, int));
+static const char *get_mips_dynamic_type
+ PARAMS ((unsigned long));
+static const char *get_sparc64_dynamic_type
+ PARAMS ((unsigned long));
+static const char *get_ppc64_dynamic_type
+ PARAMS ((unsigned long));
+static const char *get_parisc_dynamic_type
+ PARAMS ((unsigned long));
+static const char *get_dynamic_type
+ PARAMS ((unsigned long));
+static int slurp_rela_relocs
+ PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **,
+ unsigned long *));
+static int slurp_rel_relocs
+ PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **,
+ unsigned long *));
+static int dump_relocations
+ PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Sym *,
+ unsigned long, char *, int));
+static char *get_file_type
+ PARAMS ((unsigned));
+static char *get_machine_name
+ PARAMS ((unsigned));
+static void decode_ARM_machine_flags
+ PARAMS ((unsigned, char[]));
+static char *get_machine_flags
+ PARAMS ((unsigned, unsigned));
+static const char *get_mips_segment_type
+ PARAMS ((unsigned long));
+static const char *get_parisc_segment_type
+ PARAMS ((unsigned long));
+static const char *get_ia64_segment_type
+ PARAMS ((unsigned long));
+static const char *get_segment_type
+ PARAMS ((unsigned long));
+static const char *get_mips_section_type_name
+ PARAMS ((unsigned int));
+static const char *get_parisc_section_type_name
+ PARAMS ((unsigned int));
+static const char *get_ia64_section_type_name
+ PARAMS ((unsigned int));
+static const char *get_section_type_name
+ PARAMS ((unsigned int));
+static const char *get_symbol_binding
+ PARAMS ((unsigned int));
+static const char *get_symbol_type
+ PARAMS ((unsigned int));
+static const char *get_symbol_visibility
+ PARAMS ((unsigned int));
+static const char *get_symbol_index_type
+ PARAMS ((unsigned int));
+static const char *get_dynamic_flags
+ PARAMS ((bfd_vma));
+static void usage
+ PARAMS ((void));
+static void parse_args
+ PARAMS ((int, char **));
+static int process_file_header
+ PARAMS ((void));
+static int process_program_headers
+ PARAMS ((FILE *));
+static int process_section_headers
+ PARAMS ((FILE *));
+static int process_unwind
+ PARAMS ((FILE *));
+static void dynamic_segment_mips_val
+ PARAMS ((Elf_Internal_Dyn *));
+static void dynamic_segment_parisc_val
+ PARAMS ((Elf_Internal_Dyn *));
+static int process_dynamic_segment
+ PARAMS ((FILE *));
+static int process_symbol_table
+ PARAMS ((FILE *));
+static int process_syminfo
+ PARAMS ((FILE *));
+static int process_section_contents
+ PARAMS ((FILE *));
+static void process_mips_fpe_exception
+ PARAMS ((int));
+static int process_mips_specific
+ PARAMS ((FILE *));
+static int process_file
+ PARAMS ((char *));
+static int process_relocs
+ PARAMS ((FILE *));
+static int process_version_sections
+ PARAMS ((FILE *));
+static char *get_ver_flags
+ PARAMS ((unsigned int));
+static int get_32bit_section_headers
+ PARAMS ((FILE *, unsigned int));
+static int get_64bit_section_headers
+ PARAMS ((FILE *, unsigned int));
+static int get_32bit_program_headers
+ PARAMS ((FILE *, Elf_Internal_Phdr *));
+static int get_64bit_program_headers
+ PARAMS ((FILE *, Elf_Internal_Phdr *));
+static int get_file_header
+ PARAMS ((FILE *));
+static Elf_Internal_Sym *get_32bit_elf_symbols
+ PARAMS ((FILE *, Elf_Internal_Shdr *));
+static Elf_Internal_Sym *get_64bit_elf_symbols
+ PARAMS ((FILE *, Elf_Internal_Shdr *));
+static const char *get_elf_section_flags
+ PARAMS ((bfd_vma));
+static int *get_dynamic_data
+ PARAMS ((FILE *, unsigned int));
+static int get_32bit_dynamic_segment
+ PARAMS ((FILE *));
+static int get_64bit_dynamic_segment
+ PARAMS ((FILE *));
#ifdef SUPPORT_DISASSEMBLY
-static int disassemble_section PARAMS ((Elf_Internal_Shdr *, FILE *));
+static int disassemble_section
+ PARAMS ((Elf_Internal_Shdr *, FILE *));
#endif
-static int dump_section PARAMS ((Elf_Internal_Shdr *, FILE *));
-static int display_debug_section PARAMS ((Elf_Internal_Shdr *, FILE *));
-static int display_debug_info PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_not_supported PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int prescan_debug_info PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_lines PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_pubnames PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_abbrev PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_aranges PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_frames PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_macinfo PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_str PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static int display_debug_loc PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
-static unsigned char * process_abbrev_section PARAMS ((unsigned char *, unsigned char *));
-static void load_debug_str PARAMS ((FILE *));
-static void free_debug_str PARAMS ((void));
-static const char * fetch_indirect_string PARAMS ((unsigned long));
-static void load_debug_loc PARAMS ((FILE *));
-static void free_debug_loc PARAMS ((void));
-static unsigned long read_leb128 PARAMS ((unsigned char *, int *, int));
-static int process_extended_line_op PARAMS ((unsigned char *, int, int));
-static void reset_state_machine PARAMS ((int));
-static char * get_TAG_name PARAMS ((unsigned long));
-static char * get_AT_name PARAMS ((unsigned long));
-static char * get_FORM_name PARAMS ((unsigned long));
-static void free_abbrevs PARAMS ((void));
-static void add_abbrev PARAMS ((unsigned long, unsigned long, int));
-static void add_abbrev_attr PARAMS ((unsigned long, unsigned long));
-static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
-static unsigned char * read_and_display_attr_value PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
-static unsigned char * display_block PARAMS ((unsigned char *, unsigned long));
-static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long));
-static void request_dump PARAMS ((unsigned int, int));
-static const char * get_elf_class PARAMS ((unsigned int));
-static const char * get_data_encoding PARAMS ((unsigned int));
-static const char * get_osabi_name PARAMS ((unsigned int));
-static int guess_is_rela PARAMS ((unsigned long));
-static const char * get_note_type PARAMS ((unsigned int));
-static const char * get_netbsd_elfcore_note_type PARAMS ((unsigned int));
-static int process_note PARAMS ((Elf_Internal_Note *));
-static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma));
-static int process_corefile_note_segments PARAMS ((FILE *));
-static int process_corefile_contents PARAMS ((FILE *));
-static int process_arch_specific PARAMS ((FILE *));
-static int process_gnu_liblist PARAMS ((FILE *));
+static int dump_section
+ PARAMS ((Elf_Internal_Shdr *, FILE *));
+static int display_debug_section
+ PARAMS ((Elf_Internal_Shdr *, FILE *));
+static int display_debug_info
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_not_supported
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int prescan_debug_info
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_lines
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_pubnames
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_abbrev
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_aranges
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_frames
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_macinfo
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_str
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_loc
+ PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+static unsigned char *process_abbrev_section
+ PARAMS ((unsigned char *, unsigned char *));
+static void load_debug_str
+ PARAMS ((FILE *));
+static void free_debug_str
+ PARAMS ((void));
+static const char *fetch_indirect_string
+ PARAMS ((unsigned long));
+static void load_debug_loc
+ PARAMS ((FILE *));
+static void free_debug_loc
+ PARAMS ((void));
+static unsigned long read_leb128
+ PARAMS ((unsigned char *, int *, int));
+static int process_extended_line_op
+ PARAMS ((unsigned char *, int, int));
+static void reset_state_machine
+ PARAMS ((int));
+static char *get_TAG_name
+ PARAMS ((unsigned long));
+static char *get_AT_name
+ PARAMS ((unsigned long));
+static char *get_FORM_name
+ PARAMS ((unsigned long));
+static void free_abbrevs
+ PARAMS ((void));
+static void add_abbrev
+ PARAMS ((unsigned long, unsigned long, int));
+static void add_abbrev_attr
+ PARAMS ((unsigned long, unsigned long));
+static unsigned char *read_and_display_attr
+ PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long,
+ unsigned long));
+static unsigned char *read_and_display_attr_value
+ PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long,
+ unsigned long));
+static unsigned char *display_block
+ PARAMS ((unsigned char *, unsigned long));
+static void decode_location_expression
+ PARAMS ((unsigned char *, unsigned int, unsigned long));
+static void request_dump
+ PARAMS ((unsigned int, int));
+static const char *get_elf_class
+ PARAMS ((unsigned int));
+static const char *get_data_encoding
+ PARAMS ((unsigned int));
+static const char *get_osabi_name
+ PARAMS ((unsigned int));
+static int guess_is_rela
+ PARAMS ((unsigned long));
+static const char *get_note_type
+ PARAMS ((unsigned int));
+static const char *get_netbsd_elfcore_note_type
+ PARAMS ((unsigned int));
+static int process_note
+ PARAMS ((Elf_Internal_Note *));
+static int process_corefile_note_segment
+ PARAMS ((FILE *, bfd_vma, bfd_vma));
+static int process_corefile_note_segments
+ PARAMS ((FILE *));
+static int process_corefile_contents
+ PARAMS ((FILE *));
+static int process_arch_specific
+ PARAMS ((FILE *));
+static int process_gnu_liblist
+ PARAMS ((FILE *));
typedef int Elf32_Word;
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
#define UNKNOWN -1
#define SECTION_NAME(X) ((X) == NULL ? "<none>" : \
@@ -390,17 +496,17 @@ get_data (var, file, offset, size, reason)
static bfd_vma
byte_get_little_endian (field, size)
- unsigned char * field;
- int size;
+ unsigned char *field;
+ int size;
{
switch (size)
{
case 1:
- return * field;
+ return *field;
case 2:
- return ((unsigned int) (field [0]))
- | (((unsigned int) (field [1])) << 8);
+ return ((unsigned int) (field[0]))
+ | (((unsigned int) (field[1])) << 8);
#ifndef BFD64
case 8:
@@ -410,10 +516,10 @@ byte_get_little_endian (field, size)
/* Fall through. */
#endif
case 4:
- return ((unsigned long) (field [0]))
- | (((unsigned long) (field [1])) << 8)
- | (((unsigned long) (field [2])) << 16)
- | (((unsigned long) (field [3])) << 24);
+ return ((unsigned long) (field[0]))
+ | (((unsigned long) (field[1])) << 8)
+ | (((unsigned long) (field[2])) << 16)
+ | (((unsigned long) (field[3])) << 24);
#ifdef BFD64
case 8:
@@ -422,14 +528,14 @@ byte_get_little_endian (field, size)
It means that we are loading an 8 byte value from a field
in an external structure into an 8 byte value in a field
in an internal strcuture. */
- return ((bfd_vma) (field [0]))
- | (((bfd_vma) (field [1])) << 8)
- | (((bfd_vma) (field [2])) << 16)
- | (((bfd_vma) (field [3])) << 24)
- | (((bfd_vma) (field [4])) << 32)
- | (((bfd_vma) (field [5])) << 40)
- | (((bfd_vma) (field [6])) << 48)
- | (((bfd_vma) (field [7])) << 56);
+ return ((bfd_vma) (field[0]))
+ | (((bfd_vma) (field[1])) << 8)
+ | (((bfd_vma) (field[2])) << 16)
+ | (((bfd_vma) (field[3])) << 24)
+ | (((bfd_vma) (field[4])) << 32)
+ | (((bfd_vma) (field[5])) << 40)
+ | (((bfd_vma) (field[6])) << 48)
+ | (((bfd_vma) (field[7])) << 56);
#endif
default:
error (_("Unhandled data length: %d\n"), size);
@@ -535,7 +641,7 @@ print_vma (vma, mode)
static void
print_symbol (width, symbol)
int width;
- const char * symbol;
+ const char *symbol;
{
if (do_wide)
printf ("%s", symbol);
@@ -547,31 +653,31 @@ print_symbol (width, symbol)
static bfd_vma
byte_get_big_endian (field, size)
- unsigned char * field;
- int size;
+ unsigned char *field;
+ int size;
{
switch (size)
{
case 1:
- return * field;
+ return *field;
case 2:
- return ((unsigned int) (field [1])) | (((int) (field [0])) << 8);
+ return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
case 4:
- return ((unsigned long) (field [3]))
- | (((unsigned long) (field [2])) << 8)
- | (((unsigned long) (field [1])) << 16)
- | (((unsigned long) (field [0])) << 24);
+ return ((unsigned long) (field[3]))
+ | (((unsigned long) (field[2])) << 8)
+ | (((unsigned long) (field[1])) << 16)
+ | (((unsigned long) (field[0])) << 24);
#ifndef BFD64
case 8:
/* Although we are extracing data from an 8 byte wide field, we
are returning only 4 bytes of data. */
- return ((unsigned long) (field [7]))
- | (((unsigned long) (field [6])) << 8)
- | (((unsigned long) (field [5])) << 16)
- | (((unsigned long) (field [4])) << 24);
+ return ((unsigned long) (field[7]))
+ | (((unsigned long) (field[6])) << 8)
+ | (((unsigned long) (field[5])) << 16)
+ | (((unsigned long) (field[4])) << 24);
#else
case 8:
case -8:
@@ -579,14 +685,14 @@ byte_get_big_endian (field, size)
It means that we are loading an 8 byte value from a field
in an external structure into an 8 byte value in a field
in an internal strcuture. */
- return ((bfd_vma) (field [7]))
- | (((bfd_vma) (field [6])) << 8)
- | (((bfd_vma) (field [5])) << 16)
- | (((bfd_vma) (field [4])) << 24)
- | (((bfd_vma) (field [3])) << 32)
- | (((bfd_vma) (field [2])) << 40)
- | (((bfd_vma) (field [1])) << 48)
- | (((bfd_vma) (field [0])) << 56);
+ return ((bfd_vma) (field[7]))
+ | (((bfd_vma) (field[6])) << 8)
+ | (((bfd_vma) (field[5])) << 16)
+ | (((bfd_vma) (field[4])) << 24)
+ | (((bfd_vma) (field[3])) << 32)
+ | (((bfd_vma) (field[2])) << 40)
+ | (((bfd_vma) (field[1])) << 48)
+ | (((bfd_vma) (field[0])) << 56);
#endif
default:
@@ -695,7 +801,7 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
if (is_32bit_elf)
{
- Elf32_External_Rela * erelas;
+ Elf32_External_Rela *erelas;
erelas = (Elf32_External_Rela *) get_data (NULL, file, rel_offset,
rel_size, _("relocs"));
@@ -724,7 +830,7 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
}
else
{
- Elf64_External_Rela * erelas;
+ Elf64_External_Rela *erelas;
erelas = (Elf64_External_Rela *) get_data (NULL, file, rel_offset,
rel_size, _("relocs"));
@@ -770,7 +876,7 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
if (is_32bit_elf)
{
- Elf32_External_Rel * erels;
+ Elf32_External_Rel *erels;
erels = (Elf32_External_Rel *) get_data (NULL, file, rel_offset,
rel_size, _("relocs"));
@@ -798,7 +904,7 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
}
else
{
- Elf64_External_Rel * erels;
+ Elf64_External_Rel *erels;
erels = (Elf64_External_Rel *) get_data (NULL, file, rel_offset,
rel_size, _("relocs"));
@@ -832,16 +938,16 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
/* Display the contents of the relocation data found at the specified offset. */
static int
dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
- FILE * file;
- unsigned long rel_offset;
- unsigned long rel_size;
- Elf_Internal_Sym * symtab;
- unsigned long nsyms;
- char * strtab;
- int is_rela;
+ FILE *file;
+ unsigned long rel_offset;
+ unsigned long rel_size;
+ Elf_Internal_Sym *symtab;
+ unsigned long nsyms;
+ char *strtab;
+ int is_rela;
{
- unsigned int i;
- Elf_Internal_Rela * rels;
+ unsigned int i;
+ Elf_Internal_Rela *rels;
if (is_rela == UNKNOWN)
@@ -895,18 +1001,18 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
for (i = 0; i < rel_size; i++)
{
- const char * rtype;
- const char * rtype2 = NULL;
- const char * rtype3 = NULL;
- bfd_vma offset;
- bfd_vma info;
- bfd_vma symtab_index;
- bfd_vma type;
- bfd_vma type2 = (bfd_vma) NULL;
- bfd_vma type3 = (bfd_vma) NULL;
+ const char *rtype;
+ const char *rtype2 = NULL;
+ const char *rtype3 = NULL;
+ bfd_vma offset;
+ bfd_vma info;
+ bfd_vma symtab_index;
+ bfd_vma type;
+ bfd_vma type2 = (bfd_vma) NULL;
+ bfd_vma type3 = (bfd_vma) NULL;
- offset = rels [i].r_offset;
- info = rels [i].r_info;
+ offset = rels[i].r_offset;
+ info = rels[i].r_info;
if (is_32bit_elf)
{
@@ -1150,7 +1256,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
else
{
- Elf_Internal_Sym * psym;
+ Elf_Internal_Sym *psym;
psym = symtab + symtab_index;
@@ -1194,7 +1300,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
print_symbol (22, strtab + psym->st_name);
if (is_rela)
- printf (" + %lx", (unsigned long) rels [i].r_addend);
+ printf (" + %lx", (unsigned long) rels[i].r_addend);
}
}
else if (is_rela)
@@ -1350,7 +1456,7 @@ static const char *
get_dynamic_type (type)
unsigned long type;
{
- static char buff [32];
+ static char buff[32];
switch (type)
{
@@ -1429,7 +1535,7 @@ get_dynamic_type (type)
default:
if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -1455,7 +1561,7 @@ get_dynamic_type (type)
}
else if ((type >= DT_LOOS) && (type <= DT_HIOS))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -1483,7 +1589,7 @@ static char *
get_file_type (e_type)
unsigned e_type;
{
- static char buff [32];
+ static char buff[32];
switch (e_type)
{
@@ -1508,7 +1614,7 @@ static char *
get_machine_name (e_machine)
unsigned e_machine;
{
- static char buff [64]; /* XXX */
+ static char buff[64]; /* XXX */
switch (e_machine)
{
@@ -1533,7 +1639,7 @@ get_machine_name (e_machine)
case EM_V800: return "NEC V800";
case EM_FR20: return "Fujitsu FR20";
case EM_RH32: return "TRW RH32";
- case EM_MCORE: return "MCORE";
+ case EM_MCORE: return "MCORE";
case EM_ARM: return "ARM";
case EM_OLD_ALPHA: return "Digital Alpha (old)";
case EM_SH: return "Hitachi SH";
@@ -1552,7 +1658,7 @@ get_machine_name (e_machine)
case EM_CYGNUS_D10V:
case EM_D10V: return "d10v";
case EM_CYGNUS_D30V:
- case EM_D30V: return "d30v";
+ case EM_D30V: return "d30v";
case EM_CYGNUS_M32R:
case EM_M32R: return "Mitsubishi M32r";
case EM_CYGNUS_V850:
@@ -1563,9 +1669,9 @@ get_machine_name (e_machine)
case EM_MN10200: return "mn10200";
case EM_CYGNUS_FR30:
case EM_FR30: return "Fujitsu FR30";
- case EM_CYGNUS_FRV: return "Fujitsu FR-V";
+ case EM_CYGNUS_FRV: return "Fujitsu FR-V";
case EM_PJ_OLD:
- case EM_PJ: return "picoJava";
+ case EM_PJ: return "picoJava";
case EM_MMA: return "Fujitsu Multimedia Accelerator";
case EM_PCP: return "Siemens PCP";
case EM_NCPU: return "Sony nCPU embedded RISC processor";
@@ -1585,23 +1691,23 @@ get_machine_name (e_machine)
case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller";
case EM_VAX: return "Digital VAX";
case EM_AVR_OLD:
- case EM_AVR: return "Atmel AVR 8-bit microcontroller";
+ case EM_AVR: return "Atmel AVR 8-bit microcontroller";
case EM_CRIS: return "Axis Communications 32-bit embedded processor";
case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu";
case EM_FIREPATH: return "Element 14 64-bit DSP processor";
case EM_ZSP: return "LSI Logic's 16-bit DSP processor";
- case EM_MMIX: return "Donald Knuth's educational 64-bit processor";
+ case EM_MMIX: return "Donald Knuth's educational 64-bit processor";
case EM_HUANY: return "Harvard Universitys's machine-independent object format";
case EM_PRISM: return "SiTera Prism";
case EM_X86_64: return "Advanced Micro Devices X86-64";
case EM_S390_OLD:
- case EM_S390: return "IBM S/390";
+ case EM_S390: return "IBM S/390";
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";
case EM_DLX: return "OpenDLX";
case EM_IP2K_OLD:
- case EM_IP2K: return "Ubicom IP2xxx 8-bit microcontrollers";
+ case EM_IP2K: return "Ubicom IP2xxx 8-bit microcontrollers";
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
@@ -1755,7 +1861,7 @@ get_machine_flags (e_flags, e_machine)
unsigned e_flags;
unsigned e_machine;
{
- static char buf [1024];
+ static char buf[1024];
buf[0] = '\0';
@@ -2050,17 +2156,17 @@ static const char *
get_segment_type (p_type)
unsigned long p_type;
{
- static char buff [32];
+ static char buff[32];
switch (p_type)
{
- case PT_NULL: return "NULL";
- case PT_LOAD: return "LOAD";
+ case PT_NULL: return "NULL";
+ case PT_LOAD: return "LOAD";
case PT_DYNAMIC: return "DYNAMIC";
- case PT_INTERP: return "INTERP";
- case PT_NOTE: return "NOTE";
- case PT_SHLIB: return "SHLIB";
- case PT_PHDR: return "PHDR";
+ case PT_INTERP: return "INTERP";
+ case PT_NOTE: return "NOTE";
+ case PT_SHLIB: return "SHLIB";
+ case PT_PHDR: return "PHDR";
case PT_TLS: return "TLS";
case PT_GNU_EH_FRAME:
@@ -2069,7 +2175,7 @@ get_segment_type (p_type)
default:
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2095,7 +2201,7 @@ get_segment_type (p_type)
}
else if ((p_type >= PT_LOOS) && (p_type <= PT_HIOS))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2128,44 +2234,44 @@ get_mips_section_type_name (sh_type)
{
switch (sh_type)
{
- case SHT_MIPS_LIBLIST: return "MIPS_LIBLIST";
- case SHT_MIPS_MSYM: return "MIPS_MSYM";
- case SHT_MIPS_CONFLICT: return "MIPS_CONFLICT";
- case SHT_MIPS_GPTAB: return "MIPS_GPTAB";
- case SHT_MIPS_UCODE: return "MIPS_UCODE";
- case SHT_MIPS_DEBUG: return "MIPS_DEBUG";
- case SHT_MIPS_REGINFO: return "MIPS_REGINFO";
- case SHT_MIPS_PACKAGE: return "MIPS_PACKAGE";
- case SHT_MIPS_PACKSYM: return "MIPS_PACKSYM";
- case SHT_MIPS_RELD: return "MIPS_RELD";
- case SHT_MIPS_IFACE: return "MIPS_IFACE";
- case SHT_MIPS_CONTENT: return "MIPS_CONTENT";
- case SHT_MIPS_OPTIONS: return "MIPS_OPTIONS";
- case SHT_MIPS_SHDR: return "MIPS_SHDR";
- case SHT_MIPS_FDESC: return "MIPS_FDESC";
- case SHT_MIPS_EXTSYM: return "MIPS_EXTSYM";
- case SHT_MIPS_DENSE: return "MIPS_DENSE";
- case SHT_MIPS_PDESC: return "MIPS_PDESC";
- case SHT_MIPS_LOCSYM: return "MIPS_LOCSYM";
- case SHT_MIPS_AUXSYM: return "MIPS_AUXSYM";
- case SHT_MIPS_OPTSYM: return "MIPS_OPTSYM";
- case SHT_MIPS_LOCSTR: return "MIPS_LOCSTR";
- case SHT_MIPS_LINE: return "MIPS_LINE";
- case SHT_MIPS_RFDESC: return "MIPS_RFDESC";
- case SHT_MIPS_DELTASYM: return "MIPS_DELTASYM";
- case SHT_MIPS_DELTAINST: return "MIPS_DELTAINST";
- case SHT_MIPS_DELTACLASS: return "MIPS_DELTACLASS";
- case SHT_MIPS_DWARF: return "MIPS_DWARF";
- case SHT_MIPS_DELTADECL: return "MIPS_DELTADECL";
- case SHT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
- case SHT_MIPS_EVENTS: return "MIPS_EVENTS";
- case SHT_MIPS_TRANSLATE: return "MIPS_TRANSLATE";
- case SHT_MIPS_PIXIE: return "MIPS_PIXIE";
- case SHT_MIPS_XLATE: return "MIPS_XLATE";
- case SHT_MIPS_XLATE_DEBUG: return "MIPS_XLATE_DEBUG";
- case SHT_MIPS_WHIRL: return "MIPS_WHIRL";
- case SHT_MIPS_EH_REGION: return "MIPS_EH_REGION";
- case SHT_MIPS_XLATE_OLD: return "MIPS_XLATE_OLD";
+ case SHT_MIPS_LIBLIST: return "MIPS_LIBLIST";
+ case SHT_MIPS_MSYM: return "MIPS_MSYM";
+ case SHT_MIPS_CONFLICT: return "MIPS_CONFLICT";
+ case SHT_MIPS_GPTAB: return "MIPS_GPTAB";
+ case SHT_MIPS_UCODE: return "MIPS_UCODE";
+ case SHT_MIPS_DEBUG: return "MIPS_DEBUG";
+ case SHT_MIPS_REGINFO: return "MIPS_REGINFO";
+ case SHT_MIPS_PACKAGE: return "MIPS_PACKAGE";
+ case SHT_MIPS_PACKSYM: return "MIPS_PACKSYM";
+ case SHT_MIPS_RELD: return "MIPS_RELD";
+ case SHT_MIPS_IFACE: return "MIPS_IFACE";
+ case SHT_MIPS_CONTENT: return "MIPS_CONTENT";
+ case SHT_MIPS_OPTIONS: return "MIPS_OPTIONS";
+ case SHT_MIPS_SHDR: return "MIPS_SHDR";
+ case SHT_MIPS_FDESC: return "MIPS_FDESC";
+ case SHT_MIPS_EXTSYM: return "MIPS_EXTSYM";
+ case SHT_MIPS_DENSE: return "MIPS_DENSE";
+ case SHT_MIPS_PDESC: return "MIPS_PDESC";
+ case SHT_MIPS_LOCSYM: return "MIPS_LOCSYM";
+ case SHT_MIPS_AUXSYM: return "MIPS_AUXSYM";
+ case SHT_MIPS_OPTSYM: return "MIPS_OPTSYM";
+ case SHT_MIPS_LOCSTR: return "MIPS_LOCSTR";
+ case SHT_MIPS_LINE: return "MIPS_LINE";
+ case SHT_MIPS_RFDESC: return "MIPS_RFDESC";
+ case SHT_MIPS_DELTASYM: return "MIPS_DELTASYM";
+ case SHT_MIPS_DELTAINST: return "MIPS_DELTAINST";
+ case SHT_MIPS_DELTACLASS: return "MIPS_DELTACLASS";
+ case SHT_MIPS_DWARF: return "MIPS_DWARF";
+ case SHT_MIPS_DELTADECL: return "MIPS_DELTADECL";
+ case SHT_MIPS_SYMBOL_LIB: return "MIPS_SYMBOL_LIB";
+ case SHT_MIPS_EVENTS: return "MIPS_EVENTS";
+ case SHT_MIPS_TRANSLATE: return "MIPS_TRANSLATE";
+ case SHT_MIPS_PIXIE: return "MIPS_PIXIE";
+ case SHT_MIPS_XLATE: return "MIPS_XLATE";
+ case SHT_MIPS_XLATE_DEBUG: return "MIPS_XLATE_DEBUG";
+ case SHT_MIPS_WHIRL: return "MIPS_WHIRL";
+ case SHT_MIPS_EH_REGION: return "MIPS_EH_REGION";
+ case SHT_MIPS_XLATE_OLD: return "MIPS_XLATE_OLD";
case SHT_MIPS_PDR_EXCEPTION: return "MIPS_PDR_EXCEPTION";
default:
break;
@@ -2206,7 +2312,7 @@ static const char *
get_section_type_name (sh_type)
unsigned int sh_type;
{
- static char buff [32];
+ static char buff[32];
switch (sh_type)
{
@@ -2230,8 +2336,8 @@ get_section_type_name (sh_type)
case SHT_GNU_verdef: return "VERDEF";
case SHT_GNU_verneed: return "VERNEED";
case SHT_GNU_versym: return "VERSYM";
- case 0x6ffffff0: return "VERSYM";
- case 0x6ffffffc: return "VERDEF";
+ case 0x6ffffff0: return "VERSYM";
+ case 0x6ffffffc: return "VERDEF";
case 0x7ffffffd: return "AUXILIARY";
case 0x7fffffff: return "FILTER";
case SHT_GNU_LIBLIST: return "GNU_LIBLIST";
@@ -2239,7 +2345,7 @@ get_section_type_name (sh_type)
default:
if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC))
{
- const char * result;
+ const char *result;
switch (elf_header.e_machine)
{
@@ -2276,35 +2382,35 @@ get_section_type_name (sh_type)
#define OPTION_DEBUG_DUMP 512
-struct option options [] =
+struct option options[] =
{
- {"all", no_argument, 0, 'a'},
+ {"all", no_argument, 0, 'a'},
{"file-header", no_argument, 0, 'h'},
{"program-headers", no_argument, 0, 'l'},
- {"headers", no_argument, 0, 'e'},
- {"histogram", no_argument, 0, 'I'},
- {"segments", no_argument, 0, 'l'},
- {"sections", no_argument, 0, 'S'},
+ {"headers", no_argument, 0, 'e'},
+ {"histogram", no_argument, 0, 'I'},
+ {"segments", no_argument, 0, 'l'},
+ {"sections", no_argument, 0, 'S'},
{"section-headers", no_argument, 0, 'S'},
- {"symbols", no_argument, 0, 's'},
- {"syms", no_argument, 0, 's'},
- {"relocs", no_argument, 0, 'r'},
- {"notes", no_argument, 0, 'n'},
- {"dynamic", no_argument, 0, 'd'},
+ {"symbols", no_argument, 0, 's'},
+ {"syms", no_argument, 0, 's'},
+ {"relocs", no_argument, 0, 'r'},
+ {"notes", no_argument, 0, 'n'},
+ {"dynamic", no_argument, 0, 'd'},
{"arch-specific", no_argument, 0, 'A'},
{"version-info", no_argument, 0, 'V'},
{"use-dynamic", no_argument, 0, 'D'},
- {"hex-dump", required_argument, 0, 'x'},
+ {"hex-dump", required_argument, 0, 'x'},
{"debug-dump", optional_argument, 0, OPTION_DEBUG_DUMP},
{"unwind", no_argument, 0, 'u'},
#ifdef SUPPORT_DISASSEMBLY
{"instruction-dump", required_argument, 0, 'i'},
#endif
- {"version", no_argument, 0, 'v'},
- {"wide", no_argument, 0, 'W'},
- {"help", no_argument, 0, 'H'},
- {0, no_argument, 0, 0}
+ {"version", no_argument, 0, 'v'},
+ {"wide", no_argument, 0, 'W'},
+ {"help", no_argument, 0, 'H'},
+ {0, no_argument, 0, 0}
};
static void
@@ -2351,11 +2457,11 @@ usage ()
static void
request_dump (section, type)
unsigned int section;
- int type;
+ int type;
{
if (section >= num_dump_sects)
{
- char * new_dump_sects;
+ char *new_dump_sects;
new_dump_sects = (char *) calloc (section + 1, 1);
@@ -2374,7 +2480,7 @@ request_dump (section, type)
}
if (dump_sects)
- dump_sects [section] |= type;
+ dump_sects[section] |= type;
return;
}
@@ -2382,7 +2488,7 @@ request_dump (section, type)
static void
parse_args (argc, argv)
int argc;
- char ** argv;
+ char **argv;
{
int c;
@@ -2392,8 +2498,8 @@ parse_args (argc, argv)
while ((c = getopt_long
(argc, argv, "ersuahnldSDAIw::x:i:vVW", options, NULL)) != EOF)
{
- char * cp;
- int section;
+ char *cp;
+ int section;
switch (c)
{
@@ -2405,67 +2511,67 @@ parse_args (argc, argv)
break;
case 'a':
- do_syms ++;
- do_reloc ++;
- do_unwind ++;
- do_dynamic ++;
- do_header ++;
- do_sections ++;
- do_segments ++;
- do_version ++;
- do_histogram ++;
- do_arch ++;
- do_notes ++;
+ do_syms++;
+ do_reloc++;
+ do_unwind++;
+ do_dynamic++;
+ do_header++;
+ do_sections++;
+ do_segments++;
+ do_version++;
+ do_histogram++;
+ do_arch++;
+ do_notes++;
break;
case 'e':
- do_header ++;
- do_sections ++;
- do_segments ++;
+ do_header++;
+ do_sections++;
+ do_segments++;
break;
case 'A':
- do_arch ++;
+ do_arch++;
break;
case 'D':
- do_using_dynamic ++;
+ do_using_dynamic++;
break;
case 'r':
- do_reloc ++;
+ do_reloc++;
break;
case 'u':
- do_unwind ++;
+ do_unwind++;
break;
case 'h':
- do_header ++;
+ do_header++;
break;
case 'l':
- do_segments ++;
+ do_segments++;
break;
case 's':
- do_syms ++;
+ do_syms++;
break;
case 'S':
- do_sections ++;
+ do_sections++;
break;
case 'd':
- do_dynamic ++;
+ do_dynamic++;
break;
case 'I':
- do_histogram ++;
+ do_histogram++;
break;
case 'n':
- do_notes ++;
+ do_notes++;
break;
case 'x':
- do_dump ++;
+ do_dump++;
section = strtoul (optarg, & cp, 0);
- if (! * cp && section >= 0)
+ if (! *cp && section >= 0)
{
request_dump (section, HEX_DUMP);
break;
}
goto oops;
case 'w':
- do_dump ++;
+ do_dump++;
if (optarg == 0)
do_debugging = 1;
else
@@ -2530,7 +2636,7 @@ parse_args (argc, argv)
}
break;
case OPTION_DEBUG_DUMP:
- do_dump ++;
+ do_dump++;
if (optarg == 0)
do_debugging = 1;
else
@@ -2613,9 +2719,9 @@ parse_args (argc, argv)
break;
#ifdef SUPPORT_DISASSEMBLY
case 'i':
- do_dump ++;
+ do_dump++;
section = strtoul (optarg, & cp, 0);
- if (! * cp && section >= 0)
+ if (! *cp && section >= 0)
{
request_dump (section, DISASS_DUMP);
break;
@@ -2626,10 +2732,10 @@ parse_args (argc, argv)
print_version (program_name);
break;
case 'V':
- do_version ++;
+ do_version++;
break;
case 'W':
- do_wide ++;
+ do_wide++;
break;
default:
oops:
@@ -2656,7 +2762,7 @@ static const char *
get_elf_class (elf_class)
unsigned int elf_class;
{
- static char buff [32];
+ static char buff[32];
switch (elf_class)
{
@@ -2673,7 +2779,7 @@ static const char *
get_data_encoding (encoding)
unsigned int encoding;
{
- static char buff [32];
+ static char buff[32];
switch (encoding)
{
@@ -2690,24 +2796,24 @@ static const char *
get_osabi_name (osabi)
unsigned int osabi;
{
- static char buff [32];
+ static char buff[32];
switch (osabi)
{
- case ELFOSABI_NONE: return "UNIX - System V";
- case ELFOSABI_HPUX: return "UNIX - HP-UX";
- case ELFOSABI_NETBSD: return "UNIX - NetBSD";
- case ELFOSABI_LINUX: return "UNIX - Linux";
- case ELFOSABI_HURD: return "GNU/Hurd";
- case ELFOSABI_SOLARIS: return "UNIX - Solaris";
- case ELFOSABI_AIX: return "UNIX - AIX";
- case ELFOSABI_IRIX: return "UNIX - IRIX";
- case ELFOSABI_FREEBSD: return "UNIX - FreeBSD";
- case ELFOSABI_TRU64: return "UNIX - TRU64";
- case ELFOSABI_MODESTO: return "Novell - Modesto";
- case ELFOSABI_OPENBSD: return "UNIX - OpenBSD";
- case ELFOSABI_STANDALONE: return _("Standalone App");
- case ELFOSABI_ARM: return "ARM";
+ case ELFOSABI_NONE: return "UNIX - System V";
+ case ELFOSABI_HPUX: return "UNIX - HP-UX";
+ case ELFOSABI_NETBSD: return "UNIX - NetBSD";
+ case ELFOSABI_LINUX: return "UNIX - Linux";
+ case ELFOSABI_HURD: return "GNU/Hurd";
+ case ELFOSABI_SOLARIS: return "UNIX - Solaris";
+ case ELFOSABI_AIX: return "UNIX - AIX";
+ case ELFOSABI_IRIX: return "UNIX - IRIX";
+ case ELFOSABI_FREEBSD: return "UNIX - FreeBSD";
+ case ELFOSABI_TRU64: return "UNIX - TRU64";
+ case ELFOSABI_MODESTO: return "Novell - Modesto";
+ case ELFOSABI_OPENBSD: return "UNIX - OpenBSD";
+ case ELFOSABI_STANDALONE: return _("Standalone App");
+ case ELFOSABI_ARM: return "ARM";
default:
sprintf (buff, _("<unknown: %x>"), osabi);
return buff;
@@ -2718,10 +2824,10 @@ get_osabi_name (osabi)
static int
process_file_header ()
{
- if ( elf_header.e_ident [EI_MAG0] != ELFMAG0
- || elf_header.e_ident [EI_MAG1] != ELFMAG1
- || elf_header.e_ident [EI_MAG2] != ELFMAG2
- || elf_header.e_ident [EI_MAG3] != ELFMAG3)
+ if ( elf_header.e_ident[EI_MAG0] != ELFMAG0
+ || elf_header.e_ident[EI_MAG1] != ELFMAG1
+ || elf_header.e_ident[EI_MAG2] != ELFMAG2
+ || elf_header.e_ident[EI_MAG3] != ELFMAG3)
{
error
(_("Not an ELF file - it has the wrong magic bytes at the start\n"));
@@ -2734,24 +2840,24 @@ process_file_header ()
printf (_("ELF Header:\n"));
printf (_(" Magic: "));
- for (i = 0; i < EI_NIDENT; i ++)
- printf ("%2.2x ", elf_header.e_ident [i]);
+ for (i = 0; i < EI_NIDENT; i++)
+ printf ("%2.2x ", elf_header.e_ident[i]);
printf ("\n");
printf (_(" Class: %s\n"),
- get_elf_class (elf_header.e_ident [EI_CLASS]));
+ get_elf_class (elf_header.e_ident[EI_CLASS]));
printf (_(" Data: %s\n"),
- get_data_encoding (elf_header.e_ident [EI_DATA]));
+ get_data_encoding (elf_header.e_ident[EI_DATA]));
printf (_(" Version: %d %s\n"),
- elf_header.e_ident [EI_VERSION],
- (elf_header.e_ident [EI_VERSION] == EV_CURRENT
+ elf_header.e_ident[EI_VERSION],
+ (elf_header.e_ident[EI_VERSION] == EV_CURRENT
? "(current)"
- : (elf_header.e_ident [EI_VERSION] != EV_NONE
+ : (elf_header.e_ident[EI_VERSION] != EV_NONE
? "<unknown: %lx>"
: "")));
printf (_(" OS/ABI: %s\n"),
- get_osabi_name (elf_header.e_ident [EI_OSABI]));
+ get_osabi_name (elf_header.e_ident[EI_OSABI]));
printf (_(" ABI Version: %d\n"),
- elf_header.e_ident [EI_ABIVERSION]);
+ elf_header.e_ident[EI_ABIVERSION]);
printf (_(" Type: %s\n"),
get_file_type (elf_header.e_type));
printf (_(" Machine: %s\n"),
@@ -2806,13 +2912,13 @@ process_file_header ()
static int
get_32bit_program_headers (file, program_headers)
- FILE * file;
- Elf_Internal_Phdr * program_headers;
+ FILE *file;
+ Elf_Internal_Phdr *program_headers;
{
- Elf32_External_Phdr * phdrs;
- Elf32_External_Phdr * external;
- Elf_Internal_Phdr * internal;
- unsigned int i;
+ Elf32_External_Phdr *phdrs;
+ Elf32_External_Phdr *external;
+ Elf_Internal_Phdr *internal;
+ unsigned int i;
phdrs = ((Elf32_External_Phdr *)
get_data (NULL, file, elf_header.e_phoff,
@@ -2823,7 +2929,7 @@ get_32bit_program_headers (file, program_headers)
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
- i ++, internal ++, external ++)
+ i++, internal++, external++)
{
internal->p_type = BYTE_GET (external->p_type);
internal->p_offset = BYTE_GET (external->p_offset);
@@ -2842,13 +2948,13 @@ get_32bit_program_headers (file, program_headers)
static int
get_64bit_program_headers (file, program_headers)
- FILE * file;
- Elf_Internal_Phdr * program_headers;
+ FILE *file;
+ Elf_Internal_Phdr *program_headers;
{
- Elf64_External_Phdr * phdrs;
- Elf64_External_Phdr * external;
- Elf_Internal_Phdr * internal;
- unsigned int i;
+ Elf64_External_Phdr *phdrs;
+ Elf64_External_Phdr *external;
+ Elf_Internal_Phdr *internal;
+ unsigned int i;
phdrs = ((Elf64_External_Phdr *)
get_data (NULL, file, elf_header.e_phoff,
@@ -2859,7 +2965,7 @@ get_64bit_program_headers (file, program_headers)
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
- i ++, internal ++, external ++)
+ i++, internal++, external++)
{
internal->p_type = BYTE_GET (external->p_type);
internal->p_flags = BYTE_GET (external->p_flags);
@@ -2880,11 +2986,11 @@ get_64bit_program_headers (file, program_headers)
static int
process_program_headers (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Phdr * program_headers;
- Elf_Internal_Phdr * segment;
- unsigned int i;
+ Elf_Internal_Phdr *program_headers;
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
if (elf_header.e_phnum == 0)
{
@@ -2952,7 +3058,7 @@ process_program_headers (file)
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
- i ++, segment ++)
+ i++, segment++)
{
if (do_segments)
{
@@ -3083,14 +3189,14 @@ process_program_headers (file)
for (i = 0; i < elf_header.e_phnum; i++)
{
unsigned int j;
- Elf_Internal_Shdr * section;
+ Elf_Internal_Shdr *section;
segment = program_headers + i;
section = section_headers;
printf (" %2.2d ", i);
- for (j = 1; j < elf_header.e_shnum; j++, section ++)
+ for (j = 1; j < elf_header.e_shnum; j++, section++)
{
if (section->sh_size > 0
/* Compare allocated sections by VMA, unallocated
@@ -3117,12 +3223,12 @@ process_program_headers (file)
static int
get_32bit_section_headers (file, num)
- FILE * file;
+ FILE *file;
unsigned int num;
{
- Elf32_External_Shdr * shdrs;
- Elf_Internal_Shdr * internal;
- unsigned int i;
+ Elf32_External_Shdr *shdrs;
+ Elf_Internal_Shdr *internal;
+ unsigned int i;
shdrs = ((Elf32_External_Shdr *)
get_data (NULL, file, elf_header.e_shoff,
@@ -3142,7 +3248,7 @@ get_32bit_section_headers (file, num)
for (i = 0, internal = section_headers;
i < num;
- i ++, internal ++)
+ i++, internal++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
internal->sh_type = BYTE_GET (shdrs[i].sh_type);
@@ -3163,12 +3269,12 @@ get_32bit_section_headers (file, num)
static int
get_64bit_section_headers (file, num)
- FILE * file;
+ FILE *file;
unsigned int num;
{
- Elf64_External_Shdr * shdrs;
- Elf_Internal_Shdr * internal;
- unsigned int i;
+ Elf64_External_Shdr *shdrs;
+ Elf_Internal_Shdr *internal;
+ unsigned int i;
shdrs = ((Elf64_External_Shdr *)
get_data (NULL, file, elf_header.e_shoff,
@@ -3188,7 +3294,7 @@ get_64bit_section_headers (file, num)
for (i = 0, internal = section_headers;
i < num;
- i ++, internal ++)
+ i++, internal++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
internal->sh_type = BYTE_GET (shdrs[i].sh_type);
@@ -3209,15 +3315,15 @@ get_64bit_section_headers (file, num)
static Elf_Internal_Sym *
get_32bit_elf_symbols (file, section)
- FILE * file;
+ FILE *file;
Elf_Internal_Shdr *section;
{
unsigned long number;
- Elf32_External_Sym * esyms;
+ Elf32_External_Sym *esyms;
Elf_External_Sym_Shndx *shndx;
- Elf_Internal_Sym * isyms;
- Elf_Internal_Sym * psym;
- unsigned int j;
+ Elf_Internal_Sym *isyms;
+ Elf_Internal_Sym *psym;
+ unsigned int j;
esyms = ((Elf32_External_Sym *)
get_data (NULL, file, section->sh_offset,
@@ -3254,7 +3360,7 @@ get_32bit_elf_symbols (file, section)
for (j = 0, psym = isyms;
j < number;
- j ++, psym ++)
+ j++, psym++)
{
psym->st_name = BYTE_GET (esyms[j].st_name);
psym->st_value = BYTE_GET (esyms[j].st_value);
@@ -3276,15 +3382,15 @@ get_32bit_elf_symbols (file, section)
static Elf_Internal_Sym *
get_64bit_elf_symbols (file, section)
- FILE * file;
+ FILE *file;
Elf_Internal_Shdr *section;
{
unsigned long number;
- Elf64_External_Sym * esyms;
+ Elf64_External_Sym *esyms;
Elf_External_Sym_Shndx *shndx;
- Elf_Internal_Sym * isyms;
- Elf_Internal_Sym * psym;
- unsigned int j;
+ Elf_Internal_Sym *isyms;
+ Elf_Internal_Sym *psym;
+ unsigned int j;
esyms = ((Elf64_External_Sym *)
get_data (NULL, file, section->sh_offset,
@@ -3321,7 +3427,7 @@ get_64bit_elf_symbols (file, section)
for (j = 0, psym = isyms;
j < number;
- j ++, psym ++)
+ j++, psym++)
{
psym->st_name = BYTE_GET (esyms[j].st_name);
psym->st_info = BYTE_GET (esyms[j].st_info);
@@ -3345,9 +3451,9 @@ static const char *
get_elf_section_flags (sh_flags)
bfd_vma sh_flags;
{
- static char buff [32];
+ static char buff[32];
- * buff = 0;
+ *buff = 0;
while (sh_flags)
{
@@ -3358,15 +3464,15 @@ get_elf_section_flags (sh_flags)
switch (flag)
{
- case SHF_WRITE: strcat (buff, "W"); break;
- case SHF_ALLOC: strcat (buff, "A"); break;
- case SHF_EXECINSTR: strcat (buff, "X"); break;
- case SHF_MERGE: strcat (buff, "M"); break;
- case SHF_STRINGS: strcat (buff, "S"); break;
- case SHF_INFO_LINK: strcat (buff, "I"); break;
- case SHF_LINK_ORDER: strcat (buff, "L"); break;
+ case SHF_WRITE: strcat (buff, "W"); break;
+ case SHF_ALLOC: strcat (buff, "A"); break;
+ case SHF_EXECINSTR: strcat (buff, "X"); break;
+ case SHF_MERGE: strcat (buff, "M"); break;
+ case SHF_STRINGS: strcat (buff, "S"); break;
+ case SHF_INFO_LINK: strcat (buff, "I"); break;
+ case SHF_LINK_ORDER: strcat (buff, "L"); break;
case SHF_OS_NONCONFORMING: strcat (buff, "O"); break;
- case SHF_GROUP: strcat (buff, "G"); break;
+ case SHF_GROUP: strcat (buff, "G"); break;
case SHF_TLS: strcat (buff, "T"); break;
default:
@@ -3391,10 +3497,10 @@ get_elf_section_flags (sh_flags)
static int
process_section_headers (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * section;
- unsigned int i;
+ Elf_Internal_Shdr *section;
+ unsigned int i;
section_headers = NULL;
@@ -3438,9 +3544,9 @@ process_section_headers (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i ++, section ++)
+ i++, section++)
{
- char * name = SECTION_NAME (section);
+ char *name = SECTION_NAME (section);
if (section->sh_type == SHT_DYNSYM)
{
@@ -3526,7 +3632,7 @@ process_section_headers (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i ++, section ++)
+ i++, section++)
{
printf (" [%2u] %-17.17s %-15.15s ",
SECTION_HEADER_NUM (i),
@@ -3627,10 +3733,10 @@ process_section_headers (file)
/* Process the reloc section. */
static int
process_relocs (file)
- FILE * file;
+ FILE *file;
{
- unsigned long rel_size;
- unsigned long rel_offset;
+ unsigned long rel_size;
+ unsigned long rel_offset;
if (!do_reloc)
@@ -3649,7 +3755,7 @@ process_relocs (file)
rel_size = dynamic_info[DT_RELSZ];
is_rela = FALSE;
}
- else if (dynamic_info [DT_RELA])
+ else if (dynamic_info[DT_RELA])
{
rel_offset = dynamic_info[DT_RELA];
rel_size = dynamic_info[DT_RELASZ];
@@ -3688,13 +3794,13 @@ process_relocs (file)
}
else
{
- Elf_Internal_Shdr * section;
- unsigned long i;
- int found = 0;
+ Elf_Internal_Shdr *section;
+ unsigned long i;
+ int found = 0;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
if ( section->sh_type != SHT_RELA
&& section->sh_type != SHT_REL)
@@ -3705,11 +3811,11 @@ process_relocs (file)
if (rel_size)
{
- Elf_Internal_Shdr * strsec;
- Elf_Internal_Sym * symtab;
- char * strtab;
- int is_rela;
- unsigned long nsyms;
+ Elf_Internal_Shdr *strsec;
+ Elf_Internal_Sym *symtab;
+ char *strtab;
+ int is_rela;
+ unsigned long nsyms;
printf (_("\nRelocation section "));
@@ -3726,7 +3832,7 @@ process_relocs (file)
nsyms = 0;
if (section->sh_link)
{
- Elf_Internal_Shdr * symsec;
+ Elf_Internal_Shdr *symsec;
symsec = SECTION_HEADER (section->sh_link);
nsyms = symsec->sh_size / symsec->sh_entsize;
@@ -3778,28 +3884,28 @@ struct unw_aux_info
{
struct unw_table_entry
{
- struct absaddr start;
- struct absaddr end;
- struct absaddr info;
+ struct absaddr start;
+ struct absaddr end;
+ struct absaddr info;
}
- *table; /* Unwind table. */
- unsigned long table_len; /* Length of unwind table. */
- unsigned char * info; /* Unwind info. */
- unsigned long info_size; /* Size of unwind info. */
- bfd_vma info_addr; /* starting address of unwind info. */
- bfd_vma seg_base; /* Starting address of segment. */
- Elf_Internal_Sym * symtab; /* The symbol table. */
- unsigned long nsyms; /* Number of symbols. */
- char * strtab; /* The string table. */
- unsigned long strtab_size; /* Size of string table. */
+ *table; /* Unwind table. */
+ unsigned long table_len; /* Length of unwind table. */
+ unsigned char *info; /* Unwind info. */
+ unsigned long info_size; /* Size of unwind info. */
+ bfd_vma info_addr; /* starting address of unwind info. */
+ bfd_vma seg_base; /* Starting address of segment. */
+ Elf_Internal_Sym *symtab; /* The symbol table. */
+ unsigned long nsyms; /* Number of symbols. */
+ char *strtab; /* The string table. */
+ unsigned long strtab_size; /* Size of string table. */
};
-static void find_symbol_for_address PARAMS ((struct unw_aux_info *,
- struct absaddr, const char **,
- bfd_vma *));
-static void dump_ia64_unwind PARAMS ((struct unw_aux_info *));
-static int slurp_ia64_unwind_table PARAMS ((FILE *, struct unw_aux_info *,
- Elf_Internal_Shdr *));
+static void find_symbol_for_address
+ PARAMS ((struct unw_aux_info *, struct absaddr, const char **, bfd_vma *));
+static void dump_ia64_unwind
+ PARAMS ((struct unw_aux_info *));
+static int slurp_ia64_unwind_table
+ PARAMS ((FILE *, struct unw_aux_info *, Elf_Internal_Shdr *));
static void
find_symbol_for_address (aux, addr, symname, offset)
@@ -3842,7 +3948,7 @@ dump_ia64_unwind (aux)
struct unw_aux_info *aux;
{
bfd_vma addr_size;
- struct unw_table_entry * tp;
+ struct unw_table_entry *tp;
int in_body;
addr_size = is_32bit_elf ? 4 : 8;
@@ -3851,9 +3957,9 @@ dump_ia64_unwind (aux)
{
bfd_vma stamp;
bfd_vma offset;
- const unsigned char * dp;
- const unsigned char * head;
- const char * procname;
+ const unsigned char *dp;
+ const unsigned char *head;
+ const char *procname;
find_symbol_for_address (aux, tp->start, &procname, &offset);
@@ -3957,7 +4063,7 @@ slurp_ia64_unwind_table (file, aux, sec)
return 0;
tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0]));
- for (tp = table; tp < table + size; tp += 3 * addr_size, ++ tep)
+ for (tp = table; tp < table + size; tp += 3 * addr_size, ++tep)
{
tep->start.section = SHN_UNDEF;
tep->end.section = SHN_UNDEF;
@@ -4057,7 +4163,7 @@ slurp_ia64_unwind_table (file, aux, sec)
static int
process_unwind (file)
- FILE * file;
+ FILE *file;
{
Elf_Internal_Shdr *sec, *unwsec = NULL, *strsec;
unsigned long i, addr_size, unwcount = 0, unwstart = 0;
@@ -4193,7 +4299,7 @@ process_unwind (file)
static void
dynamic_segment_mips_val (entry)
- Elf_Internal_Dyn * entry;
+ Elf_Internal_Dyn *entry;
{
switch (entry->d_tag)
{
@@ -4212,7 +4318,7 @@ dynamic_segment_mips_val (entry)
};
unsigned int cnt;
int first = 1;
- for (cnt = 0; cnt < NUM_ELEM (opts); ++ cnt)
+ for (cnt = 0; cnt < NUM_ELEM (opts); ++cnt)
if (entry->d_un.d_val & (1 << cnt))
{
printf ("%s%s", first ? "" : " ", opts[cnt]);
@@ -4233,7 +4339,7 @@ dynamic_segment_mips_val (entry)
case DT_MIPS_TIME_STAMP:
{
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
time_t time = entry->d_un.d_val;
tmp = gmtime (&time);
@@ -4268,7 +4374,7 @@ dynamic_segment_mips_val (entry)
static void
dynamic_segment_parisc_val (entry)
- Elf_Internal_Dyn * entry;
+ Elf_Internal_Dyn *entry;
{
switch (entry->d_tag)
{
@@ -4277,7 +4383,7 @@ dynamic_segment_parisc_val (entry)
static struct
{
long int bit;
- const char * str;
+ const char *str;
}
flags[] =
{
@@ -4325,11 +4431,11 @@ dynamic_segment_parisc_val (entry)
static int
get_32bit_dynamic_segment (file)
- FILE * file;
+ FILE *file;
{
- Elf32_External_Dyn * edyn;
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf32_External_Dyn *edyn;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
edyn = (Elf32_External_Dyn *) get_data (NULL, file, dynamic_addr,
dynamic_size, _("dynamic segment"));
@@ -4340,7 +4446,7 @@ get_32bit_dynamic_segment (file)
how large this .dynamic is now. We can do this even before the byte
swapping since the DT_NULL tag is recognizable. */
dynamic_size = 0;
- while (*(Elf32_Word *) edyn [dynamic_size++].d_tag != DT_NULL)
+ while (*(Elf32_Word *) edyn[dynamic_size++].d_tag != DT_NULL)
;
dynamic_segment = (Elf_Internal_Dyn *)
@@ -4355,10 +4461,10 @@ get_32bit_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i ++, entry ++)
+ i++, entry++)
{
- entry->d_tag = BYTE_GET (edyn [i].d_tag);
- entry->d_un.d_val = BYTE_GET (edyn [i].d_un.d_val);
+ entry->d_tag = BYTE_GET (edyn[i].d_tag);
+ entry->d_un.d_val = BYTE_GET (edyn[i].d_un.d_val);
}
free (edyn);
@@ -4368,11 +4474,11 @@ get_32bit_dynamic_segment (file)
static int
get_64bit_dynamic_segment (file)
- FILE * file;
+ FILE *file;
{
- Elf64_External_Dyn * edyn;
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf64_External_Dyn *edyn;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
edyn = (Elf64_External_Dyn *) get_data (NULL, file, dynamic_addr,
dynamic_size, _("dynamic segment"));
@@ -4383,7 +4489,7 @@ get_64bit_dynamic_segment (file)
how large this .dynamic is now. We can do this even before the byte
swapping since the DT_NULL tag is recognizable. */
dynamic_size = 0;
- while (*(bfd_vma *) edyn [dynamic_size ++].d_tag != DT_NULL)
+ while (*(bfd_vma *) edyn[dynamic_size++].d_tag != DT_NULL)
;
dynamic_segment = (Elf_Internal_Dyn *)
@@ -4398,10 +4504,10 @@ get_64bit_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i ++, entry ++)
+ i++, entry++)
{
- entry->d_tag = BYTE_GET8 (edyn [i].d_tag);
- entry->d_un.d_val = BYTE_GET8 (edyn [i].d_un.d_val);
+ entry->d_tag = BYTE_GET8 (edyn[i].d_tag);
+ entry->d_un.d_val = BYTE_GET8 (edyn[i].d_un.d_val);
}
free (edyn);
@@ -4413,7 +4519,7 @@ static const char *
get_dynamic_flags (flags)
bfd_vma flags;
{
- static char buff [128];
+ static char buff[128];
char *p = buff;
*p = '\0';
@@ -4429,12 +4535,12 @@ get_dynamic_flags (flags)
switch (flag)
{
- case DF_ORIGIN: strcpy (p, "ORIGIN"); break;
- case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break;
- case DF_TEXTREL: strcpy (p, "TEXTREL"); break;
- case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break;
- case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break;
- default: strcpy (p, "unknown"); break;
+ case DF_ORIGIN: strcpy (p, "ORIGIN"); break;
+ case DF_SYMBOLIC: strcpy (p, "SYMBOLIC"); break;
+ case DF_TEXTREL: strcpy (p, "TEXTREL"); break;
+ case DF_BIND_NOW: strcpy (p, "BIND_NOW"); break;
+ case DF_STATIC_TLS: strcpy (p, "STATIC_TLS"); break;
+ default: strcpy (p, "unknown"); break;
}
p = strchr (p, '\0');
@@ -4445,10 +4551,10 @@ get_dynamic_flags (flags)
/* Parse and display the contents of the dynamic segment. */
static int
process_dynamic_segment (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Dyn * entry;
- bfd_size_type i;
+ Elf_Internal_Dyn *entry;
+ bfd_size_type i;
if (dynamic_size == 0)
{
@@ -4471,7 +4577,7 @@ process_dynamic_segment (file)
{
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
Elf_Internal_Shdr section;
@@ -4511,10 +4617,10 @@ process_dynamic_segment (file)
{
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
unsigned long offset;
- long str_tab_len;
+ long str_tab_len;
if (entry->d_tag != DT_STRTAB)
continue;
@@ -4551,7 +4657,7 @@ process_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- ++i, ++ entry)
+ ++i, ++entry)
{
if (entry->d_tag == DT_SYMINENT)
{
@@ -4567,8 +4673,8 @@ process_dynamic_segment (file)
if (dynamic_syminfo_offset != 0 && syminsz != 0)
{
- Elf_External_Syminfo * extsyminfo;
- Elf_Internal_Syminfo * syminfo;
+ Elf_External_Syminfo *extsyminfo;
+ Elf_Internal_Syminfo *syminfo;
/* There is a syminfo section. Read the data. */
extsyminfo = ((Elf_External_Syminfo *)
@@ -4604,11 +4710,11 @@ process_dynamic_segment (file)
for (i = 0, entry = dynamic_segment;
i < dynamic_size;
- i++, entry ++)
+ i++, entry++)
{
if (do_dynamic)
{
- const char * dtype;
+ const char *dtype;
putchar (' ');
print_vma (entry->d_tag, FULL_HEX);
@@ -4634,7 +4740,7 @@ process_dynamic_segment (file)
if (do_dynamic)
{
switch (entry->d_tag)
- {
+ {
case DT_AUXILIARY:
printf (_("Auxiliary library"));
break;
@@ -4643,7 +4749,7 @@ process_dynamic_segment (file)
printf (_("Filter library"));
break;
- case DT_CONFIG:
+ case DT_CONFIG:
printf (_("Configuration file"));
break;
@@ -4836,7 +4942,7 @@ process_dynamic_segment (file)
if (do_dynamic)
{
- char * name;
+ char *name;
if (dynamic_strings == NULL)
name = NULL;
@@ -4920,11 +5026,11 @@ process_dynamic_segment (file)
{
if (dynamic_strings != NULL && entry->d_tag == DT_USED)
{
- char * name;
+ char *name;
name = dynamic_strings + entry->d_un.d_val;
- if (* name)
+ if (*name)
{
printf (_("Not needed object: [%s]\n"), name);
break;
@@ -4945,7 +5051,7 @@ process_dynamic_segment (file)
case DT_GNU_PRELINKED:
if (do_dynamic)
{
- struct tm * tmp;
+ struct tm *tmp;
time_t time = entry->d_un.d_val;
tmp = gmtime (&time);
@@ -4958,7 +5064,7 @@ process_dynamic_segment (file)
default:
if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
- version_info [DT_VERSIONTAGIDX (entry->d_tag)] =
+ version_info[DT_VERSIONTAGIDX (entry->d_tag)] =
entry->d_un.d_val;
if (do_dynamic)
@@ -4988,7 +5094,7 @@ static char *
get_ver_flags (flags)
unsigned int flags;
{
- static char buff [32];
+ static char buff[32];
buff[0] = 0;
@@ -5015,26 +5121,26 @@ get_ver_flags (flags)
/* Display the contents of the version sections. */
static int
process_version_sections (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * section;
- unsigned i;
- int found = 0;
+ Elf_Internal_Shdr *section;
+ unsigned i;
+ int found = 0;
if (! do_version)
return 1;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
switch (section->sh_type)
{
case SHT_GNU_verdef:
{
- Elf_External_Verdef * edefs;
- unsigned int idx;
- unsigned int cnt;
+ Elf_External_Verdef *edefs;
+ unsigned int idx;
+ unsigned int cnt;
found = 1;
@@ -5055,15 +5161,15 @@ process_version_sections (file)
if (!edefs)
break;
- for (idx = cnt = 0; cnt < section->sh_info; ++ cnt)
+ for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
{
- char * vstart;
- Elf_External_Verdef * edef;
- Elf_Internal_Verdef ent;
- Elf_External_Verdaux * eaux;
- Elf_Internal_Verdaux aux;
- int j;
- int isum;
+ char *vstart;
+ Elf_External_Verdef *edef;
+ Elf_Internal_Verdef ent;
+ Elf_External_Verdaux *eaux;
+ Elf_Internal_Verdaux aux;
+ int j;
+ int isum;
vstart = ((char *) edefs) + idx;
@@ -5097,7 +5203,7 @@ process_version_sections (file)
isum = idx + ent.vd_aux;
- for (j = 1; j < ent.vd_cnt; j ++)
+ for (j = 1; j < ent.vd_cnt; j++)
{
isum += aux.vda_next;
vstart += aux.vda_next;
@@ -5124,9 +5230,9 @@ process_version_sections (file)
case SHT_GNU_verneed:
{
- Elf_External_Verneed * eneed;
- unsigned int idx;
- unsigned int cnt;
+ Elf_External_Verneed *eneed;
+ unsigned int idx;
+ unsigned int cnt;
found = 1;
@@ -5147,11 +5253,11 @@ process_version_sections (file)
for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
{
- Elf_External_Verneed * entry;
- Elf_Internal_Verneed ent;
- int j;
- int isum;
- char * vstart;
+ Elf_External_Verneed *entry;
+ Elf_Internal_Verneed ent;
+ int j;
+ int isum;
+ char *vstart;
vstart = ((char *) eneed) + idx;
@@ -5176,8 +5282,8 @@ process_version_sections (file)
for (j = 0, isum = idx + ent.vn_aux; j < ent.vn_cnt; ++j)
{
- Elf_External_Vernaux * eaux;
- Elf_Internal_Vernaux aux;
+ Elf_External_Vernaux *eaux;
+ Elf_Internal_Vernaux aux;
eaux = (Elf_External_Vernaux *) vstart;
@@ -5210,14 +5316,14 @@ process_version_sections (file)
case SHT_GNU_versym:
{
- Elf_Internal_Shdr * link_section;
- int total;
- int cnt;
- unsigned char * edata;
- unsigned short * data;
- char * strtab;
- Elf_Internal_Sym * symbols;
- Elf_Internal_Shdr * string_sec;
+ Elf_Internal_Shdr *link_section;
+ int total;
+ int cnt;
+ unsigned char *edata;
+ unsigned short *data;
+ char *strtab;
+ Elf_Internal_Sym *symbols;
+ Elf_Internal_Shdr *string_sec;
link_section = SECTION_HEADER (section->sh_link);
total = section->sh_size / section->sh_entsize;
@@ -5257,8 +5363,8 @@ process_version_sections (file)
data = (unsigned short *) malloc (total * sizeof (short));
for (cnt = total; cnt --;)
- data [cnt] = byte_get (edata + cnt * sizeof (short),
- sizeof (short));
+ data[cnt] = byte_get (edata + cnt * sizeof (short),
+ sizeof (short));
free (edata);
@@ -5266,12 +5372,12 @@ process_version_sections (file)
{
int j, nn;
int check_def, check_need;
- char * name;
+ char *name;
printf (" %03x:", cnt);
for (j = 0; (j < 4) && (cnt + j) < total; ++j)
- switch (data [cnt + j])
+ switch (data[cnt + j])
{
case 0:
fputs (_(" 0 (*local*) "), stdout);
@@ -5282,35 +5388,35 @@ process_version_sections (file)
break;
default:
- nn = printf ("%4x%c", data [cnt + j] & 0x7fff,
- data [cnt + j] & 0x8000 ? 'h' : ' ');
+ nn = printf ("%4x%c", data[cnt + j] & 0x7fff,
+ data[cnt + j] & 0x8000 ? 'h' : ' ');
check_def = 1;
check_need = 1;
- if (SECTION_HEADER (symbols [cnt + j].st_shndx)->sh_type
+ if (SECTION_HEADER (symbols[cnt + j].st_shndx)->sh_type
!= SHT_NOBITS)
{
- if (symbols [cnt + j].st_shndx == SHN_UNDEF)
+ if (symbols[cnt + j].st_shndx == SHN_UNDEF)
check_def = 0;
else
check_need = 0;
}
if (check_need
- && version_info [DT_VERSIONTAGIDX (DT_VERNEED)])
+ && version_info[DT_VERSIONTAGIDX (DT_VERNEED)])
{
- Elf_Internal_Verneed ivn;
- unsigned long offset;
+ Elf_Internal_Verneed ivn;
+ unsigned long offset;
- offset = version_info [DT_VERSIONTAGIDX (DT_VERNEED)]
+ offset = version_info[DT_VERSIONTAGIDX (DT_VERNEED)]
- loadaddr;
- do
+ do
{
- Elf_Internal_Vernaux ivna;
- Elf_External_Verneed evn;
- Elf_External_Vernaux evna;
- unsigned long a_off;
+ Elf_Internal_Vernaux ivna;
+ Elf_External_Verneed evn;
+ Elf_External_Vernaux evna;
+ unsigned long a_off;
get_data (&evn, file, offset, sizeof (evn),
_("version need"));
@@ -5330,10 +5436,10 @@ process_version_sections (file)
a_off += ivna.vna_next;
}
- while (ivna.vna_other != data [cnt + j]
+ while (ivna.vna_other != data[cnt + j]
&& ivna.vna_next != 0);
- if (ivna.vna_other == data [cnt + j])
+ if (ivna.vna_other == data[cnt + j])
{
ivna.vna_name = BYTE_GET (evna.vna_name);
@@ -5351,15 +5457,15 @@ process_version_sections (file)
while (ivn.vn_next);
}
- if (check_def && data [cnt + j] != 0x8001
- && version_info [DT_VERSIONTAGIDX (DT_VERDEF)])
+ if (check_def && data[cnt + j] != 0x8001
+ && version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
{
- Elf_Internal_Verdef ivd;
- Elf_External_Verdef evd;
- unsigned long offset;
+ Elf_Internal_Verdef ivd;
+ Elf_External_Verdef evd;
+ unsigned long offset;
- offset = version_info
- [DT_VERSIONTAGIDX (DT_VERDEF)] - loadaddr;
+ offset = (version_info[DT_VERSIONTAGIDX (DT_VERDEF)]
+ - loadaddr);
do
{
@@ -5371,13 +5477,13 @@ process_version_sections (file)
offset += ivd.vd_next;
}
- while (ivd.vd_ndx != (data [cnt + j] & 0x7fff)
+ while (ivd.vd_ndx != (data[cnt + j] & 0x7fff)
&& ivd.vd_next != 0);
- if (ivd.vd_ndx == (data [cnt + j] & 0x7fff))
+ if (ivd.vd_ndx == (data[cnt + j] & 0x7fff))
{
- Elf_External_Verdaux evda;
- Elf_Internal_Verdaux ivda;
+ Elf_External_Verdaux evda;
+ Elf_Internal_Verdaux ivda;
ivd.vd_aux = BYTE_GET (evd.vd_aux);
@@ -5423,13 +5529,13 @@ static const char *
get_symbol_binding (binding)
unsigned int binding;
{
- static char buff [32];
+ static char buff[32];
switch (binding)
{
- case STB_LOCAL: return "LOCAL";
- case STB_GLOBAL: return "GLOBAL";
- case STB_WEAK: return "WEAK";
+ case STB_LOCAL: return "LOCAL";
+ case STB_GLOBAL: return "GLOBAL";
+ case STB_WEAK: return "WEAK";
default:
if (binding >= STB_LOPROC && binding <= STB_HIPROC)
sprintf (buff, _("<processor specific>: %d"), binding);
@@ -5445,17 +5551,17 @@ static const char *
get_symbol_type (type)
unsigned int type;
{
- static char buff [32];
+ static char buff[32];
switch (type)
{
- case STT_NOTYPE: return "NOTYPE";
- case STT_OBJECT: return "OBJECT";
- case STT_FUNC: return "FUNC";
- case STT_SECTION: return "SECTION";
- case STT_FILE: return "FILE";
- case STT_COMMON: return "COMMON";
- case STT_TLS: return "TLS";
+ case STT_NOTYPE: return "NOTYPE";
+ case STT_OBJECT: return "OBJECT";
+ case STT_FUNC: return "FUNC";
+ case STT_SECTION: return "SECTION";
+ case STT_FILE: return "FILE";
+ case STT_COMMON: return "COMMON";
+ case STT_TLS: return "TLS";
default:
if (type >= STT_LOPROC && type <= STT_HIPROC)
{
@@ -5494,9 +5600,9 @@ get_symbol_visibility (visibility)
{
switch (visibility)
{
- case STV_DEFAULT: return "DEFAULT";
- case STV_INTERNAL: return "INTERNAL";
- case STV_HIDDEN: return "HIDDEN";
+ case STV_DEFAULT: return "DEFAULT";
+ case STV_INTERNAL: return "INTERNAL";
+ case STV_HIDDEN: return "HIDDEN";
case STV_PROTECTED: return "PROTECTED";
default: abort ();
}
@@ -5506,13 +5612,13 @@ static const char *
get_symbol_index_type (type)
unsigned int type;
{
- static char buff [32];
+ static char buff[32];
switch (type)
{
- case SHN_UNDEF: return "UND";
- case SHN_ABS: return "ABS";
- case SHN_COMMON: return "COM";
+ case SHN_UNDEF: return "UND";
+ case SHN_ABS: return "ABS";
+ case SHN_COMMON: return "COM";
default:
if (type >= SHN_LOPROC && type <= SHN_HIPROC)
sprintf (buff, "PRC[0x%04x]", type);
@@ -5530,11 +5636,11 @@ get_symbol_index_type (type)
static int *
get_dynamic_data (file, number)
- FILE * file;
+ FILE *file;
unsigned int number;
{
- unsigned char * e_data;
- int * i_data;
+ unsigned char *e_data;
+ int *i_data;
e_data = (unsigned char *) malloc (number * 4);
@@ -5550,7 +5656,7 @@ get_dynamic_data (file, number)
return NULL;
}
- i_data = (int *) malloc (number * sizeof (* i_data));
+ i_data = (int *) malloc (number * sizeof (*i_data));
if (i_data == NULL)
{
@@ -5560,7 +5666,7 @@ get_dynamic_data (file, number)
}
while (number--)
- i_data [number] = byte_get (e_data + number * 4, 4);
+ i_data[number] = byte_get (e_data + number * 4, 4);
free (e_data);
@@ -5570,15 +5676,15 @@ get_dynamic_data (file, number)
/* Dump the symbol table. */
static int
process_symbol_table (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * section;
- unsigned char nb [4];
- unsigned char nc [4];
- int nbuckets = 0;
- int nchains = 0;
- int * buckets = NULL;
- int * chains = NULL;
+ Elf_Internal_Shdr *section;
+ unsigned char nb[4];
+ unsigned char nc[4];
+ int nbuckets = 0;
+ int nchains = 0;
+ int *buckets = NULL;
+ int *chains = NULL;
if (! do_syms && !do_histogram)
return 1;
@@ -5617,8 +5723,8 @@ process_symbol_table (file)
if (do_syms
&& dynamic_info[DT_HASH] && do_using_dynamic && dynamic_strings != NULL)
{
- int hn;
- int si;
+ int hn;
+ int si;
printf (_("\nSymbol table for image:\n"));
if (is_32bit_elf)
@@ -5628,12 +5734,12 @@ process_symbol_table (file)
for (hn = 0; hn < nbuckets; hn++)
{
- if (! buckets [hn])
+ if (! buckets[hn])
continue;
- for (si = buckets [hn]; si < nchains && si > 0; si = chains [si])
+ for (si = buckets[hn]; si < nchains && si > 0; si = chains[si])
{
- Elf_Internal_Sym * psym;
+ Elf_Internal_Sym *psym;
psym = dynamic_symbols + si;
@@ -5653,16 +5759,16 @@ process_symbol_table (file)
}
else if (do_syms && !do_using_dynamic)
{
- unsigned int i;
+ unsigned int i;
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
i++, section++)
{
- unsigned int si;
- char * strtab;
- Elf_Internal_Sym * symtab;
- Elf_Internal_Sym * psym;
+ unsigned int si;
+ char *strtab;
+ Elf_Internal_Sym *symtab;
+ Elf_Internal_Sym *psym;
if ( section->sh_type != SHT_SYMTAB
@@ -5685,7 +5791,7 @@ process_symbol_table (file)
strtab = string_table;
else
{
- Elf_Internal_Shdr * string_sec;
+ Elf_Internal_Shdr *string_sec;
string_sec = SECTION_HEADER (section->sh_link);
@@ -5696,7 +5802,7 @@ process_symbol_table (file)
for (si = 0, psym = symtab;
si < section->sh_size / section->sh_entsize;
- si ++, psym ++)
+ si++, psym++)
{
printf ("%6d: ", si);
print_vma (psym->st_value, LONG_HEX);
@@ -5709,15 +5815,15 @@ process_symbol_table (file)
print_symbol (25, strtab + psym->st_name);
if (section->sh_type == SHT_DYNSYM &&
- version_info [DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
+ version_info[DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
{
- unsigned char data[2];
- unsigned short vers_data;
- unsigned long offset;
- int is_nobits;
- int check_def;
+ unsigned char data[2];
+ unsigned short vers_data;
+ unsigned long offset;
+ int is_nobits;
+ int check_def;
- offset = version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
+ offset = version_info[DT_VERSIONTAGIDX (DT_VERSYM)]
- loadaddr;
get_data (&data, file, offset + si * sizeof (vers_data),
@@ -5732,20 +5838,20 @@ process_symbol_table (file)
if ((vers_data & 0x8000) || vers_data > 1)
{
- if (version_info [DT_VERSIONTAGIDX (DT_VERNEED)]
+ if (version_info[DT_VERSIONTAGIDX (DT_VERNEED)]
&& (is_nobits || ! check_def))
{
- Elf_External_Verneed evn;
- Elf_Internal_Verneed ivn;
- Elf_Internal_Vernaux ivna;
+ Elf_External_Verneed evn;
+ Elf_Internal_Verneed ivn;
+ Elf_Internal_Vernaux ivna;
/* We must test both. */
- offset = version_info
- [DT_VERSIONTAGIDX (DT_VERNEED)] - loadaddr;
+ offset = (version_info[DT_VERSIONTAGIDX (DT_VERNEED)]
+ - loadaddr);
do
{
- unsigned long vna_off;
+ unsigned long vna_off;
get_data (&evn, file, offset, sizeof (evn),
_("version need"));
@@ -5757,7 +5863,7 @@ process_symbol_table (file)
do
{
- Elf_External_Vernaux evna;
+ Elf_External_Vernaux evna;
get_data (&evna, file, vna_off,
sizeof (evna),
@@ -5794,26 +5900,26 @@ process_symbol_table (file)
if (check_def)
{
if (vers_data != 0x8001
- && version_info [DT_VERSIONTAGIDX (DT_VERDEF)])
+ && version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
{
- Elf_Internal_Verdef ivd;
- Elf_Internal_Verdaux ivda;
- Elf_External_Verdaux evda;
- unsigned long offset;
+ Elf_Internal_Verdef ivd;
+ Elf_Internal_Verdaux ivda;
+ Elf_External_Verdaux evda;
+ unsigned long offset;
- offset =
- version_info [DT_VERSIONTAGIDX (DT_VERDEF)]
- - loadaddr;
+ offset
+ = (version_info[DT_VERSIONTAGIDX (DT_VERDEF)]
+ - loadaddr);
do
{
- Elf_External_Verdef evd;
+ Elf_External_Verdef evd;
get_data (&evd, file, offset, sizeof (evd),
_("version def"));
- ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
- ivd.vd_aux = BYTE_GET (evd.vd_aux);
+ ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
+ ivd.vd_aux = BYTE_GET (evd.vd_aux);
ivd.vd_next = BYTE_GET (evd.vd_next);
offset += ivd.vd_next;
@@ -5852,13 +5958,13 @@ process_symbol_table (file)
if (do_histogram && buckets != NULL)
{
- int * lengths;
- int * counts;
- int hn;
- int si;
- int maxlength = 0;
- int nzero_counts = 0;
- int nsyms = 0;
+ int *lengths;
+ int *counts;
+ int hn;
+ int si;
+ int maxlength = 0;
+ int nzero_counts = 0;
+ int nsyms = 0;
printf (_("\nHistogram for bucket list length (total of %d buckets):\n"),
nbuckets);
@@ -5872,14 +5978,14 @@ process_symbol_table (file)
}
for (hn = 0; hn < nbuckets; ++hn)
{
- if (! buckets [hn])
+ if (! buckets[hn])
continue;
for (si = buckets[hn]; si > 0 && si < nchains; si = chains[si])
{
- ++ nsyms;
+ ++nsyms;
if (maxlength < ++lengths[hn])
- ++ maxlength;
+ ++maxlength;
}
}
@@ -5891,7 +5997,7 @@ process_symbol_table (file)
}
for (hn = 0; hn < nbuckets; ++hn)
- ++ counts [lengths [hn]];
+ ++counts[lengths[hn]];
if (nbuckets > 0)
{
@@ -5921,7 +6027,7 @@ process_symbol_table (file)
static int
process_syminfo (file)
- FILE * file ATTRIBUTE_UNUSED;
+ FILE *file ATTRIBUTE_UNUSED;
{
unsigned int i;
@@ -5959,9 +6065,10 @@ process_syminfo (file)
if (dynamic_syminfo[i].si_boundto > 0
&& dynamic_syminfo[i].si_boundto < dynamic_size)
{
- print_symbol (10, dynamic_strings
- + dynamic_segment
- [dynamic_syminfo[i].si_boundto].d_un.d_val);
+ print_symbol (10,
+ dynamic_strings
+ + (dynamic_segment
+ [dynamic_syminfo[i].si_boundto].d_un.d_val));
putchar (' ' );
}
else
@@ -5987,8 +6094,8 @@ process_syminfo (file)
#ifdef SUPPORT_DISASSEMBLY
static void
disassemble_section (section, file)
- Elf_Internal_Shdr * section;
- FILE * file;
+ Elf_Internal_Shdr *section;
+ FILE *file;
{
printf (_("\nAssembly dump of section %s\n"),
SECTION_NAME (section));
@@ -6001,13 +6108,13 @@ disassemble_section (section, file)
static int
dump_section (section, file)
- Elf_Internal_Shdr * section;
- FILE * file;
+ Elf_Internal_Shdr *section;
+ FILE *file;
{
- bfd_size_type bytes;
- bfd_vma addr;
- unsigned char * data;
- unsigned char * start;
+ bfd_size_type bytes;
+ bfd_vma addr;
+ unsigned char *data;
+ unsigned char *start;
bytes = section->sh_size;
@@ -6039,14 +6146,14 @@ dump_section (section, file)
printf (" 0x%8.8lx ", (unsigned long) addr);
- switch (elf_header.e_ident [EI_DATA])
+ switch (elf_header.e_ident[EI_DATA])
{
default:
case ELFDATA2LSB:
for (j = 15; j >= 0; j --)
{
if (j < lbytes)
- printf ("%2.2x", data [j]);
+ printf ("%2.2x", data[j]);
else
printf (" ");
@@ -6059,7 +6166,7 @@ dump_section (section, file)
for (j = 0; j < 16; j++)
{
if (j < lbytes)
- printf ("%2.2x", data [j]);
+ printf ("%2.2x", data[j]);
else
printf (" ");
@@ -6071,7 +6178,7 @@ dump_section (section, file)
for (j = 0; j < lbytes; j++)
{
- k = data [j];
+ k = data[j];
if (k >= ' ' && k < 0x80)
printf ("%c", k);
else
@@ -6093,19 +6200,19 @@ dump_section (section, file)
static unsigned long int
read_leb128 (data, length_return, sign)
- unsigned char * data;
- int * length_return;
- int sign;
+ unsigned char *data;
+ int *length_return;
+ int sign;
{
unsigned long int result = 0;
- unsigned int num_read = 0;
- int shift = 0;
- unsigned char byte;
+ unsigned int num_read = 0;
+ int shift = 0;
+ unsigned char byte;
do
{
- byte = * data ++;
- num_read ++;
+ byte = *data++;
+ num_read++;
result |= (byte & 0x7f) << shift;
@@ -6115,7 +6222,7 @@ read_leb128 (data, length_return, sign)
while (byte & 0x80);
if (length_return != NULL)
- * length_return = num_read;
+ *length_return = num_read;
if (sign && (shift < 32) && (byte & 0x40))
result |= -1 << shift;
@@ -6125,16 +6232,16 @@ read_leb128 (data, length_return, sign)
typedef struct State_Machine_Registers
{
- unsigned long address;
- unsigned int file;
- unsigned int line;
- unsigned int column;
- int is_stmt;
- int basic_block;
- int end_sequence;
+ unsigned long address;
+ unsigned int file;
+ unsigned int line;
+ unsigned int column;
+ int is_stmt;
+ int basic_block;
+ int end_sequence;
/* This variable hold the number of the last entry seen
in the File Table. */
- unsigned int last_file_entry;
+ unsigned int last_file_entry;
} SMR;
static SMR state_machine_regs;
@@ -6157,15 +6264,15 @@ reset_state_machine (is_stmt)
of sequence. */
static int
process_extended_line_op (data, is_stmt, pointer_size)
- unsigned char * data;
+ unsigned char *data;
int is_stmt;
int pointer_size;
{
- unsigned char op_code;
- int bytes_read;
- unsigned int len;
- unsigned char * name;
- unsigned long adr;
+ unsigned char op_code;
+ int bytes_read;
+ unsigned int len;
+ unsigned char *name;
+ unsigned long adr;
len = read_leb128 (data, & bytes_read, 0);
data += bytes_read;
@@ -6177,7 +6284,7 @@ process_extended_line_op (data, is_stmt, pointer_size)
}
len += bytes_read;
- op_code = * data ++;
+ op_code = *data++;
printf (_(" Extended opcode %d: "), op_code);
@@ -6198,7 +6305,7 @@ process_extended_line_op (data, is_stmt, pointer_size)
printf (_(" define new File Table entry\n"));
printf (_(" Entry\tDir\tTime\tSize\tName\n"));
- printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
name = data;
data += strlen ((char *) data) + 1;
printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0));
@@ -6224,17 +6331,17 @@ static int debug_line_pointer_size = 4;
static int
display_debug_lines (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char * start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- DWARF2_External_LineInfo * external;
- DWARF2_Internal_LineInfo info;
- unsigned char * standard_opcodes;
- unsigned char * data = start;
- unsigned char * end = start + section->sh_size;
- unsigned char * end_of_sequence;
- int i;
+ DWARF2_External_LineInfo *external;
+ DWARF2_Internal_LineInfo info;
+ unsigned char *standard_opcodes;
+ unsigned char *data = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *end_of_sequence;
+ int i;
printf (_("\nDump of debug contents of section %s:\n\n"),
SECTION_NAME (section));
@@ -6292,7 +6399,7 @@ display_debug_lines (section, start, file)
reset_state_machine (info.li_default_is_stmt);
/* Display the contents of the Opcodes table. */
- standard_opcodes = data + sizeof (* external);
+ standard_opcodes = data + sizeof (*external);
printf (_("\n Opcodes:\n"));
@@ -6302,13 +6409,13 @@ display_debug_lines (section, start, file)
/* Display the contents of the Directory table. */
data = standard_opcodes + info.li_opcode_base - 1;
- if (* data == 0)
+ if (*data == 0)
printf (_("\n The Directory Table is empty.\n"));
else
{
printf (_("\n The Directory Table:\n"));
- while (* data != 0)
+ while (*data != 0)
{
printf (_(" %s\n"), data);
@@ -6317,22 +6424,22 @@ display_debug_lines (section, start, file)
}
/* Skip the NUL at the end of the table. */
- data ++;
+ data++;
/* Display the contents of the File Name table. */
- if (* data == 0)
+ if (*data == 0)
printf (_("\n The File Name Table is empty.\n"));
else
{
printf (_("\n The File Name Table:\n"));
printf (_(" Entry\tDir\tTime\tSize\tName\n"));
- while (* data != 0)
+ while (*data != 0)
{
- unsigned char * name;
+ unsigned char *name;
int bytes_read;
- printf (_(" %d\t"), ++ state_machine_regs.last_file_entry);
+ printf (_(" %d\t"), ++state_machine_regs.last_file_entry);
name = data;
data += strlen ((char *) data) + 1;
@@ -6348,7 +6455,7 @@ display_debug_lines (section, start, file)
}
/* Skip the NUL at the end of the table. */
- data ++;
+ data++;
/* Now display the statements. */
printf (_("\n Line Number Statements:\n"));
@@ -6357,10 +6464,10 @@ display_debug_lines (section, start, file)
while (data < end_of_sequence)
{
unsigned char op_code;
- int adv;
- int bytes_read;
+ int adv;
+ int bytes_read;
- op_code = * data ++;
+ op_code = *data++;
if (op_code >= info.li_opcode_base)
{
@@ -6481,13 +6588,13 @@ display_debug_lines (section, start, file)
static int
display_debug_pubnames (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- DWARF2_External_PubNames * external;
- DWARF2_Internal_PubNames pubnames;
- unsigned char * end;
+ DWARF2_External_PubNames *external;
+ DWARF2_Internal_PubNames pubnames;
+ unsigned char *end;
end = start + section->sh_size;
@@ -6495,8 +6602,8 @@ display_debug_pubnames (section, start, file)
while (start < end)
{
- unsigned char * data;
- unsigned long offset;
+ unsigned char *data;
+ unsigned long offset;
external = (DWARF2_External_PubNames *) start;
@@ -6505,7 +6612,7 @@ display_debug_pubnames (section, start, file)
pubnames.pn_offset = BYTE_GET (external->pn_offset);
pubnames.pn_size = BYTE_GET (external->pn_size);
- data = start + sizeof (* external);
+ data = start + sizeof (*external);
start += pubnames.pn_length + sizeof (external->pn_length);
if (pubnames.pn_length == 0xffffffff)
@@ -6562,70 +6669,70 @@ get_TAG_name (tag)
{
switch (tag)
{
- case DW_TAG_padding: return "DW_TAG_padding";
- case DW_TAG_array_type: return "DW_TAG_array_type";
- case DW_TAG_class_type: return "DW_TAG_class_type";
- case DW_TAG_entry_point: return "DW_TAG_entry_point";
- case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
- case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
- case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
- case DW_TAG_label: return "DW_TAG_label";
- case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
- case DW_TAG_member: return "DW_TAG_member";
- case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
- case DW_TAG_reference_type: return "DW_TAG_reference_type";
- case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
- case DW_TAG_string_type: return "DW_TAG_string_type";
- case DW_TAG_structure_type: return "DW_TAG_structure_type";
- case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
- case DW_TAG_typedef: return "DW_TAG_typedef";
- case DW_TAG_union_type: return "DW_TAG_union_type";
+ case DW_TAG_padding: return "DW_TAG_padding";
+ case DW_TAG_array_type: return "DW_TAG_array_type";
+ case DW_TAG_class_type: return "DW_TAG_class_type";
+ case DW_TAG_entry_point: return "DW_TAG_entry_point";
+ case DW_TAG_enumeration_type: return "DW_TAG_enumeration_type";
+ case DW_TAG_formal_parameter: return "DW_TAG_formal_parameter";
+ case DW_TAG_imported_declaration: return "DW_TAG_imported_declaration";
+ case DW_TAG_label: return "DW_TAG_label";
+ case DW_TAG_lexical_block: return "DW_TAG_lexical_block";
+ case DW_TAG_member: return "DW_TAG_member";
+ case DW_TAG_pointer_type: return "DW_TAG_pointer_type";
+ case DW_TAG_reference_type: return "DW_TAG_reference_type";
+ case DW_TAG_compile_unit: return "DW_TAG_compile_unit";
+ case DW_TAG_string_type: return "DW_TAG_string_type";
+ case DW_TAG_structure_type: return "DW_TAG_structure_type";
+ case DW_TAG_subroutine_type: return "DW_TAG_subroutine_type";
+ case DW_TAG_typedef: return "DW_TAG_typedef";
+ case DW_TAG_union_type: return "DW_TAG_union_type";
case DW_TAG_unspecified_parameters: return "DW_TAG_unspecified_parameters";
- case DW_TAG_variant: return "DW_TAG_variant";
- case DW_TAG_common_block: return "DW_TAG_common_block";
- case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
- case DW_TAG_inheritance: return "DW_TAG_inheritance";
- case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
- case DW_TAG_module: return "DW_TAG_module";
- case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
- case DW_TAG_set_type: return "DW_TAG_set_type";
- case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
- case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
- case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
- case DW_TAG_base_type: return "DW_TAG_base_type";
- case DW_TAG_catch_block: return "DW_TAG_catch_block";
- case DW_TAG_const_type: return "DW_TAG_const_type";
- case DW_TAG_constant: return "DW_TAG_constant";
- case DW_TAG_enumerator: return "DW_TAG_enumerator";
- case DW_TAG_file_type: return "DW_TAG_file_type";
- case DW_TAG_friend: return "DW_TAG_friend";
- case DW_TAG_namelist: return "DW_TAG_namelist";
- case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
- case DW_TAG_packed_type: return "DW_TAG_packed_type";
- case DW_TAG_subprogram: return "DW_TAG_subprogram";
- case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
- case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
- case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
- case DW_TAG_try_block: return "DW_TAG_try_block";
- case DW_TAG_variant_part: return "DW_TAG_variant_part";
- case DW_TAG_variable: return "DW_TAG_variable";
- case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
- case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
- case DW_TAG_format_label: return "DW_TAG_format_label";
- case DW_TAG_function_template: return "DW_TAG_function_template";
- case DW_TAG_class_template: return "DW_TAG_class_template";
+ case DW_TAG_variant: return "DW_TAG_variant";
+ case DW_TAG_common_block: return "DW_TAG_common_block";
+ case DW_TAG_common_inclusion: return "DW_TAG_common_inclusion";
+ case DW_TAG_inheritance: return "DW_TAG_inheritance";
+ case DW_TAG_inlined_subroutine: return "DW_TAG_inlined_subroutine";
+ case DW_TAG_module: return "DW_TAG_module";
+ case DW_TAG_ptr_to_member_type: return "DW_TAG_ptr_to_member_type";
+ case DW_TAG_set_type: return "DW_TAG_set_type";
+ case DW_TAG_subrange_type: return "DW_TAG_subrange_type";
+ case DW_TAG_with_stmt: return "DW_TAG_with_stmt";
+ case DW_TAG_access_declaration: return "DW_TAG_access_declaration";
+ case DW_TAG_base_type: return "DW_TAG_base_type";
+ case DW_TAG_catch_block: return "DW_TAG_catch_block";
+ case DW_TAG_const_type: return "DW_TAG_const_type";
+ case DW_TAG_constant: return "DW_TAG_constant";
+ case DW_TAG_enumerator: return "DW_TAG_enumerator";
+ case DW_TAG_file_type: return "DW_TAG_file_type";
+ case DW_TAG_friend: return "DW_TAG_friend";
+ case DW_TAG_namelist: return "DW_TAG_namelist";
+ case DW_TAG_namelist_item: return "DW_TAG_namelist_item";
+ case DW_TAG_packed_type: return "DW_TAG_packed_type";
+ case DW_TAG_subprogram: return "DW_TAG_subprogram";
+ case DW_TAG_template_type_param: return "DW_TAG_template_type_param";
+ case DW_TAG_template_value_param: return "DW_TAG_template_value_param";
+ case DW_TAG_thrown_type: return "DW_TAG_thrown_type";
+ case DW_TAG_try_block: return "DW_TAG_try_block";
+ case DW_TAG_variant_part: return "DW_TAG_variant_part";
+ case DW_TAG_variable: return "DW_TAG_variable";
+ case DW_TAG_volatile_type: return "DW_TAG_volatile_type";
+ case DW_TAG_MIPS_loop: return "DW_TAG_MIPS_loop";
+ case DW_TAG_format_label: return "DW_TAG_format_label";
+ case DW_TAG_function_template: return "DW_TAG_function_template";
+ case DW_TAG_class_template: return "DW_TAG_class_template";
/* DWARF 2.1 values. */
- case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
- case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
- case DW_TAG_interface_type: return "DW_TAG_interface_type";
- case DW_TAG_namespace: return "DW_TAG_namespace";
- case DW_TAG_imported_module: return "DW_TAG_imported_module";
- case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
- case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
- case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
+ case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type: return "DW_TAG_interface_type";
+ case DW_TAG_namespace: return "DW_TAG_namespace";
+ case DW_TAG_imported_module: return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown TAG value: %lx"), tag);
return buffer;
@@ -6639,104 +6746,105 @@ get_AT_name (attribute)
{
switch (attribute)
{
- case DW_AT_sibling: return "DW_AT_sibling";
- case DW_AT_location: return "DW_AT_location";
- case DW_AT_name: return "DW_AT_name";
- case DW_AT_ordering: return "DW_AT_ordering";
- case DW_AT_subscr_data: return "DW_AT_subscr_data";
- case DW_AT_byte_size: return "DW_AT_byte_size";
- case DW_AT_bit_offset: return "DW_AT_bit_offset";
- case DW_AT_bit_size: return "DW_AT_bit_size";
- case DW_AT_element_list: return "DW_AT_element_list";
- case DW_AT_stmt_list: return "DW_AT_stmt_list";
- case DW_AT_low_pc: return "DW_AT_low_pc";
- case DW_AT_high_pc: return "DW_AT_high_pc";
- case DW_AT_language: return "DW_AT_language";
- case DW_AT_member: return "DW_AT_member";
- case DW_AT_discr: return "DW_AT_discr";
- case DW_AT_discr_value: return "DW_AT_discr_value";
- case DW_AT_visibility: return "DW_AT_visibility";
- case DW_AT_import: return "DW_AT_import";
- case DW_AT_string_length: return "DW_AT_string_length";
- case DW_AT_common_reference: return "DW_AT_common_reference";
- case DW_AT_comp_dir: return "DW_AT_comp_dir";
- case DW_AT_const_value: return "DW_AT_const_value";
- case DW_AT_containing_type: return "DW_AT_containing_type";
- case DW_AT_default_value: return "DW_AT_default_value";
- case DW_AT_inline: return "DW_AT_inline";
- case DW_AT_is_optional: return "DW_AT_is_optional";
- case DW_AT_lower_bound: return "DW_AT_lower_bound";
- case DW_AT_producer: return "DW_AT_producer";
- case DW_AT_prototyped: return "DW_AT_prototyped";
- case DW_AT_return_addr: return "DW_AT_return_addr";
- case DW_AT_start_scope: return "DW_AT_start_scope";
- case DW_AT_stride_size: return "DW_AT_stride_size";
- case DW_AT_upper_bound: return "DW_AT_upper_bound";
- case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
- case DW_AT_accessibility: return "DW_AT_accessibility";
- case DW_AT_address_class: return "DW_AT_address_class";
- case DW_AT_artificial: return "DW_AT_artificial";
- case DW_AT_base_types: return "DW_AT_base_types";
- case DW_AT_calling_convention: return "DW_AT_calling_convention";
- case DW_AT_count: return "DW_AT_count";
- case DW_AT_data_member_location: return "DW_AT_data_member_location";
- case DW_AT_decl_column: return "DW_AT_decl_column";
- case DW_AT_decl_file: return "DW_AT_decl_file";
- case DW_AT_decl_line: return "DW_AT_decl_line";
- case DW_AT_declaration: return "DW_AT_declaration";
- case DW_AT_discr_list: return "DW_AT_discr_list";
- case DW_AT_encoding: return "DW_AT_encoding";
- case DW_AT_external: return "DW_AT_external";
- case DW_AT_frame_base: return "DW_AT_frame_base";
- case DW_AT_friend: return "DW_AT_friend";
- case DW_AT_identifier_case: return "DW_AT_identifier_case";
- case DW_AT_macro_info: return "DW_AT_macro_info";
- case DW_AT_namelist_items: return "DW_AT_namelist_items";
- case DW_AT_priority: return "DW_AT_priority";
- case DW_AT_segment: return "DW_AT_segment";
- case DW_AT_specification: return "DW_AT_specification";
- case DW_AT_static_link: return "DW_AT_static_link";
- case DW_AT_type: return "DW_AT_type";
- case DW_AT_use_location: return "DW_AT_use_location";
- case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
- case DW_AT_virtuality: return "DW_AT_virtuality";
- case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
+ case DW_AT_sibling: return "DW_AT_sibling";
+ case DW_AT_location: return "DW_AT_location";
+ case DW_AT_name: return "DW_AT_name";
+ case DW_AT_ordering: return "DW_AT_ordering";
+ case DW_AT_subscr_data: return "DW_AT_subscr_data";
+ case DW_AT_byte_size: return "DW_AT_byte_size";
+ case DW_AT_bit_offset: return "DW_AT_bit_offset";
+ case DW_AT_bit_size: return "DW_AT_bit_size";
+ case DW_AT_element_list: return "DW_AT_element_list";
+ case DW_AT_stmt_list: return "DW_AT_stmt_list";
+ case DW_AT_low_pc: return "DW_AT_low_pc";
+ case DW_AT_high_pc: return "DW_AT_high_pc";
+ case DW_AT_language: return "DW_AT_language";
+ case DW_AT_member: return "DW_AT_member";
+ case DW_AT_discr: return "DW_AT_discr";
+ case DW_AT_discr_value: return "DW_AT_discr_value";
+ case DW_AT_visibility: return "DW_AT_visibility";
+ case DW_AT_import: return "DW_AT_import";
+ case DW_AT_string_length: return "DW_AT_string_length";
+ case DW_AT_common_reference: return "DW_AT_common_reference";
+ case DW_AT_comp_dir: return "DW_AT_comp_dir";
+ case DW_AT_const_value: return "DW_AT_const_value";
+ case DW_AT_containing_type: return "DW_AT_containing_type";
+ case DW_AT_default_value: return "DW_AT_default_value";
+ case DW_AT_inline: return "DW_AT_inline";
+ case DW_AT_is_optional: return "DW_AT_is_optional";
+ case DW_AT_lower_bound: return "DW_AT_lower_bound";
+ case DW_AT_producer: return "DW_AT_producer";
+ case DW_AT_prototyped: return "DW_AT_prototyped";
+ case DW_AT_return_addr: return "DW_AT_return_addr";
+ case DW_AT_start_scope: return "DW_AT_start_scope";
+ case DW_AT_stride_size: return "DW_AT_stride_size";
+ case DW_AT_upper_bound: return "DW_AT_upper_bound";
+ case DW_AT_abstract_origin: return "DW_AT_abstract_origin";
+ case DW_AT_accessibility: return "DW_AT_accessibility";
+ case DW_AT_address_class: return "DW_AT_address_class";
+ case DW_AT_artificial: return "DW_AT_artificial";
+ case DW_AT_base_types: return "DW_AT_base_types";
+ case DW_AT_calling_convention: return "DW_AT_calling_convention";
+ case DW_AT_count: return "DW_AT_count";
+ case DW_AT_data_member_location: return "DW_AT_data_member_location";
+ case DW_AT_decl_column: return "DW_AT_decl_column";
+ case DW_AT_decl_file: return "DW_AT_decl_file";
+ case DW_AT_decl_line: return "DW_AT_decl_line";
+ case DW_AT_declaration: return "DW_AT_declaration";
+ case DW_AT_discr_list: return "DW_AT_discr_list";
+ case DW_AT_encoding: return "DW_AT_encoding";
+ case DW_AT_external: return "DW_AT_external";
+ case DW_AT_frame_base: return "DW_AT_frame_base";
+ case DW_AT_friend: return "DW_AT_friend";
+ case DW_AT_identifier_case: return "DW_AT_identifier_case";
+ case DW_AT_macro_info: return "DW_AT_macro_info";
+ case DW_AT_namelist_items: return "DW_AT_namelist_items";
+ case DW_AT_priority: return "DW_AT_priority";
+ case DW_AT_segment: return "DW_AT_segment";
+ case DW_AT_specification: return "DW_AT_specification";
+ case DW_AT_static_link: return "DW_AT_static_link";
+ case DW_AT_type: return "DW_AT_type";
+ case DW_AT_use_location: return "DW_AT_use_location";
+ case DW_AT_variable_parameter: return "DW_AT_variable_parameter";
+ case DW_AT_virtuality: return "DW_AT_virtuality";
+ case DW_AT_vtable_elem_location: return "DW_AT_vtable_elem_location";
/* DWARF 2.1 values. */
- case DW_AT_allocated: return "DW_AT_allocated";
- case DW_AT_associated: return "DW_AT_associated";
- case DW_AT_data_location: return "DW_AT_data_location";
- case DW_AT_stride: return "DW_AT_stride";
- case DW_AT_entry_pc: return "DW_AT_entry_pc";
- case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
- case DW_AT_extension: return "DW_AT_extension";
- case DW_AT_ranges: return "DW_AT_ranges";
- case DW_AT_trampoline: return "DW_AT_trampoline";
- case DW_AT_call_column: return "DW_AT_call_column";
- case DW_AT_call_file: return "DW_AT_call_file";
- case DW_AT_call_line: return "DW_AT_call_line";
+ case DW_AT_allocated: return "DW_AT_allocated";
+ case DW_AT_associated: return "DW_AT_associated";
+ case DW_AT_data_location: return "DW_AT_data_location";
+ case DW_AT_stride: return "DW_AT_stride";
+ case DW_AT_entry_pc: return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
+ case DW_AT_extension: return "DW_AT_extension";
+ case DW_AT_ranges: return "DW_AT_ranges";
+ case DW_AT_trampoline: return "DW_AT_trampoline";
+ case DW_AT_call_column: return "DW_AT_call_column";
+ case DW_AT_call_file: return "DW_AT_call_file";
+ case DW_AT_call_line: return "DW_AT_call_line";
/* SGI/MIPS extensions. */
- case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
- case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
- case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
- case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
+ case DW_AT_MIPS_fde: return "DW_AT_MIPS_fde";
+ case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin";
+ case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin";
+ case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin";
case DW_AT_MIPS_loop_unroll_factor: return "DW_AT_MIPS_loop_unroll_factor";
- case DW_AT_MIPS_software_pipeline_depth: return "DW_AT_MIPS_software_pipeline_depth";
- case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
- case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
- case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
- case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
- case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
+ case DW_AT_MIPS_software_pipeline_depth:
+ return "DW_AT_MIPS_software_pipeline_depth";
+ case DW_AT_MIPS_linkage_name: return "DW_AT_MIPS_linkage_name";
+ case DW_AT_MIPS_stride: return "DW_AT_MIPS_stride";
+ case DW_AT_MIPS_abstract_name: return "DW_AT_MIPS_abstract_name";
+ case DW_AT_MIPS_clone_origin: return "DW_AT_MIPS_clone_origin";
+ case DW_AT_MIPS_has_inlines: return "DW_AT_MIPS_has_inlines";
/* GNU extensions. */
- case DW_AT_sf_names: return "DW_AT_sf_names";
- case DW_AT_src_info: return "DW_AT_src_info";
- case DW_AT_mac_info: return "DW_AT_mac_info";
- case DW_AT_src_coords: return "DW_AT_src_coords";
- case DW_AT_body_begin: return "DW_AT_body_begin";
- case DW_AT_body_end: return "DW_AT_body_end";
- case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
+ case DW_AT_sf_names: return "DW_AT_sf_names";
+ case DW_AT_src_info: return "DW_AT_src_info";
+ case DW_AT_mac_info: return "DW_AT_mac_info";
+ case DW_AT_src_coords: return "DW_AT_src_coords";
+ case DW_AT_body_begin: return "DW_AT_body_begin";
+ case DW_AT_body_end: return "DW_AT_body_end";
+ case DW_AT_GNU_vector: return "DW_AT_GNU_vector";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown AT value: %lx"), attribute);
return buffer;
@@ -6750,30 +6858,30 @@ get_FORM_name (form)
{
switch (form)
{
- case DW_FORM_addr: return "DW_FORM_addr";
- case DW_FORM_block2: return "DW_FORM_block2";
- case DW_FORM_block4: return "DW_FORM_block4";
- case DW_FORM_data2: return "DW_FORM_data2";
- case DW_FORM_data4: return "DW_FORM_data4";
- case DW_FORM_data8: return "DW_FORM_data8";
- case DW_FORM_string: return "DW_FORM_string";
- case DW_FORM_block: return "DW_FORM_block";
- case DW_FORM_block1: return "DW_FORM_block1";
- case DW_FORM_data1: return "DW_FORM_data1";
- case DW_FORM_flag: return "DW_FORM_flag";
- case DW_FORM_sdata: return "DW_FORM_sdata";
- case DW_FORM_strp: return "DW_FORM_strp";
- case DW_FORM_udata: return "DW_FORM_udata";
- case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
- case DW_FORM_ref1: return "DW_FORM_ref1";
- case DW_FORM_ref2: return "DW_FORM_ref2";
- case DW_FORM_ref4: return "DW_FORM_ref4";
- case DW_FORM_ref8: return "DW_FORM_ref8";
- case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
- case DW_FORM_indirect: return "DW_FORM_indirect";
+ case DW_FORM_addr: return "DW_FORM_addr";
+ case DW_FORM_block2: return "DW_FORM_block2";
+ case DW_FORM_block4: return "DW_FORM_block4";
+ case DW_FORM_data2: return "DW_FORM_data2";
+ case DW_FORM_data4: return "DW_FORM_data4";
+ case DW_FORM_data8: return "DW_FORM_data8";
+ case DW_FORM_string: return "DW_FORM_string";
+ case DW_FORM_block: return "DW_FORM_block";
+ case DW_FORM_block1: return "DW_FORM_block1";
+ case DW_FORM_data1: return "DW_FORM_data1";
+ case DW_FORM_flag: return "DW_FORM_flag";
+ case DW_FORM_sdata: return "DW_FORM_sdata";
+ case DW_FORM_strp: return "DW_FORM_strp";
+ case DW_FORM_udata: return "DW_FORM_udata";
+ case DW_FORM_ref_addr: return "DW_FORM_ref_addr";
+ case DW_FORM_ref1: return "DW_FORM_ref1";
+ case DW_FORM_ref2: return "DW_FORM_ref2";
+ case DW_FORM_ref4: return "DW_FORM_ref4";
+ case DW_FORM_ref8: return "DW_FORM_ref8";
+ case DW_FORM_ref_udata: return "DW_FORM_ref_udata";
+ case DW_FORM_indirect: return "DW_FORM_indirect";
default:
{
- static char buffer [100];
+ static char buffer[100];
sprintf (buffer, _("Unknown FORM value: %lx"), form);
return buffer;
@@ -6786,39 +6894,39 @@ get_FORM_name (form)
is simple to implement. */
typedef struct abbrev_attr
{
- unsigned long attribute;
- unsigned long form;
- struct abbrev_attr * next;
+ unsigned long attribute;
+ unsigned long form;
+ struct abbrev_attr *next;
}
abbrev_attr;
typedef struct abbrev_entry
{
- unsigned long entry;
- unsigned long tag;
- int children;
- struct abbrev_attr * first_attr;
- struct abbrev_attr * last_attr;
- struct abbrev_entry * next;
+ unsigned long entry;
+ unsigned long tag;
+ int children;
+ struct abbrev_attr *first_attr;
+ struct abbrev_attr *last_attr;
+ struct abbrev_entry *next;
}
abbrev_entry;
-static abbrev_entry * first_abbrev = NULL;
-static abbrev_entry * last_abbrev = NULL;
+static abbrev_entry *first_abbrev = NULL;
+static abbrev_entry *last_abbrev = NULL;
static void
-free_abbrevs PARAMS ((void))
+free_abbrevs ()
{
- abbrev_entry * abbrev;
+ abbrev_entry *abbrev;
for (abbrev = first_abbrev; abbrev;)
{
- abbrev_entry * next = abbrev->next;
- abbrev_attr * attr;
+ abbrev_entry *next = abbrev->next;
+ abbrev_attr *attr;
for (attr = abbrev->first_attr; attr;)
{
- abbrev_attr * next = attr->next;
+ abbrev_attr *next = attr->next;
free (attr);
attr = next;
@@ -6835,11 +6943,11 @@ static void
add_abbrev (number, tag, children)
unsigned long number;
unsigned long tag;
- int children;
+ int children;
{
- abbrev_entry * entry;
+ abbrev_entry *entry;
- entry = (abbrev_entry *) malloc (sizeof (* entry));
+ entry = (abbrev_entry *) malloc (sizeof (*entry));
if (entry == NULL)
/* ugg */
@@ -6865,9 +6973,9 @@ add_abbrev_attr (attribute, form)
unsigned long attribute;
unsigned long form;
{
- abbrev_attr * attr;
+ abbrev_attr *attr;
- attr = (abbrev_attr *) malloc (sizeof (* attr));
+ attr = (abbrev_attr *) malloc (sizeof (*attr));
if (attr == NULL)
/* ugg */
@@ -6892,19 +7000,19 @@ add_abbrev_attr (attribute, form)
static unsigned char *
process_abbrev_section (start, end)
- unsigned char * start;
- unsigned char * end;
+ unsigned char *start;
+ unsigned char *end;
{
if (first_abbrev != NULL)
return NULL;
while (start < end)
{
- int bytes_read;
+ int bytes_read;
unsigned long entry;
unsigned long tag;
unsigned long attribute;
- int children;
+ int children;
entry = read_leb128 (start, & bytes_read, 0);
start += bytes_read;
@@ -6918,7 +7026,7 @@ process_abbrev_section (start, end)
tag = read_leb128 (start, & bytes_read, 0);
start += bytes_read;
- children = * start ++;
+ children = *start++;
add_abbrev (entry, tag, children);
@@ -6944,12 +7052,12 @@ process_abbrev_section (start, end)
static int
display_debug_macinfo (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- unsigned char * end = start + section->sh_size;
- unsigned char * curr = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *curr = start;
unsigned int bytes_read;
enum dwarf_macinfo_record_type op;
@@ -6958,10 +7066,10 @@ display_debug_macinfo (section, start, file)
while (curr < end)
{
unsigned int lineno;
- const char * string;
+ const char *string;
- op = * curr;
- curr ++;
+ op = *curr;
+ curr++;
switch (op)
{
@@ -7018,12 +7126,12 @@ display_debug_macinfo (section, start, file)
static int
display_debug_abbrev (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- abbrev_entry * entry;
- unsigned char * end = start + section->sh_size;
+ abbrev_entry *entry;
+ unsigned char *end = start + section->sh_size;
printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
@@ -7038,7 +7146,7 @@ display_debug_abbrev (section, start, file)
for (entry = first_abbrev; entry; entry = entry->next)
{
- abbrev_attr * attr;
+ abbrev_attr *attr;
printf (_(" %ld %s [%s]\n"),
entry->entry,
@@ -7065,13 +7173,13 @@ display_debug_abbrev (section, start, file)
static unsigned char *
display_block (data, length)
- unsigned char * data;
- unsigned long length;
+ unsigned char *data;
+ unsigned long length;
{
printf (_(" %lu byte block: "), length);
while (length --)
- printf ("%lx ", (unsigned long) byte_get (data ++, 1));
+ printf ("%lx ", (unsigned long) byte_get (data++, 1));
return data;
}
@@ -7079,17 +7187,17 @@ display_block (data, length)
static void
decode_location_expression (data, pointer_size, length)
unsigned char * data;
- unsigned int pointer_size;
- unsigned long length;
+ unsigned int pointer_size;
+ unsigned long length;
{
- unsigned op;
- int bytes_read;
- unsigned long uvalue;
- unsigned char * end = data + length;
+ unsigned op;
+ int bytes_read;
+ unsigned long uvalue;
+ unsigned char *end = data + length;
while (data < end)
{
- op = * data ++;
+ op = *data++;
switch (op)
{
@@ -7408,15 +7516,15 @@ decode_location_expression (data, pointer_size, length)
}
}
-static const char * debug_loc_contents;
-static bfd_vma debug_loc_size;
+static const char *debug_loc_contents;
+static bfd_vma debug_loc_size;
static void
load_debug_loc (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * sec;
- unsigned int i;
+ Elf_Internal_Shdr *sec;
+ unsigned int i;
/* If it is already loaded, do nothing. */
if (debug_loc_contents != NULL)
@@ -7425,7 +7533,7 @@ load_debug_loc (file)
/* Locate the .debug_loc section. */
for (i = 0, sec = section_headers;
i < elf_header.e_shnum;
- i ++, sec ++)
+ i++, sec++)
if (strcmp (SECTION_NAME (sec), ".debug_loc") == 0)
break;
@@ -7453,9 +7561,9 @@ free_debug_loc ()
static int
display_debug_loc (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
unsigned char *section_end;
unsigned long bytes;
@@ -7518,15 +7626,15 @@ display_debug_loc (section, start, file)
return 1;
}
-static const char * debug_str_contents;
-static bfd_vma debug_str_size;
+static const char *debug_str_contents;
+static bfd_vma debug_str_size;
static void
load_debug_str (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * sec;
- unsigned int i;
+ Elf_Internal_Shdr *sec;
+ unsigned int i;
/* If it is already loaded, do nothing. */
if (debug_str_contents != NULL)
@@ -7535,7 +7643,7 @@ load_debug_str (file)
/* Locate the .debug_str section. */
for (i = 0, sec = section_headers;
i < elf_header.e_shnum;
- i ++, sec ++)
+ i++, sec++)
if (strcmp (SECTION_NAME (sec), ".debug_str") == 0)
break;
@@ -7575,12 +7683,12 @@ fetch_indirect_string (offset)
static int
display_debug_str (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- unsigned long bytes;
- bfd_vma addr;
+ unsigned long bytes;
+ bfd_vma addr;
addr = section->sh_addr;
bytes = section->sh_size;
@@ -7606,7 +7714,7 @@ display_debug_str (section, start, file)
for (j = 0; j < 16; j++)
{
if (j < lbytes)
- printf ("%2.2x", start [j]);
+ printf ("%2.2x", start[j]);
else
printf (" ");
@@ -7616,7 +7724,7 @@ display_debug_str (section, start, file)
for (j = 0; j < lbytes; j++)
{
- k = start [j];
+ k = start[j];
if (k >= ' ' && k < 0x80)
printf ("%c", k);
else
@@ -7635,15 +7743,15 @@ display_debug_str (section, start, file)
static unsigned char *
read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
- unsigned long attribute;
- unsigned long form;
- unsigned char * data;
- unsigned long cu_offset;
- unsigned long pointer_size;
+ unsigned long attribute;
+ unsigned long form;
+ unsigned char *data;
+ unsigned long cu_offset;
+ unsigned long pointer_size;
{
- unsigned long uvalue = 0;
- unsigned char * block_start = NULL;
- int bytes_read;
+ unsigned long uvalue = 0;
+ unsigned char *block_start = NULL;
+ int bytes_read;
switch (form)
{
@@ -7664,7 +7772,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_FORM_ref1:
case DW_FORM_flag:
case DW_FORM_data1:
- uvalue = byte_get (data ++, 1);
+ uvalue = byte_get (data++, 1);
break;
case DW_FORM_ref2:
@@ -7783,51 +7891,63 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_AT_inline:
switch (uvalue)
{
- case DW_INL_not_inlined: printf (_("(not inlined)")); break;
- case DW_INL_inlined: printf (_("(inlined)")); break;
- case DW_INL_declared_not_inlined: printf (_("(declared as inline but ignored)")); break;
- case DW_INL_declared_inlined: printf (_("(declared as inline and inlined)")); break;
- default: printf (_(" (Unknown inline attribute value: %lx)"), uvalue); break;
+ case DW_INL_not_inlined:
+ printf (_("(not inlined)"));
+ break;
+ case DW_INL_inlined:
+ printf (_("(inlined)"));
+ break;
+ case DW_INL_declared_not_inlined:
+ printf (_("(declared as inline but ignored)"));
+ break;
+ case DW_INL_declared_inlined:
+ printf (_("(declared as inline and inlined)"));
+ break;
+ default:
+ printf (_(" (Unknown inline attribute value: %lx)"), uvalue);
+ break;
}
break;
case DW_AT_language:
switch (uvalue)
{
- case DW_LANG_C: printf ("(non-ANSI C)"); break;
- case DW_LANG_C89: printf ("(ANSI C)"); break;
- case DW_LANG_C_plus_plus: printf ("(C++)"); break;
- case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
- case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
- case DW_LANG_Modula2: printf ("(Modula 2)"); break;
- case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
- case DW_LANG_Ada83: printf ("(Ada)"); break;
- case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
- case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
- /* DWARF 2.1 values. */
- case DW_LANG_C99: printf ("(ANSI C99)"); break;
- case DW_LANG_Ada95: printf ("(ADA 95)"); break;
- case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ case DW_LANG_C89: printf ("(ANSI C)"); break;
+ case DW_LANG_C_plus_plus: printf ("(C++)"); break;
+ case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
+ case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
+ case DW_LANG_Modula2: printf ("(Modula 2)"); break;
+ case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
+ case DW_LANG_Ada83: printf ("(Ada)"); break;
+ case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
+ case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ /* DWARF 2.1 values. */
+ case DW_LANG_C99: printf ("(ANSI C99)"); break;
+ case DW_LANG_Ada95: printf ("(ADA 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
/* MIPS extension. */
- case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
- default: printf ("(Unknown: %lx)", uvalue); break;
+ case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
+ default:
+ printf ("(Unknown: %lx)", uvalue);
+ break;
}
break;
case DW_AT_encoding:
switch (uvalue)
{
- case DW_ATE_void: printf ("(void)"); break;
- case DW_ATE_address: printf ("(machine address)"); break;
- case DW_ATE_boolean: printf ("(boolean)"); break;
- case DW_ATE_complex_float: printf ("(complex float)"); break;
- case DW_ATE_float: printf ("(float)"); break;
- case DW_ATE_signed: printf ("(signed)"); break;
- case DW_ATE_signed_char: printf ("(signed char)"); break;
- case DW_ATE_unsigned: printf ("(unsigned)"); break;
- case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
+ case DW_ATE_void: printf ("(void)"); break;
+ case DW_ATE_address: printf ("(machine address)"); break;
+ case DW_ATE_boolean: printf ("(boolean)"); break;
+ case DW_ATE_complex_float: printf ("(complex float)"); break;
+ case DW_ATE_float: printf ("(float)"); break;
+ case DW_ATE_signed: printf ("(signed)"); break;
+ case DW_ATE_signed_char: printf ("(signed char)"); break;
+ case DW_ATE_unsigned: printf ("(unsigned)"); break;
+ case DW_ATE_unsigned_char: printf ("(unsigned char)"); break;
/* DWARF 2.1 value. */
- case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
+ case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
default:
if (uvalue >= DW_ATE_lo_user
&& uvalue <= DW_ATE_hi_user)
@@ -7844,17 +7964,19 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_ACCESS_public: printf ("(public)"); break;
case DW_ACCESS_protected: printf ("(protected)"); break;
case DW_ACCESS_private: printf ("(private)"); break;
- default: printf ("(unknown accessibility)"); break;
+ default:
+ printf ("(unknown accessibility)");
+ break;
}
break;
case DW_AT_visibility:
switch (uvalue)
{
- case DW_VIS_local: printf ("(local)"); break;
- case DW_VIS_exported: printf ("(exported)"); break;
- case DW_VIS_qualified: printf ("(qualified)"); break;
- default: printf ("(unknown visibility)"); break;
+ case DW_VIS_local: printf ("(local)"); break;
+ case DW_VIS_exported: printf ("(exported)"); break;
+ case DW_VIS_qualified: printf ("(qualified)"); break;
+ default: printf ("(unknown visibility)"); break;
}
break;
@@ -7864,7 +7986,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_VIRTUALITY_none: printf ("(none)"); break;
case DW_VIRTUALITY_virtual: printf ("(virtual)"); break;
case DW_VIRTUALITY_pure_virtual:printf ("(pure_virtual)"); break;
- default: printf ("(unknown virtuality)"); break;
+ default: printf ("(unknown virtuality)"); break;
}
break;
@@ -7875,7 +7997,7 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
case DW_ID_up_case: printf ("(up_case)"); break;
case DW_ID_down_case: printf ("(down_case)"); break;
case DW_ID_case_insensitive: printf ("(case_insensitive)"); break;
- default: printf ("(unknown case)"); break;
+ default: printf ("(unknown case)"); break;
}
break;
@@ -7936,11 +8058,11 @@ read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
static unsigned char *
read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
- unsigned long attribute;
- unsigned long form;
- unsigned char * data;
- unsigned long cu_offset;
- unsigned long pointer_size;
+ unsigned long attribute;
+ unsigned long form;
+ unsigned char *data;
+ unsigned long cu_offset;
+ unsigned long pointer_size;
{
printf (" %-18s:", get_AT_name (attribute));
data = read_and_display_attr_value (attribute, form, data, cu_offset,
@@ -7951,12 +8073,12 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
static int
display_debug_info (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file;
{
- unsigned char * end = start + section->sh_size;
- unsigned char * section_begin = start;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *section_begin = start;
printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
@@ -7965,13 +8087,13 @@ display_debug_info (section, start, file)
while (start < end)
{
- DWARF2_External_CompUnit * external;
- DWARF2_Internal_CompUnit compunit;
- Elf_Internal_Shdr * relsec;
- unsigned char * tags;
- unsigned int i;
- int level;
- unsigned long cu_offset;
+ DWARF2_External_CompUnit *external;
+ DWARF2_Internal_CompUnit compunit;
+ Elf_Internal_Shdr *relsec;
+ unsigned char *tags;
+ unsigned int i;
+ int level;
+ unsigned long cu_offset;
external = (DWARF2_External_CompUnit *) start;
@@ -8050,7 +8172,7 @@ display_debug_info (section, start, file)
break;
}
- tags = start + sizeof (* external);
+ tags = start + sizeof (*external);
cu_offset = start - section_begin;
start += compunit.cu_length + sizeof (external->cu_length);
@@ -8070,13 +8192,13 @@ display_debug_info (section, start, file)
/* Read in the abbrevs used by this compilation unit. */
{
- Elf_Internal_Shdr * sec;
- unsigned char * begin;
+ Elf_Internal_Shdr *sec;
+ unsigned char *begin;
/* Locate the .debug_abbrev section and process it. */
for (i = 0, sec = section_headers;
i < elf_header.e_shnum;
- i ++, sec ++)
+ i++, sec++)
if (strcmp (SECTION_NAME (sec), ".debug_abbrev") == 0)
break;
@@ -8101,10 +8223,10 @@ display_debug_info (section, start, file)
level = 0;
while (tags < start)
{
- int bytes_read;
- unsigned long abbrev_number;
- abbrev_entry * entry;
- abbrev_attr * attr;
+ int bytes_read;
+ unsigned long abbrev_number;
+ abbrev_entry *entry;
+ abbrev_attr *attr;
abbrev_number = read_leb128 (tags, & bytes_read, 0);
tags += bytes_read;
@@ -8157,22 +8279,22 @@ display_debug_info (section, start, file)
static int
display_debug_aranges (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- unsigned char * end = start + section->sh_size;
+ unsigned char *end = start + section->sh_size;
printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
while (start < end)
{
- DWARF2_External_ARange * external;
- DWARF2_Internal_ARange arange;
- unsigned char * ranges;
- unsigned long length;
- unsigned long address;
- int excess;
+ DWARF2_External_ARange *external;
+ DWARF2_Internal_ARange arange;
+ unsigned char *ranges;
+ unsigned long length;
+ unsigned long address;
+ int excess;
external = (DWARF2_External_ARange *) start;
@@ -8202,10 +8324,10 @@ display_debug_aranges (section, start, file)
printf (_("\n Address Length\n"));
- ranges = start + sizeof (* external);
+ ranges = start + sizeof (*external);
/* Must pad to an alignment boundary that is twice the pointer size. */
- excess = sizeof (* external) % (2 * arange.ar_pointer_size);
+ excess = sizeof (*external) % (2 * arange.ar_pointer_size);
if (excess)
ranges += (2 * arange.ar_pointer_size) - excess;
@@ -8236,21 +8358,21 @@ display_debug_aranges (section, start, file)
typedef struct Frame_Chunk
{
- struct Frame_Chunk * next;
- unsigned char * chunk_start;
- int ncols;
+ struct Frame_Chunk *next;
+ unsigned char *chunk_start;
+ int ncols;
/* DW_CFA_{undefined,same_value,offset,register,unreferenced} */
- short int * col_type;
- int * col_offset;
- char * augmentation;
- unsigned int code_factor;
- int data_factor;
- unsigned long pc_begin;
- unsigned long pc_range;
- int cfa_reg;
- int cfa_offset;
- int ra;
- unsigned char fde_encoding;
+ short int *col_type;
+ int *col_offset;
+ char *augmentation;
+ unsigned int code_factor;
+ int data_factor;
+ unsigned long pc_begin;
+ unsigned long pc_range;
+ int cfa_reg;
+ int cfa_offset;
+ int ra;
+ unsigned char fde_encoding;
}
Frame_Chunk;
@@ -8264,7 +8386,7 @@ static int size_of_encoded_value PARAMS ((int));
static void
frame_need_space (fc, reg)
- Frame_Chunk * fc;
+ Frame_Chunk *fc;
int reg;
{
int prev = fc->ncols;
@@ -8288,23 +8410,23 @@ frame_need_space (fc, reg)
static void
frame_display_row (fc, need_col_headers, max_regs)
- Frame_Chunk * fc;
- int * need_col_headers;
- int * max_regs;
+ Frame_Chunk *fc;
+ int *need_col_headers;
+ int *max_regs;
{
int r;
char tmp[100];
- if (* max_regs < fc->ncols)
- * max_regs = fc->ncols;
+ if (*max_regs < fc->ncols)
+ *max_regs = fc->ncols;
- if (* need_col_headers)
+ if (*need_col_headers)
{
- * need_col_headers = 0;
+ *need_col_headers = 0;
printf (" LOC CFA ");
- for (r = 0; r < * max_regs; r++)
+ for (r = 0; r < *max_regs; r++)
if (fc->col_type[r] != DW_CFA_unreferenced)
{
if (r == fc->ra)
@@ -8368,34 +8490,34 @@ size_of_encoded_value (encoding)
static int
display_debug_frames (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- unsigned char * end = start + section->sh_size;
- unsigned char * section_start = start;
- Frame_Chunk * chunks = 0;
- Frame_Chunk * remembered_state = 0;
- Frame_Chunk * rs;
- int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0);
- int length_return;
- int max_regs = 0;
- int addr_size = is_32bit_elf ? 4 : 8;
+ unsigned char *end = start + section->sh_size;
+ unsigned char *section_start = start;
+ Frame_Chunk *chunks = 0;
+ Frame_Chunk *remembered_state = 0;
+ Frame_Chunk *rs;
+ int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0);
+ int length_return;
+ int max_regs = 0;
+ int addr_size = is_32bit_elf ? 4 : 8;
printf (_("The section %s contains:\n"), SECTION_NAME (section));
while (start < end)
{
- unsigned char * saved_start;
- unsigned char * block_end;
- unsigned long length;
- unsigned long cie_id;
- Frame_Chunk * fc;
- Frame_Chunk * cie;
- int need_col_headers = 1;
- unsigned char * augmentation_data = NULL;
- unsigned long augmentation_data_len = 0;
- int encoded_ptr_size = addr_size;
+ unsigned char *saved_start;
+ unsigned char *block_end;
+ unsigned long length;
+ unsigned long cie_id;
+ Frame_Chunk *fc;
+ Frame_Chunk *cie;
+ int need_col_headers = 1;
+ unsigned char *augmentation_data = NULL;
+ unsigned long augmentation_data_len = 0;
+ int encoded_ptr_size = addr_size;
saved_start = start;
length = byte_get (start, 4); start += 4;
@@ -8513,7 +8635,7 @@ display_debug_frames (section, start, file)
}
else
{
- unsigned char * look_for;
+ unsigned char *look_for;
static Frame_Chunk fde_fc;
fc = & fde_fc;
@@ -8594,14 +8716,14 @@ display_debug_frames (section, start, file)
{
/* Start by making a pass over the chunk, allocating storage
and taking note of what registers are used. */
- unsigned char * tmp = start;
+ unsigned char *tmp = start;
while (start < block_end)
{
unsigned op, opa;
unsigned long reg;
- op = * start ++;
+ op = *start++;
opa = op & 0x3f;
if (op & 0xc0)
op &= 0xc0;
@@ -8703,7 +8825,7 @@ display_debug_frames (section, start, file)
long l, ofs;
bfd_vma vma;
- op = * start ++;
+ op = *start++;
opa = op & 0x3f;
if (op & 0xc0)
op &= 0xc0;
@@ -8958,9 +9080,9 @@ display_debug_frames (section, start, file)
static int
display_debug_not_supported (section, start, file)
- Elf_Internal_Shdr * section;
- unsigned char * start ATTRIBUTE_UNUSED;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section;
+ unsigned char *start ATTRIBUTE_UNUSED;
+ FILE *file ATTRIBUTE_UNUSED;
{
printf (_("Displaying the debug contents of section %s is not yet supported.\n"),
SECTION_NAME (section));
@@ -8973,11 +9095,11 @@ display_debug_not_supported (section, start, file)
that all compilation units have the same address size. */
static int
prescan_debug_info (section, start, file)
- Elf_Internal_Shdr * section ATTRIBUTE_UNUSED;
- unsigned char * start;
- FILE * file ATTRIBUTE_UNUSED;
+ Elf_Internal_Shdr *section ATTRIBUTE_UNUSED;
+ unsigned char *start;
+ FILE *file ATTRIBUTE_UNUSED;
{
- DWARF2_External_CompUnit * external;
+ DWARF2_External_CompUnit *external;
external = (DWARF2_External_CompUnit *) start;
@@ -8991,39 +9113,39 @@ prescan_debug_info (section, start, file)
sections. */
struct
{
- const char * const name;
- int (* display) PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
- int (* prescan) PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+ const char *const name;
+ int (*display) PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
+ int (*prescan) PARAMS ((Elf_Internal_Shdr *, unsigned char *, FILE *));
}
debug_displays[] =
{
- { ".debug_abbrev", display_debug_abbrev, NULL },
- { ".debug_aranges", display_debug_aranges, NULL },
- { ".debug_frame", display_debug_frames, NULL },
- { ".debug_info", display_debug_info, prescan_debug_info },
- { ".debug_line", display_debug_lines, NULL },
- { ".debug_pubnames", display_debug_pubnames, NULL },
- { ".eh_frame", display_debug_frames, NULL },
- { ".debug_macinfo", display_debug_macinfo, NULL },
- { ".debug_str", display_debug_str, NULL },
- { ".debug_loc", display_debug_loc, NULL },
- { ".debug_pubtypes", display_debug_not_supported, NULL },
- { ".debug_ranges", display_debug_not_supported, NULL },
- { ".debug_static_func", display_debug_not_supported, NULL },
- { ".debug_static_vars", display_debug_not_supported, NULL },
- { ".debug_types", display_debug_not_supported, NULL },
- { ".debug_weaknames", display_debug_not_supported, NULL }
+ { ".debug_abbrev", display_debug_abbrev, NULL },
+ { ".debug_aranges", display_debug_aranges, NULL },
+ { ".debug_frame", display_debug_frames, NULL },
+ { ".debug_info", display_debug_info, prescan_debug_info },
+ { ".debug_line", display_debug_lines, NULL },
+ { ".debug_pubnames", display_debug_pubnames, NULL },
+ { ".eh_frame", display_debug_frames, NULL },
+ { ".debug_macinfo", display_debug_macinfo, NULL },
+ { ".debug_str", display_debug_str, NULL },
+ { ".debug_loc", display_debug_loc, NULL },
+ { ".debug_pubtypes", display_debug_not_supported, NULL },
+ { ".debug_ranges", display_debug_not_supported, NULL },
+ { ".debug_static_func", display_debug_not_supported, NULL },
+ { ".debug_static_vars", display_debug_not_supported, NULL },
+ { ".debug_types", display_debug_not_supported, NULL },
+ { ".debug_weaknames", display_debug_not_supported, NULL }
};
static int
display_debug_section (section, file)
- Elf_Internal_Shdr * section;
- FILE * file;
+ Elf_Internal_Shdr *section;
+ FILE *file;
{
- char * name = SECTION_NAME (section);
- bfd_size_type length;
- unsigned char * start;
- int i;
+ char *name = SECTION_NAME (section);
+ bfd_size_type length;
+ unsigned char *start;
+ int i;
length = section->sh_size;
if (length == 0)
@@ -9062,10 +9184,10 @@ display_debug_section (section, file)
static int
process_section_contents (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * section;
- unsigned int i;
+ Elf_Internal_Shdr *section;
+ unsigned int i;
if (! do_dump)
return 1;
@@ -9075,10 +9197,10 @@ process_section_contents (file)
size of address (specified in .debug_info and .debug_aranges). */
for (i = 0, section = section_headers;
i < elf_header.e_shnum && i < num_dump_sects;
- i ++, section ++)
+ i++, section++)
{
- char * name = SECTION_NAME (section);
- int j;
+ char *name = SECTION_NAME (section);
+ int j;
if (section->sh_size == 0)
continue;
@@ -9089,8 +9211,8 @@ process_section_contents (file)
{
if (debug_displays[j].prescan != NULL)
{
- bfd_size_type length;
- unsigned char * start;
+ bfd_size_type length;
+ unsigned char *start;
length = section->sh_size;
start = ((unsigned char *)
@@ -9109,7 +9231,7 @@ process_section_contents (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum && i < num_dump_sects;
- i ++, section ++)
+ i++, section++)
{
#ifdef SUPPORT_DISASSEMBLY
if (dump_sects[i] & DISASS_DUMP)
@@ -9152,9 +9274,9 @@ process_mips_fpe_exception (mask)
static int
process_mips_specific (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Dyn * entry;
+ Elf_Internal_Dyn *entry;
size_t liblist_offset = 0;
size_t liblistno = 0;
size_t conflictsno = 0;
@@ -9190,7 +9312,7 @@ process_mips_specific (file)
if (liblist_offset != 0 && liblistno != 0 && do_dynamic)
{
- Elf32_External_Lib * elib;
+ Elf32_External_Lib *elib;
size_t cnt;
elib = ((Elf32_External_Lib *)
@@ -9209,7 +9331,7 @@ process_mips_specific (file)
Elf32_Lib liblist;
time_t time;
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
liblist.l_name = BYTE_GET (elib[cnt].l_name);
time = BYTE_GET (elib[cnt].l_time_stamp);
@@ -9233,7 +9355,7 @@ process_mips_specific (file)
{
static const struct
{
- const char * name;
+ const char *name;
int bit;
}
l_flags_vals[] =
@@ -9269,23 +9391,23 @@ process_mips_specific (file)
if (options_offset != 0)
{
- Elf_External_Options * eopt;
- Elf_Internal_Shdr * sect = section_headers;
- Elf_Internal_Options * iopt;
- Elf_Internal_Options * option;
+ Elf_External_Options *eopt;
+ Elf_Internal_Shdr *sect = section_headers;
+ Elf_Internal_Options *iopt;
+ Elf_Internal_Options *option;
size_t offset;
int cnt;
/* Find the section header so that we get the size. */
while (sect->sh_type != SHT_MIPS_OPTIONS)
- ++ sect;
+ ++sect;
eopt = (Elf_External_Options *) get_data (NULL, file, options_offset,
sect->sh_size, _("options"));
if (eopt)
{
iopt = ((Elf_Internal_Options *)
- malloc ((sect->sh_size / sizeof (eopt)) * sizeof (* iopt)));
+ malloc ((sect->sh_size / sizeof (eopt)) * sizeof (*iopt)));
if (iopt == NULL)
{
error (_("Out of memory"));
@@ -9297,7 +9419,7 @@ process_mips_specific (file)
while (offset < sect->sh_size)
{
- Elf_External_Options * eoption;
+ Elf_External_Options *eoption;
eoption = (Elf_External_Options *) ((char *) eopt + offset);
@@ -9332,8 +9454,8 @@ process_mips_specific (file)
if (elf_header.e_machine == EM_MIPS)
{
/* 32bit form. */
- Elf32_External_RegInfo * ereg;
- Elf32_RegInfo reginfo;
+ Elf32_External_RegInfo *ereg;
+ Elf32_RegInfo reginfo;
ereg = (Elf32_External_RegInfo *) (option + 1);
reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask);
@@ -9353,7 +9475,7 @@ process_mips_specific (file)
else
{
/* 64 bit form. */
- Elf64_External_RegInfo * ereg;
+ Elf64_External_RegInfo *ereg;
Elf64_Internal_RegInfo reginfo;
ereg = (Elf64_External_RegInfo *) (option + 1);
@@ -9450,7 +9572,7 @@ process_mips_specific (file)
break;
}
- len = sizeof (* eopt);
+ len = sizeof (*eopt);
while (len < option->size)
if (((char *) option)[len] >= ' '
&& ((char *) option)[len] < 0x7f)
@@ -9468,7 +9590,7 @@ process_mips_specific (file)
if (conflicts_offset != 0 && conflictsno != 0)
{
- Elf32_Conflict * iconf;
+ Elf32_Conflict *iconf;
size_t cnt;
if (dynamic_symbols == NULL)
@@ -9477,7 +9599,7 @@ process_mips_specific (file)
return 0;
}
- iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (* iconf));
+ iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (*iconf));
if (iconf == NULL)
{
error (_("Out of memory"));
@@ -9486,11 +9608,11 @@ process_mips_specific (file)
if (is_32bit_elf)
{
- Elf32_External_Conflict * econf32;
+ Elf32_External_Conflict *econf32;
econf32 = ((Elf32_External_Conflict *)
get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (* econf32),
+ conflictsno * sizeof (*econf32),
_("conflict")));
if (!econf32)
return 0;
@@ -9502,11 +9624,11 @@ process_mips_specific (file)
}
else
{
- Elf64_External_Conflict * econf64;
+ Elf64_External_Conflict *econf64;
econf64 = ((Elf64_External_Conflict *)
get_data (NULL, file, conflicts_offset,
- conflictsno * sizeof (* econf64),
+ conflictsno * sizeof (*econf64),
_("conflict")));
if (!econf64)
return 0;
@@ -9523,9 +9645,9 @@ process_mips_specific (file)
for (cnt = 0; cnt < conflictsno; ++cnt)
{
- Elf_Internal_Sym * psym = & dynamic_symbols [iconf [cnt]];
+ Elf_Internal_Sym *psym = & dynamic_symbols[iconf[cnt]];
- printf ("%5lu: %8lu ", (unsigned long) cnt, iconf [cnt]);
+ printf ("%5lu: %8lu ", (unsigned long) cnt, iconf[cnt]);
print_vma (psym->st_value, FULL_HEX);
putchar (' ');
print_symbol (25, dynamic_strings + psym->st_name);
@@ -9540,11 +9662,11 @@ process_mips_specific (file)
static int
process_gnu_liblist (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Shdr * section, * string_sec;
- Elf32_External_Lib * elib;
- char * strtab;
+ Elf_Internal_Shdr *section, *string_sec;
+ Elf32_External_Lib *elib;
+ char *strtab;
size_t cnt;
unsigned i;
@@ -9553,7 +9675,7 @@ process_gnu_liblist (file)
for (i = 0, section = section_headers;
i < elf_header.e_shnum;
- i++, section ++)
+ i++, section++)
{
switch (section->sh_type)
{
@@ -9589,7 +9711,7 @@ process_gnu_liblist (file)
Elf32_Lib liblist;
time_t time;
char timebuf[20];
- struct tm * tmp;
+ struct tm *tmp;
liblist.l_name = BYTE_GET (elib[cnt].l_name);
time = BYTE_GET (elib[cnt].l_time_stamp);
@@ -9628,9 +9750,9 @@ get_note_type (e_type)
{
case NT_PRSTATUS: return _("NT_PRSTATUS (prstatus structure)");
case NT_FPREGSET: return _("NT_FPREGSET (floating point registers)");
- case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
- case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
- case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
+ case NT_PRPSINFO: return _("NT_PRPSINFO (prpsinfo structure)");
+ case NT_TASKSTRUCT: return _("NT_TASKSTRUCT (task structure)");
+ case NT_PRXFPREG: return _("NT_PRXFPREG (user_xfpregs structure)");
case NT_PSTATUS: return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS: return _("NT_FPREGS (floating point registers)");
case NT_PSINFO: return _("NT_PSINFO (psinfo structure)");
@@ -9712,7 +9834,7 @@ get_netbsd_elfcore_note_type (e_type)
If the value of namesz is zero, there is no name present. */
static int
process_note (pnote)
- Elf_Internal_Note * pnote;
+ Elf_Internal_Note *pnote;
{
const char *nt;
@@ -9743,13 +9865,13 @@ process_note (pnote)
static int
process_corefile_note_segment (file, offset, length)
- FILE * file;
+ FILE *file;
bfd_vma offset;
bfd_vma length;
{
- Elf_External_Note * pnotes;
- Elf_External_Note * external;
- int res = 1;
+ Elf_External_Note *pnotes;
+ Elf_External_Note *external;
+ int res = 1;
if (length <= 0)
return 0;
@@ -9767,9 +9889,9 @@ process_corefile_note_segment (file, offset, length)
while (external < (Elf_External_Note *)((char *) pnotes + length))
{
- Elf_External_Note * next;
- Elf_Internal_Note inote;
- char * temp = NULL;
+ Elf_External_Note *next;
+ Elf_Internal_Note inote;
+ char *temp = NULL;
inote.type = BYTE_GET (external->type);
inote.namesz = BYTE_GET (external->namesz);
@@ -9829,12 +9951,12 @@ process_corefile_note_segment (file, offset, length)
static int
process_corefile_note_segments (file)
- FILE * file;
+ FILE *file;
{
- Elf_Internal_Phdr * program_headers;
- Elf_Internal_Phdr * segment;
- unsigned int i;
- int res = 1;
+ Elf_Internal_Phdr *program_headers;
+ Elf_Internal_Phdr *segment;
+ unsigned int i;
+ int res = 1;
program_headers = (Elf_Internal_Phdr *) malloc
(elf_header.e_phnum * sizeof (Elf_Internal_Phdr));
@@ -9858,7 +9980,7 @@ process_corefile_note_segments (file)
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
- i ++, segment ++)
+ i++, segment++)
{
if (segment->p_type == PT_NOTE)
res &= process_corefile_note_segment (file,
@@ -9873,7 +9995,7 @@ process_corefile_note_segments (file)
static int
process_corefile_contents (file)
- FILE * file;
+ FILE *file;
{
/* If we have not been asked to display the notes then do nothing. */
if (! do_notes)
@@ -9895,7 +10017,7 @@ process_corefile_contents (file)
static int
process_arch_specific (file)
- FILE * file;
+ FILE *file;
{
if (! do_arch)
return 1;
@@ -9914,14 +10036,14 @@ process_arch_specific (file)
static int
get_file_header (file)
- FILE * file;
+ FILE *file;
{
/* Read in the identity array. */
if (fread (elf_header.e_ident, EI_NIDENT, 1, file) != 1)
return 0;
/* Determine how to read the rest of the header. */
- switch (elf_header.e_ident [EI_DATA])
+ switch (elf_header.e_ident[EI_DATA])
{
default: /* fall through */
case ELFDATANONE: /* fall through */
@@ -9930,7 +10052,7 @@ get_file_header (file)
}
/* For now we only support 32 bit and 64 bit ELF files. */
- is_32bit_elf = (elf_header.e_ident [EI_CLASS] != ELFCLASS64);
+ is_32bit_elf = (elf_header.e_ident[EI_CLASS] != ELFCLASS64);
/* Read in the rest of the header. */
if (is_32bit_elf)
@@ -10002,10 +10124,10 @@ get_file_header (file)
static int
process_file (file_name)
- char * file_name;
+ char *file_name;
{
- FILE * file;
- struct stat statbuf;
+ FILE *file;
+ struct stat statbuf;
unsigned int i;
if (stat (file_name, & statbuf) < 0)
@@ -10119,7 +10241,7 @@ process_file (file_name)
symbols. */
void
-print_address (unsigned int addr, FILE * outfile)
+print_address (unsigned int addr, FILE *outfile)
{
fprintf (outfile,"0x%8.8x", addr);
}
@@ -10136,8 +10258,8 @@ int main PARAMS ((int, char **));
int
main (argc, argv)
- int argc;
- char ** argv;
+ int argc;
+ char **argv;
{
int err;
@@ -10157,7 +10279,7 @@ main (argc, argv)
err = 0;
while (optind < argc)
- err |= process_file (argv [optind ++]);
+ err |= process_file (argv[optind++]);
if (dump_sects != NULL)
free (dump_sects);
diff --git a/binutils/rename.c b/binutils/rename.c
index 1a6a86b..0ccaedc 100644
--- a/binutils/rename.c
+++ b/binutils/rename.c
@@ -1,5 +1,5 @@
/* rename.c -- rename a file, preserving symlinks.
- Copyright 1999 Free Software Foundation, Inc.
+ Copyright 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -37,7 +37,8 @@
#define O_BINARY 0
#endif
-static int simple_copy PARAMS ((const char *, const char *));
+static int simple_copy
+ PARAMS ((const char *, const char *));
/* The number of bytes to copy at once. */
#define COPY_BUF 8192
@@ -149,7 +150,7 @@ smart_rename (from, to, preserve_dates)
const char *to;
int preserve_dates;
{
- boolean exists;
+ bfd_boolean exists;
struct stat s;
int ret = 0;
diff --git a/binutils/size.c b/binutils/size.c
index 8804a43..5e4c9ed 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -1,6 +1,6 @@
/* size.c -- report size of various sections of an executable file.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -357,12 +357,12 @@ display_file (filename)
return;
}
- if (bfd_check_format (file, bfd_archive) == true)
+ if (bfd_check_format (file, bfd_archive))
display_archive (file);
else
display_bfd (file);
- if (bfd_close (file) == false)
+ if (!bfd_close (file))
{
bfd_nonfatal (filename);
return_code = 1;
diff --git a/binutils/stabs.c b/binutils/stabs.c
index d3efdf1..1ff4f6f 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -53,8 +53,8 @@ struct stab_handle
{
/* The BFD. */
bfd *abfd;
- /* True if this is stabs in sections. */
- boolean sections;
+ /* TRUE if this is stabs in sections. */
+ bfd_boolean sections;
/* The symbol table. */
asymbol **syms;
/* The number of symbols. */
@@ -74,7 +74,7 @@ struct stab_handle
int gcc_compiled;
/* Whether an N_OPT symbol was seen that was not generated by gcc,
so that we can detect the SunPRO compiler. */
- boolean n_opt_found;
+ bfd_boolean n_opt_found;
/* The main file name. */
char *main_filename;
/* A stack of unfinished N_BINCL files. */
@@ -82,7 +82,7 @@ struct stab_handle
/* A list of finished N_BINCL files. */
struct bincl_file *bincl_list;
/* Whether we are inside a function or not. */
- boolean within_function;
+ bfd_boolean within_function;
/* The address of the end of the function, used if we have seen an
N_FUN symbol while in a function. This is -1 if we have not seen
an N_FUN (the normal case). */
@@ -101,7 +101,7 @@ struct stab_handle
struct stab_tag *tags;
/* Set by parse_stab_type if it sees a structure defined as a cross
reference to itself. Reset by parse_stab_type otherwise. */
- boolean self_crossref;
+ bfd_boolean self_crossref;
};
/* A list of these structures is used to hold pending variable
@@ -151,61 +151,70 @@ struct stab_tag
debug_type type;
};
-static char *savestring PARAMS ((const char *, int));
-static bfd_vma parse_number PARAMS ((const char **, boolean *));
-static void bad_stab PARAMS ((const char *));
-static void warn_stab PARAMS ((const char *, const char *));
-static boolean parse_stab_string
+static char *savestring
+ PARAMS ((const char *, int));
+static bfd_vma parse_number
+ PARAMS ((const char **, bfd_boolean *));
+static void bad_stab
+ PARAMS ((const char *));
+static void warn_stab
+ PARAMS ((const char *, const char *));
+static bfd_boolean parse_stab_string
PARAMS ((PTR, struct stab_handle *, int, int, bfd_vma, const char *));
static debug_type parse_stab_type
PARAMS ((PTR, struct stab_handle *, const char *, const char **,
debug_type **));
-static boolean parse_stab_type_number
+static bfd_boolean parse_stab_type_number
PARAMS ((const char **, int *));
static debug_type parse_stab_range_type
PARAMS ((PTR, struct stab_handle *, const char *, const char **,
const int *));
-static debug_type parse_stab_sun_builtin_type PARAMS ((PTR, const char **));
+static debug_type parse_stab_sun_builtin_type
+ PARAMS ((PTR, const char **));
static debug_type parse_stab_sun_floating_type
PARAMS ((PTR, const char **));
-static debug_type parse_stab_enum_type PARAMS ((PTR, const char **));
+static debug_type parse_stab_enum_type
+ PARAMS ((PTR, const char **));
static debug_type parse_stab_struct_type
- PARAMS ((PTR, struct stab_handle *, const char *, const char **, boolean,
+ PARAMS ((PTR, struct stab_handle *, const char *, const char **, bfd_boolean,
const int *));
-static boolean parse_stab_baseclasses
+static bfd_boolean parse_stab_baseclasses
PARAMS ((PTR, struct stab_handle *, const char **, debug_baseclass **));
-static boolean parse_stab_struct_fields
+static bfd_boolean parse_stab_struct_fields
PARAMS ((PTR, struct stab_handle *, const char **, debug_field **,
- boolean *));
-static boolean parse_stab_cpp_abbrev
+ bfd_boolean *));
+static bfd_boolean parse_stab_cpp_abbrev
PARAMS ((PTR, struct stab_handle *, const char **, debug_field *));
-static boolean parse_stab_one_struct_field
+static bfd_boolean parse_stab_one_struct_field
PARAMS ((PTR, struct stab_handle *, const char **, const char *,
- debug_field *, boolean *));
-static boolean parse_stab_members
+ debug_field *, bfd_boolean *));
+static bfd_boolean parse_stab_members
PARAMS ((PTR, struct stab_handle *, const char *, const char **,
const int *, debug_method **));
static debug_type parse_stab_argtypes
PARAMS ((PTR, struct stab_handle *, debug_type, const char *, const char *,
- debug_type, const char *, boolean, boolean, const char **));
-static boolean parse_stab_tilde_field
+ debug_type, const char *, bfd_boolean, bfd_boolean, const char **));
+static bfd_boolean parse_stab_tilde_field
PARAMS ((PTR, struct stab_handle *, const char **, const int *,
- debug_type *, boolean *));
+ debug_type *, bfd_boolean *));
static debug_type parse_stab_array_type
- PARAMS ((PTR, struct stab_handle *, const char **, boolean));
-static void push_bincl PARAMS ((struct stab_handle *, const char *, bfd_vma));
-static const char *pop_bincl PARAMS ((struct stab_handle *));
-static boolean find_excl
+ PARAMS ((PTR, struct stab_handle *, const char **, bfd_boolean));
+static void push_bincl
+ PARAMS ((struct stab_handle *, const char *, bfd_vma));
+static const char *pop_bincl
+ PARAMS ((struct stab_handle *));
+static bfd_boolean find_excl
PARAMS ((struct stab_handle *, const char *, bfd_vma));
-static boolean stab_record_variable
+static bfd_boolean stab_record_variable
PARAMS ((PTR, struct stab_handle *, const char *, debug_type,
enum debug_var_kind, bfd_vma));
-static boolean stab_emit_pending_vars PARAMS ((PTR, struct stab_handle *));
+static bfd_boolean stab_emit_pending_vars
+ PARAMS ((PTR, struct stab_handle *));
static debug_type *stab_find_slot
PARAMS ((struct stab_handle *, const int *));
static debug_type stab_find_type
PARAMS ((PTR, struct stab_handle *, const int *));
-static boolean stab_record_type
+static bfd_boolean stab_record_type
PARAMS ((PTR, struct stab_handle *, const int *, debug_type));
static debug_type stab_xcoff_builtin_type
PARAMS ((PTR, struct stab_handle *, int));
@@ -213,7 +222,7 @@ static debug_type stab_find_tagged_type
PARAMS ((PTR, struct stab_handle *, const char *, int,
enum debug_type_kind));
static debug_type *stab_demangle_argtypes
- PARAMS ((PTR, struct stab_handle *, const char *, boolean *, unsigned int));
+ PARAMS ((PTR, struct stab_handle *, const char *, bfd_boolean *, unsigned int));
/* Save a string in memory. */
@@ -235,13 +244,13 @@ savestring (start, len)
static bfd_vma
parse_number (pp, poverflow)
const char **pp;
- boolean *poverflow;
+ bfd_boolean *poverflow;
{
unsigned long ul;
const char *orig;
if (poverflow != NULL)
- *poverflow = false;
+ *poverflow = FALSE;
orig = *pp;
@@ -263,22 +272,22 @@ parse_number (pp, poverflow)
if (sizeof (bfd_vma) > sizeof (unsigned long))
{
const char *p;
- boolean neg;
+ bfd_boolean neg;
int base;
bfd_vma over, lastdig;
- boolean overflow;
+ bfd_boolean overflow;
bfd_vma v;
/* Our own version of strtoul, for a bfd_vma. */
p = orig;
- neg = false;
+ neg = FALSE;
if (*p == '+')
++p;
else if (*p == '-')
{
- neg = true;
+ neg = TRUE;
++p;
}
@@ -300,7 +309,7 @@ parse_number (pp, poverflow)
over = ((bfd_vma) (bfd_signed_vma) -1) / (bfd_vma) base;
lastdig = ((bfd_vma) (bfd_signed_vma) -1) % (bfd_vma) base;
- overflow = false;
+ overflow = FALSE;
v = 0;
while (1)
{
@@ -321,7 +330,7 @@ parse_number (pp, poverflow)
if (v > over || (v == over && (bfd_vma) d > lastdig))
{
- overflow = true;
+ overflow = TRUE;
break;
}
}
@@ -338,7 +347,7 @@ parse_number (pp, poverflow)
bfd_vma. */
if (poverflow != NULL)
- *poverflow = true;
+ *poverflow = TRUE;
else
warn_stab (orig, _("numeric overflow"));
@@ -370,7 +379,7 @@ PTR
start_stab (dhandle, abfd, sections, syms, symcount)
PTR dhandle ATTRIBUTE_UNUSED;
bfd *abfd;
- boolean sections;
+ bfd_boolean sections;
asymbol **syms;
long symcount;
{
@@ -392,7 +401,7 @@ start_stab (dhandle, abfd, sections, syms, symcount)
/* When we have processed all the stabs information, we need to go
through and fill in all the undefined tags. */
-boolean
+bfd_boolean
finish_stab (dhandle, handle)
PTR dhandle;
PTR handle;
@@ -404,8 +413,8 @@ finish_stab (dhandle, handle)
{
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, info->function_end))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
@@ -418,15 +427,15 @@ finish_stab (dhandle, handle)
kind = DEBUG_KIND_STRUCT;
st->slot = debug_make_undefined_tagged_type (dhandle, st->name, kind);
if (st->slot == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Handle a single stabs symbol. */
-boolean
+bfd_boolean
parse_stab (dhandle, handle, type, desc, value, string)
PTR dhandle;
PTR handle;
@@ -445,11 +454,11 @@ parse_stab (dhandle, handle, type, desc, value, string)
&& (type != N_SO || *string == '\0' || value != info->so_value))
{
if (! debug_set_filename (dhandle, info->so_string))
- return false;
+ return FALSE;
info->main_filename = info->so_string;
info->gcc_compiled = 0;
- info->n_opt_found = false;
+ info->n_opt_found = FALSE;
/* Generally, for stabs in the symbol table, the N_LBRAC and
N_RBRAC symbols are relative to the N_SO symbol value. */
@@ -483,7 +492,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
if (! info->within_function)
{
fprintf (stderr, _("N_LBRAC not within function\n"));
- return false;
+ return FALSE;
}
/* Start an inner lexical block. */
@@ -491,11 +500,11 @@ parse_stab (dhandle, handle, type, desc, value, string)
(value
+ info->file_start_offset
+ info->function_start_offset)))
- return false;
+ return FALSE;
/* Emit any pending variable definitions. */
if (! stab_emit_pending_vars (dhandle, info))
- return false;
+ return FALSE;
++info->block_depth;
break;
@@ -509,20 +518,20 @@ parse_stab (dhandle, handle, type, desc, value, string)
if we do, we probably need to emit them before closing the
block. */
if (! stab_emit_pending_vars (dhandle, info))
- return false;
+ return FALSE;
/* End an inner lexical block. */
if (! debug_end_block (dhandle,
(value
+ info->file_start_offset
+ info->function_start_offset)))
- return false;
+ return FALSE;
--info->block_depth;
if (info->block_depth < 0)
{
fprintf (stderr, _("Too many N_RBRACs\n"));
- return false;
+ return FALSE;
}
break;
@@ -539,15 +548,15 @@ parse_stab (dhandle, handle, type, desc, value, string)
endval = info->function_end;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, endval))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
/* An empty string is emitted by gcc at the end of a compilation
unit. */
if (*string == '\0')
- return true;
+ return TRUE;
/* Just accumulate strings until we see a non N_SO symbol. If
the string starts with a directory separator or some other
@@ -576,43 +585,43 @@ parse_stab (dhandle, handle, type, desc, value, string)
case N_SOL:
/* Start an include file. */
if (! debug_start_source (dhandle, string))
- return false;
+ return FALSE;
break;
case N_BINCL:
/* Start an include file which may be replaced. */
push_bincl (info, string, value);
if (! debug_start_source (dhandle, string))
- return false;
+ return FALSE;
break;
case N_EINCL:
/* End an N_BINCL include. */
if (! debug_start_source (dhandle, pop_bincl (info)))
- return false;
+ return FALSE;
break;
case N_EXCL:
/* This is a duplicate of a header file named by N_BINCL which
was eliminated by the linker. */
if (! find_excl (info, string, value))
- return false;
+ return FALSE;
break;
case N_SLINE:
if (! debug_record_line (dhandle, desc,
value + info->function_start_offset))
- return false;
+ return FALSE;
break;
case N_BCOMM:
if (! debug_start_common_block (dhandle, string))
- return false;
+ return FALSE;
break;
case N_ECOMM:
if (! debug_end_common_block (dhandle, string))
- return false;
+ return FALSE;
break;
case N_FUN:
@@ -626,8 +635,8 @@ parse_stab (dhandle, handle, type, desc, value, string)
value += info->function_start_offset;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, value))
- return false;
- info->within_function = false;
+ return FALSE;
+ info->within_function = FALSE;
info->function_end = (bfd_vma) -1;
}
break;
@@ -667,18 +676,18 @@ parse_stab (dhandle, handle, type, desc, value, string)
endval = info->function_end;
if (! stab_emit_pending_vars (dhandle, info)
|| ! debug_end_function (dhandle, endval))
- return false;
+ return FALSE;
info->function_end = (bfd_vma) -1;
}
/* For stabs in sections, line numbers and block addresses
are offsets from the start of the function. */
if (info->sections)
info->function_start_offset = value;
- info->within_function = true;
+ info->within_function = TRUE;
}
if (! parse_stab_string (dhandle, info, type, desc, value, string))
- return false;
+ return FALSE;
}
break;
@@ -688,7 +697,7 @@ parse_stab (dhandle, handle, type, desc, value, string)
else if (string != NULL && strcmp (string, "gcc_compiled.") == 0)
info->gcc_compiled = 1;
else
- info->n_opt_found = true;
+ info->n_opt_found = TRUE;
break;
case N_OBJ:
@@ -698,12 +707,12 @@ parse_stab (dhandle, handle, type, desc, value, string)
break;
}
- return true;
+ return TRUE;
}
/* Parse the stabs string. */
-static boolean
+static bfd_boolean
parse_stab_string (dhandle, info, stabtype, desc, value, string)
PTR dhandle;
struct stab_handle *info;
@@ -716,14 +725,14 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
char *name;
int type;
debug_type dtype;
- boolean synonym;
- boolean self_crossref;
+ bfd_boolean synonym;
+ bfd_boolean self_crossref;
unsigned int lineno;
debug_type *slot;
p = strchr (string, ':');
if (p == NULL)
- return true;
+ return TRUE;
while (p[1] == ':')
{
@@ -732,7 +741,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (p == NULL)
{
bad_stab (string);
- return false;
+ return FALSE;
}
}
@@ -797,7 +806,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (*p != '=')
{
bad_stab (string);
- return false;
+ return FALSE;
}
++p;
switch (*p++)
@@ -805,7 +814,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
case 'r':
/* Floating point constant. */
if (! debug_record_float_const (dhandle, name, atof (p)))
- return false;
+ return FALSE;
break;
case 'i':
/* Integer constant. */
@@ -816,7 +825,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
other languages probably should have at least unsigned as
well as signed constants. */
if (! debug_record_int_const (dhandle, name, atoi (p)))
- return false;
+ return FALSE;
break;
case 'e':
/* SYMBOL:c=eTYPE,INTVALUE for a constant symbol whose value
@@ -826,18 +835,18 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL,
&p, (debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (*p != ',')
{
bad_stab (string);
- return false;
+ return FALSE;
}
if (! debug_record_typed_const (dhandle, name, dtype, atoi (p)))
- return false;
+ return FALSE;
break;
default:
bad_stab (string);
- return false;
+ return FALSE;
}
break;
@@ -847,9 +856,9 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL,
&p, (debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_label (dhandle, name, dtype, value))
- return false;
+ return FALSE;
break;
case 'f':
@@ -858,9 +867,9 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_function (dhandle, name, dtype, type == 'F', value))
- return false;
+ return FALSE;
/* Sun acc puts declared types of arguments here. We don't care
about their actual types (FIXME -- we should remember the whole
@@ -872,7 +881,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL)
== DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
break;
@@ -888,7 +897,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
leading = bfd_get_symbol_leading_char (info->abfd);
for (c = info->symcount, ps = info->syms; c > 0; --c, ++ps)
{
@@ -904,7 +913,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
value = bfd_asymbol_value (*ps);
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_GLOBAL,
value))
- return false;
+ return FALSE;
}
break;
@@ -916,10 +925,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_LOCAL,
value))
- return false;
+ return FALSE;
break;
case 'p':
@@ -940,15 +949,15 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
debug_type ftype;
ftype = debug_make_function_type (dhandle, dtype,
- (debug_type *) NULL, false);
+ (debug_type *) NULL, FALSE);
dtype = debug_make_pointer_type (dhandle, ftype);
}
}
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_STACK,
value))
- return false;
+ return FALSE;
/* FIXME: At this point gdb considers rearranging the parameter
address on a big endian machine if it is smaller than an int.
@@ -967,7 +976,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
if (parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL)
== DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
break;
}
@@ -977,10 +986,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REG,
value))
- return false;
+ return FALSE;
break;
case 'r':
@@ -988,10 +997,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_REGISTER,
value))
- return false;
+ return FALSE;
/* FIXME: At this point gdb checks to combine pairs of 'p' and
'r' stabs into a single 'P' stab. */
@@ -1003,26 +1012,26 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_STATIC,
value))
- return false;
+ return FALSE;
break;
case 't':
/* A typedef. */
dtype = parse_stab_type (dhandle, info, name, &p, &slot);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (name == NULL)
{
/* A nameless type. Nothing to do. */
- return true;
+ return TRUE;
}
dtype = debug_name_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1034,21 +1043,21 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
by 't' which means we are typedef'ing it as well. */
if (*p != 't')
{
- synonym = false;
- /* FIXME: gdb sets synonym to true if the current language
+ synonym = FALSE;
+ /* FIXME: gdb sets synonym to TRUE if the current language
is C++. */
}
else
{
- synonym = true;
+ synonym = TRUE;
++p;
}
dtype = parse_stab_type (dhandle, info, name, &p, &slot);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (name == NULL)
- return true;
+ return TRUE;
/* INFO->SELF_CROSSREF is set by parse_stab_type if this type is
a cross reference to itself. These are generated by some
@@ -1057,7 +1066,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = debug_tag_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1084,7 +1093,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
{
dtype = debug_name_type (dhandle, name, dtype);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (slot != NULL)
*slot = dtype;
@@ -1097,11 +1106,11 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
/* FIXME: gdb checks os9k_stabs here. */
if (! stab_record_variable (dhandle, info, name, dtype,
DEBUG_LOCAL_STATIC, value))
- return false;
+ return FALSE;
break;
case 'v':
@@ -1109,10 +1118,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REFERENCE,
value))
- return false;
+ return FALSE;
break;
case 'a':
@@ -1120,10 +1129,10 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! debug_record_parameter (dhandle, name, dtype, DEBUG_PARM_REF_REG,
value))
- return false;
+ return FALSE;
break;
case 'X':
@@ -1134,21 +1143,21 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
dtype = parse_stab_type (dhandle, info, (const char *) NULL, &p,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_LOCAL,
value))
- return false;
+ return FALSE;
break;
default:
bad_stab (string);
- return false;
+ return FALSE;
}
/* FIXME: gdb converts structure values to structure pointers in a
couple of cases, depending upon the target. */
- return true;
+ return TRUE;
}
/* Parse a stabs type. The typename argument is non-NULL if this is a
@@ -1167,7 +1176,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
const char *orig;
int typenums[2];
int size;
- boolean stringp;
+ bfd_boolean stringp;
int descriptor;
debug_type dtype;
@@ -1177,9 +1186,9 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
orig = *pp;
size = -1;
- stringp = false;
+ stringp = FALSE;
- info->self_crossref = false;
+ info->self_crossref = FALSE;
/* Read type number if present. The type number may be omitted.
for instance in a two-dimensional array declared with type
@@ -1256,7 +1265,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
break;
case 'S':
- stringp = true;
+ stringp = TRUE;
break;
default:
@@ -1334,7 +1343,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
if (typename != NULL
&& strncmp (typename, *pp, p - *pp) == 0
&& typename[p - *pp] == '\0')
- info->self_crossref = true;
+ info->self_crossref = TRUE;
dtype = stab_find_tagged_type (dhandle, info, *pp, p - *pp, code);
@@ -1418,7 +1427,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
(dhandle,
parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL),
- (debug_type *) NULL, false));
+ (debug_type *) NULL, FALSE));
break;
case 'k':
@@ -1489,7 +1498,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
++*pp;
dtype = debug_make_method_type (dhandle, return_type,
DEBUG_TYPE_NULL,
- (debug_type *) NULL, false);
+ (debug_type *) NULL, FALSE);
}
else
{
@@ -1498,7 +1507,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
debug_type *args;
unsigned int n;
unsigned int alloc;
- boolean varargs;
+ bfd_boolean varargs;
domain = parse_stab_type (dhandle, info, (const char *) NULL,
pp, (debug_type **) NULL);
@@ -1549,11 +1558,11 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
the void type. */
if (n == 0
|| debug_get_type_kind (dhandle, args[n - 1]) != DEBUG_KIND_VOID)
- varargs = true;
+ varargs = TRUE;
else
{
--n;
- varargs = false;
+ varargs = FALSE;
}
args[n] = DEBUG_TYPE_NULL;
@@ -1640,7 +1649,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
single number N is equivalent to (0,N). Return the two numbers by
storing them in the vector TYPENUMS. */
-static boolean
+static bfd_boolean
parse_stab_type_number (pp, typenums)
const char **pp;
int *typenums;
@@ -1652,28 +1661,28 @@ parse_stab_type_number (pp, typenums)
if (**pp != '(')
{
typenums[0] = 0;
- typenums[1] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[1] = (int) parse_number (pp, (bfd_boolean *) NULL);
}
else
{
++*pp;
- typenums[0] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[0] = (int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- typenums[1] = (int) parse_number (pp, (boolean *) NULL);
+ typenums[1] = (int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ')')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
}
- return true;
+ return TRUE;
}
/* Parse a range type. */
@@ -1688,11 +1697,11 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
{
const char *orig;
int rangenums[2];
- boolean self_subrange;
+ bfd_boolean self_subrange;
debug_type index_type;
const char *s2, *s3;
bfd_signed_vma n2, n3;
- boolean ov2, ov3;
+ bfd_boolean ov2, ov3;
orig = *pp;
@@ -1749,11 +1758,11 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
{
if (strncmp (s2, LLLOW, sizeof LLLOW - 1) == 0
&& strncmp (s3, LLHIGH, sizeof LLHIGH - 1) == 0)
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
if (! ov2
&& n2 == 0
&& strncmp (s3, ULLHIGH, sizeof ULLHIGH - 1) == 0)
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
}
warn_stab (orig, _("numeric overflow"));
@@ -1786,50 +1795,50 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
if (typename != NULL)
{
if (strcmp (typename, "long long int") == 0)
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
else if (strcmp (typename, "long long unsigned int") == 0)
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
}
/* FIXME: The size here really depends upon the target. */
- return debug_make_int_type (dhandle, 4, true);
+ return debug_make_int_type (dhandle, 4, TRUE);
}
/* A range of 0 to 127 is char. */
if (self_subrange && n2 == 0 && n3 == 127)
- return debug_make_int_type (dhandle, 1, false);
+ return debug_make_int_type (dhandle, 1, FALSE);
/* FIXME: gdb checks for the language CHILL here. */
if (n2 == 0)
{
if (n3 < 0)
- return debug_make_int_type (dhandle, - n3, true);
+ return debug_make_int_type (dhandle, - n3, TRUE);
else if (n3 == 0xff)
- return debug_make_int_type (dhandle, 1, true);
+ return debug_make_int_type (dhandle, 1, TRUE);
else if (n3 == 0xffff)
- return debug_make_int_type (dhandle, 2, true);
+ return debug_make_int_type (dhandle, 2, TRUE);
else if (n3 == (bfd_signed_vma) 0xffffffff)
- return debug_make_int_type (dhandle, 4, true);
+ return debug_make_int_type (dhandle, 4, TRUE);
#ifdef BFD64
else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff))
- return debug_make_int_type (dhandle, 8, true);
+ return debug_make_int_type (dhandle, 8, TRUE);
#endif
}
else if (n3 == 0
&& n2 < 0
&& (self_subrange || n2 == -8))
- return debug_make_int_type (dhandle, - n2, true);
+ return debug_make_int_type (dhandle, - n2, TRUE);
else if (n2 == - n3 - 1 || n2 == n3 + 1)
{
if (n3 == 0x7f)
- return debug_make_int_type (dhandle, 1, false);
+ return debug_make_int_type (dhandle, 1, FALSE);
else if (n3 == 0x7fff)
- return debug_make_int_type (dhandle, 2, false);
+ return debug_make_int_type (dhandle, 2, FALSE);
else if (n3 == 0x7fffffff)
- return debug_make_int_type (dhandle, 4, false);
+ return debug_make_int_type (dhandle, 4, FALSE);
#ifdef BFD64
else if (n3 == ((((bfd_vma) 0x7fffffff) << 32) | 0xffffffff))
- return debug_make_int_type (dhandle, 8, false);
+ return debug_make_int_type (dhandle, 8, FALSE);
#endif
}
}
@@ -1849,7 +1858,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums)
/* Does this actually ever happen? Is that why we are worrying
about dealing with it rather than just calling error_type? */
warn_stab (orig, _("missing index type"));
- index_type = debug_make_int_type (dhandle, 4, false);
+ index_type = debug_make_int_type (dhandle, 4, FALSE);
}
return debug_make_range_type (dhandle, index_type, n2, n3);
@@ -1873,7 +1882,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
const char **pp;
{
const char *orig;
- boolean unsignedp;
+ bfd_boolean unsignedp;
bfd_vma bits;
orig = *pp;
@@ -1881,10 +1890,10 @@ parse_stab_sun_builtin_type (dhandle, pp)
switch (**pp)
{
case 's':
- unsignedp = false;
+ unsignedp = FALSE;
break;
case 'u':
- unsignedp = true;
+ unsignedp = TRUE;
break;
default:
bad_stab (orig);
@@ -1903,7 +1912,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
by this type, except that unsigned short is 4 instead of 2.
Since this information is redundant with the third number,
we will ignore it. */
- (void) parse_number (pp, (boolean *) NULL);
+ (void) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1912,7 +1921,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
++*pp;
/* The second number is always 0, so ignore it too. */
- (void) parse_number (pp, (boolean *) NULL);
+ (void) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1921,7 +1930,7 @@ parse_stab_sun_builtin_type (dhandle, pp)
++*pp;
/* The third number is the number of bits for this type. */
- bits = parse_number (pp, (boolean *) NULL);
+ bits = parse_number (pp, (bfd_boolean *) NULL);
/* The type *should* end with a semicolon. If it are embedded
in a larger type the semicolon may be the only way to know where
@@ -1953,7 +1962,7 @@ parse_stab_sun_floating_type (dhandle, pp)
/* The first number has more details about the type, for example
FN_COMPLEX. */
- details = parse_number (pp, (boolean *) NULL);
+ details = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -1961,7 +1970,7 @@ parse_stab_sun_floating_type (dhandle, pp)
}
/* The second number is the number of bytes occupied by this type */
- bytes = parse_number (pp, (boolean *) NULL);
+ bytes = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -2022,7 +2031,7 @@ parse_stab_enum_type (dhandle, pp)
name = savestring (*pp, p - *pp);
*pp = p + 1;
- val = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ val = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
@@ -2066,22 +2075,22 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
struct stab_handle *info;
const char *tagname;
const char **pp;
- boolean structp;
+ bfd_boolean structp;
const int *typenums;
{
const char *orig;
bfd_vma size;
debug_baseclass *baseclasses;
debug_field *fields;
- boolean statics;
+ bfd_boolean statics;
debug_method *methods;
debug_type vptrbase;
- boolean ownvptr;
+ bfd_boolean ownvptr;
orig = *pp;
/* Get the size. */
- size = parse_number (pp, (boolean *) NULL);
+ size = parse_number (pp, (bfd_boolean *) NULL);
/* Get the other information. */
if (! parse_stab_baseclasses (dhandle, info, pp, &baseclasses)
@@ -2124,9 +2133,9 @@ parse_stab_struct_type (dhandle, info, tagname, pp, structp, typenums)
Offset in bits from start of class ________________________| |
Type number of base class ____________________________________|
- Return true for success, false for failure. */
+ Return TRUE for success, FALSE for failure. */
-static boolean
+static bfd_boolean
parse_stab_baseclasses (dhandle, info, pp, retp)
PTR dhandle;
struct stab_handle *info;
@@ -2144,16 +2153,16 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
if (**pp != '!')
{
/* No base classes. */
- return true;
+ return TRUE;
}
++*pp;
- c = (unsigned int) parse_number (pp, (boolean *) NULL);
+ c = (unsigned int) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2161,7 +2170,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
for (i = 0; i < c; i++)
{
- boolean virtual;
+ bfd_boolean virtual;
enum debug_visibility visibility;
bfd_vma bitpos;
debug_type type;
@@ -2169,14 +2178,14 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
switch (**pp)
{
case '0':
- virtual = false;
+ virtual = FALSE;
break;
case '1':
- virtual = true;
+ virtual = TRUE;
break;
default:
warn_stab (orig, _("unknown virtual character for baseclass"));
- virtual = false;
+ virtual = FALSE;
break;
}
++*pp;
@@ -2202,26 +2211,26 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
/* The remaining value is the bit offset of the portion of the
object corresponding to this baseclass. Always zero in the
absence of multiple inheritance. */
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
classes[i] = debug_make_baseclass (dhandle, type, bitpos, virtual,
visibility);
if (classes[i] == DEBUG_BASECLASS_NULL)
- return false;
+ return FALSE;
if (**pp != ';')
- return false;
+ return FALSE;
++*pp;
}
@@ -2229,7 +2238,7 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
*retp = classes;
- return true;
+ return TRUE;
}
/* Read struct or class data fields. They have the form:
@@ -2252,13 +2261,13 @@ parse_stab_baseclasses (dhandle, info, pp, retp)
Returns 1 for success, 0 for failure. */
-static boolean
+static bfd_boolean
parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
PTR dhandle;
struct stab_handle *info;
const char **pp;
debug_field **retp;
- boolean *staticsp;
+ bfd_boolean *staticsp;
{
const char *orig;
const char *p;
@@ -2267,7 +2276,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
unsigned int alloc;
*retp = NULL;
- *staticsp = false;
+ *staticsp = FALSE;
orig = *pp;
@@ -2299,7 +2308,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
{
++*pp;
if (! parse_stab_cpp_abbrev (dhandle, info, pp, fields + c))
- return false;
+ return FALSE;
++c;
continue;
}
@@ -2313,7 +2322,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
if (p[1] == ':')
@@ -2321,7 +2330,7 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
if (! parse_stab_one_struct_field (dhandle, info, pp, p, fields + c,
staticsp))
- return false;
+ return FALSE;
++c;
}
@@ -2330,12 +2339,12 @@ parse_stab_struct_fields (dhandle, info, pp, retp, staticsp)
*retp = fields;
- return true;
+ return TRUE;
}
/* Special GNU C++ name. */
-static boolean
+static bfd_boolean
parse_stab_cpp_abbrev (dhandle, info, pp, retp)
PTR dhandle;
struct stab_handle *info;
@@ -2357,7 +2366,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != 'v')
{
bad_stab (*pp);
- return false;
+ return FALSE;
}
++*pp;
@@ -2372,7 +2381,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
context = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
switch (cpp_abbrev)
{
@@ -2399,7 +2408,7 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != ':')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2408,36 +2417,36 @@ parse_stab_cpp_abbrev (dhandle, info, pp, retp)
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
*retp = debug_make_field (dhandle, name, type, bitpos, 0,
DEBUG_VISIBILITY_PRIVATE);
if (*retp == DEBUG_FIELD_NULL)
- return false;
+ return FALSE;
- return true;
+ return TRUE;
}
/* Parse a single field in a struct or union. */
-static boolean
+static bfd_boolean
parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
PTR dhandle;
struct stab_handle *info;
const char **pp;
const char *p;
debug_field *retp;
- boolean *staticsp;
+ bfd_boolean *staticsp;
{
const char *orig;
char *name;
@@ -2481,7 +2490,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (**pp == ':')
{
@@ -2493,7 +2502,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
varname = savestring (*pp, p - *pp);
@@ -2502,31 +2511,31 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
*retp = debug_make_static_member (dhandle, name, type, varname,
visibility);
- *staticsp = true;
+ *staticsp = TRUE;
- return true;
+ return TRUE;
}
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitpos = parse_number (pp, (boolean *) NULL);
+ bitpos = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ',')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
- bitsize = parse_number (pp, (boolean *) NULL);
+ bitsize = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
@@ -2552,7 +2561,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
*retp = debug_make_field (dhandle, name, type, bitpos, bitsize, visibility);
- return true;
+ return TRUE;
}
/* Read member function stabs info for C++ classes. The form of each member
@@ -2568,7 +2577,7 @@ parse_stab_one_struct_field (dhandle, info, pp, p, retp, staticsp)
$ is the CPLUS_MARKER (usually '$'), `*' holds the place for an operator
name (such as `+=') and `.' marks the end of the operator name. */
-static boolean
+static bfd_boolean
parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
PTR dhandle;
struct stab_handle *info;
@@ -2623,7 +2632,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (*p != '.')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
name = savestring (*pp, p - *pp);
*pp = p + 1;
@@ -2639,14 +2648,14 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
do
{
debug_type type;
- boolean stub;
+ bfd_boolean stub;
char *argtypes;
enum debug_visibility visibility;
- boolean constp, volatilep, staticp;
+ bfd_boolean constp, volatilep, staticp;
bfd_vma voffset;
debug_type context;
const char *physname;
- boolean varargs;
+ bfd_boolean varargs;
if (look_ahead_type != DEBUG_TYPE_NULL)
{
@@ -2659,11 +2668,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
type = parse_stab_type (dhandle, info, (const char *) NULL, pp,
(debug_type **) NULL);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (**pp != ':')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
}
@@ -2672,13 +2681,13 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (p == NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
- stub = false;
+ stub = FALSE;
if (debug_get_type_kind (dhandle, type) == DEBUG_KIND_METHOD
&& debug_get_parameter_types (dhandle, type, &varargs) == NULL)
- stub = true;
+ stub = TRUE;
argtypes = savestring (*pp, p - *pp);
*pp = p + 1;
@@ -2697,8 +2706,8 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
}
++*pp;
- constp = false;
- volatilep = false;
+ constp = FALSE;
+ volatilep = FALSE;
switch (**pp)
{
case 'A':
@@ -2707,18 +2716,18 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
break;
case 'B':
/* const member function. */
- constp = true;
+ constp = TRUE;
++*pp;
break;
case 'C':
/* volatile member function. */
- volatilep = true;
+ volatilep = TRUE;
++*pp;
break;
case 'D':
/* const volatile member function. */
- constp = true;
- volatilep = true;
+ constp = TRUE;
+ volatilep = TRUE;
++*pp;
break;
case '*':
@@ -2731,7 +2740,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
break;
}
- staticp = false;
+ staticp = FALSE;
switch (**pp)
{
case '*':
@@ -2739,11 +2748,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
bit is supposedly set to distinguish
pointers-to-methods from virtual function indicies. */
++*pp;
- voffset = parse_number (pp, (boolean *) NULL);
+ voffset = parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
voffset &= 0x7fffffff;
@@ -2774,7 +2783,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
if (**pp != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
++*pp;
}
@@ -2784,11 +2793,11 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
case '?':
/* static member function. */
++*pp;
- staticp = true;
+ staticp = TRUE;
voffset = 0;
context = DEBUG_TYPE_NULL;
if (strncmp (argtypes, name, strlen (name)) != 0)
- stub = true;
+ stub = TRUE;
break;
default:
@@ -2817,18 +2826,18 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
class_type = stab_find_type (dhandle, info, typenums);
if (class_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
return_type = debug_get_return_type (dhandle, type);
if (return_type == DEBUG_TYPE_NULL)
{
bad_stab (orig);
- return false;
+ return FALSE;
}
type = parse_stab_argtypes (dhandle, info, class_type, name,
tagname, return_type, argtypes,
constp, volatilep, &physname);
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
if (cvars + 1 >= allocvars)
@@ -2852,7 +2861,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
constp,
volatilep);
if (variants[cvars] == DEBUG_METHOD_VARIANT_NULL)
- return false;
+ return FALSE;
++cvars;
}
@@ -2880,7 +2889,7 @@ parse_stab_members (dhandle, info, tagname, pp, typenums, retp)
*retp = methods;
- return true;
+ return TRUE;
}
/* Parse a string representing argument types for a method. Stabs
@@ -2899,15 +2908,15 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
const char *tagname;
debug_type return_type;
const char *argtypes;
- boolean constp;
- boolean volatilep;
+ bfd_boolean constp;
+ bfd_boolean volatilep;
const char **pphysname;
{
- boolean is_full_physname_constructor;
- boolean is_constructor;
- boolean is_destructor;
+ bfd_boolean is_full_physname_constructor;
+ bfd_boolean is_constructor;
+ bfd_boolean is_destructor;
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
unsigned int physname_len = 0;
/* Constructors are sometimes handled specially. */
@@ -2999,7 +3008,7 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
args = (debug_type *) xmalloc (sizeof *args);
*args = NULL;
return debug_make_method_type (dhandle, return_type, class_type, args,
- false);
+ FALSE);
}
args = stab_demangle_argtypes (dhandle, info, *pphysname, &varargs, physname_len);
@@ -3018,21 +3027,21 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
This function is called when we have parsed all the method declarations,
so we can look for the vptr base class info. */
-static boolean
+static bfd_boolean
parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
PTR dhandle;
struct stab_handle *info;
const char **pp;
const int *typenums;
debug_type *retvptrbase;
- boolean *retownvptr;
+ bfd_boolean *retownvptr;
{
const char *orig;
const char *hold;
int vtypenums[2];
*retvptrbase = DEBUG_TYPE_NULL;
- *retownvptr = false;
+ *retownvptr = FALSE;
orig = *pp;
@@ -3041,7 +3050,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
++*pp;
if (**pp != '~')
- return true;
+ return TRUE;
++*pp;
@@ -3053,7 +3062,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
}
if (**pp != '%')
- return true;
+ return TRUE;
++*pp;
@@ -3062,11 +3071,11 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
/* The next number is the type number of the base class (possibly
our own class) which supplies the vtable for this class. */
if (! parse_stab_type_number (pp, vtypenums))
- return false;
+ return FALSE;
if (vtypenums[0] == typenums[0]
&& vtypenums[1] == typenums[1])
- *retownvptr = true;
+ *retownvptr = TRUE;
else
{
debug_type vtype;
@@ -3081,7 +3090,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
if (*p != ';')
{
bad_stab (orig);
- return false;
+ return FALSE;
}
*retvptrbase = vtype;
@@ -3089,7 +3098,7 @@ parse_stab_tilde_field (dhandle, info, pp, typenums, retvptrbase, retownvptr)
*pp = p + 1;
}
- return true;
+ return TRUE;
}
/* Read a definition of an array type. */
@@ -3099,13 +3108,13 @@ parse_stab_array_type (dhandle, info, pp, stringp)
PTR dhandle;
struct stab_handle *info;
const char **pp;
- boolean stringp;
+ bfd_boolean stringp;
{
const char *orig;
const char *p;
int typenums[2];
debug_type index_type;
- boolean adjustable;
+ bfd_boolean adjustable;
bfd_signed_vma lower, upper;
debug_type element_type;
@@ -3129,7 +3138,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
index_type = debug_find_named_type (dhandle, "int");
if (index_type == DEBUG_TYPE_NULL)
{
- index_type = debug_make_int_type (dhandle, 4, false);
+ index_type = debug_make_int_type (dhandle, 4, FALSE);
if (index_type == DEBUG_TYPE_NULL)
return DEBUG_TYPE_NULL;
}
@@ -3148,15 +3157,15 @@ parse_stab_array_type (dhandle, info, pp, stringp)
}
++*pp;
- adjustable = false;
+ adjustable = FALSE;
if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
- adjustable = true;
+ adjustable = TRUE;
}
- lower = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ lower = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -3167,10 +3176,10 @@ parse_stab_array_type (dhandle, info, pp, stringp)
if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
- adjustable = true;
+ adjustable = TRUE;
}
- upper = (bfd_signed_vma) parse_number (pp, (boolean *) NULL);
+ upper = (bfd_signed_vma) parse_number (pp, (bfd_boolean *) NULL);
if (**pp != ';')
{
bad_stab (orig);
@@ -3263,7 +3272,7 @@ pop_bincl (info)
/* Handle an N_EXCL: get the types from the corresponding N_BINCL. */
-static boolean
+static bfd_boolean
find_excl (info, name, hash)
struct stab_handle *info;
const char *name;
@@ -3284,12 +3293,12 @@ find_excl (info, name, hash)
{
warn_stab (name, _("Undefined N_EXCL"));
info->file_types[info->files - 1] = NULL;
- return true;
+ return TRUE;
}
info->file_types[info->files - 1] = l->file_types;
- return true;
+ return TRUE;
}
/* Handle a variable definition. gcc emits variable definitions for a
@@ -3297,7 +3306,7 @@ find_excl (info, name, hash)
it. The SunPRO compiler emits variable definitions after the
N_LBRAC, so we can call debug_record_variable immediately. */
-static boolean
+static bfd_boolean
stab_record_variable (dhandle, info, name, type, kind, val)
PTR dhandle;
struct stab_handle *info;
@@ -3323,13 +3332,13 @@ stab_record_variable (dhandle, info, name, type, kind, val)
v->val = val;
info->pending = v;
- return true;
+ return TRUE;
}
/* Emit pending variable definitions. This is called after we see the
N_LBRAC that starts the block. */
-static boolean
+static bfd_boolean
stab_emit_pending_vars (dhandle, info)
PTR dhandle;
struct stab_handle *info;
@@ -3342,7 +3351,7 @@ stab_emit_pending_vars (dhandle, info)
struct stab_pending_var *next;
if (! debug_record_variable (dhandle, v->name, v->type, v->kind, v->val))
- return false;
+ return FALSE;
next = v->next;
free (v);
@@ -3351,7 +3360,7 @@ stab_emit_pending_vars (dhandle, info)
info->pending = NULL;
- return true;
+ return TRUE;
}
/* Find the slot for a type in the database. */
@@ -3429,7 +3438,7 @@ stab_find_type (dhandle, info, typenums)
/* Record that a given type number refers to a given type. */
-static boolean
+static bfd_boolean
stab_record_type (dhandle, info, typenums, type)
PTR dhandle ATTRIBUTE_UNUSED;
struct stab_handle *info;
@@ -3440,13 +3449,13 @@ stab_record_type (dhandle, info, typenums, type)
slot = stab_find_slot (info, typenums);
if (slot == NULL)
- return false;
+ return FALSE;
/* gdb appears to ignore type redefinitions, so we do as well. */
*slot = type;
- return true;
+ return TRUE;
}
/* Return an XCOFF builtin type. */
@@ -3474,42 +3483,42 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
/* The size of this and all the other types are fixed, defined
by the debugging format. */
name = "int";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 2:
name = "char";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 3:
name = "short";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 4:
name = "long";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 5:
name = "unsigned char";
- rettype = debug_make_int_type (dhandle, 1, true);
+ rettype = debug_make_int_type (dhandle, 1, TRUE);
break;
case 6:
name = "signed char";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 7:
name = "unsigned short";
- rettype = debug_make_int_type (dhandle, 2, true);
+ rettype = debug_make_int_type (dhandle, 2, TRUE);
break;
case 8:
name = "unsigned int";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
break;
case 9:
name = "unsigned";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
case 10:
name = "unsigned long";
- rettype = debug_make_int_type (dhandle, 4, true);
+ rettype = debug_make_int_type (dhandle, 4, TRUE);
break;
case 11:
name = "void";
@@ -3534,7 +3543,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 15:
name = "integer";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 16:
name = "boolean";
@@ -3556,7 +3565,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
case 20:
/* FIXME */
name = "character";
- rettype = debug_make_int_type (dhandle, 1, true);
+ rettype = debug_make_int_type (dhandle, 1, TRUE);
break;
case 21:
name = "logical*1";
@@ -3586,28 +3595,28 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 27:
name = "integer*1";
- rettype = debug_make_int_type (dhandle, 1, false);
+ rettype = debug_make_int_type (dhandle, 1, FALSE);
break;
case 28:
name = "integer*2";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 29:
name = "integer*4";
- rettype = debug_make_int_type (dhandle, 4, false);
+ rettype = debug_make_int_type (dhandle, 4, FALSE);
break;
case 30:
/* FIXME */
name = "wchar";
- rettype = debug_make_int_type (dhandle, 2, false);
+ rettype = debug_make_int_type (dhandle, 2, FALSE);
break;
case 31:
name = "long long";
- rettype = debug_make_int_type (dhandle, 8, false);
+ rettype = debug_make_int_type (dhandle, 8, FALSE);
break;
case 32:
name = "unsigned long long";
- rettype = debug_make_int_type (dhandle, 8, true);
+ rettype = debug_make_int_type (dhandle, 8, TRUE);
break;
case 33:
name = "logical*8";
@@ -3615,7 +3624,7 @@ stab_xcoff_builtin_type (dhandle, info, typenum)
break;
case 34:
name = "integer*8";
- rettype = debug_make_int_type (dhandle, 8, false);
+ rettype = debug_make_int_type (dhandle, 8, FALSE);
break;
default:
abort ();
@@ -3717,7 +3726,7 @@ struct stab_demangle_info
/* The array of arguments we are building. */
debug_type *args;
/* Whether the method takes a variable number of arguments. */
- boolean varargs;
+ bfd_boolean varargs;
/* The array of types we have remembered. */
struct stab_demangle_typestring *typestrings;
/* The number of typestrings. */
@@ -3726,33 +3735,35 @@ struct stab_demangle_info
unsigned int typestring_alloc;
};
-static void stab_bad_demangle PARAMS ((const char *));
-static unsigned int stab_demangle_count PARAMS ((const char **));
-static boolean stab_demangle_get_count
+static void stab_bad_demangle
+ PARAMS ((const char *));
+static unsigned int stab_demangle_count
+ PARAMS ((const char **));
+static bfd_boolean stab_demangle_get_count
PARAMS ((const char **, unsigned int *));
-static boolean stab_demangle_prefix
+static bfd_boolean stab_demangle_prefix
PARAMS ((struct stab_demangle_info *, const char **, unsigned int));
-static boolean stab_demangle_function_name
+static bfd_boolean stab_demangle_function_name
PARAMS ((struct stab_demangle_info *, const char **, const char *));
-static boolean stab_demangle_signature
+static bfd_boolean stab_demangle_signature
PARAMS ((struct stab_demangle_info *, const char **));
-static boolean stab_demangle_qualified
+static bfd_boolean stab_demangle_qualified
PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_template
+static bfd_boolean stab_demangle_template
PARAMS ((struct stab_demangle_info *, const char **, char **));
-static boolean stab_demangle_class
+static bfd_boolean stab_demangle_class
PARAMS ((struct stab_demangle_info *, const char **, const char **));
-static boolean stab_demangle_args
+static bfd_boolean stab_demangle_args
PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
- boolean *));
-static boolean stab_demangle_arg
+ bfd_boolean *));
+static bfd_boolean stab_demangle_arg
PARAMS ((struct stab_demangle_info *, const char **, debug_type **,
unsigned int *, unsigned int *));
-static boolean stab_demangle_type
+static bfd_boolean stab_demangle_type
PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_fund_type
+static bfd_boolean stab_demangle_fund_type
PARAMS ((struct stab_demangle_info *, const char **, debug_type *));
-static boolean stab_demangle_remember_type
+static bfd_boolean stab_demangle_remember_type
PARAMS ((struct stab_demangle_info *, const char *, int));
/* Warn about a bad demangling. */
@@ -3785,13 +3796,13 @@ stab_demangle_count (pp)
/* Require a count in a string. The count may be multiple digits, in
which case it must end in an underscore. */
-static boolean
+static bfd_boolean
stab_demangle_get_count (pp, pi)
const char **pp;
unsigned int *pi;
{
if (! ISDIGIT (**pp))
- return false;
+ return FALSE;
*pi = **pp - '0';
++*pp;
@@ -3816,7 +3827,7 @@ stab_demangle_get_count (pp, pi)
}
}
- return true;
+ return TRUE;
}
/* This function demangles a physical name, returning a NULL
@@ -3827,7 +3838,7 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs, physname_len)
PTR dhandle;
struct stab_handle *info;
const char *physname;
- boolean *pvarargs;
+ bfd_boolean *pvarargs;
unsigned int physname_len;
{
struct stab_demangle_info minfo;
@@ -3835,7 +3846,7 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs, physname_len)
minfo.dhandle = dhandle;
minfo.info = info;
minfo.args = NULL;
- minfo.varargs = false;
+ minfo.varargs = FALSE;
minfo.typestring_alloc = 10;
minfo.typestrings = ((struct stab_demangle_typestring *)
xmalloc (minfo.typestring_alloc
@@ -3871,7 +3882,7 @@ stab_demangle_argtypes (dhandle, info, physname, pvarargs, physname_len)
/* Demangle the prefix of the mangled name. */
-static boolean
+static bfd_boolean
stab_demangle_prefix (minfo, pp, physname_len)
struct stab_demangle_info *minfo;
const char **pp;
@@ -3896,7 +3907,7 @@ stab_demangle_prefix (minfo, pp, physname_len)
if (scan == NULL)
{
stab_bad_demangle (*pp);
- return false;
+ return FALSE;
}
--scan;
@@ -3914,7 +3925,7 @@ stab_demangle_prefix (minfo, pp, physname_len)
{
/* This is a GNU style constructor name. */
*pp = scan + 2;
- return true;
+ return TRUE;
}
else if (scan == *pp
&& ! ISDIGIT (scan[2])
@@ -3928,7 +3939,7 @@ stab_demangle_prefix (minfo, pp, physname_len)
if (scan == NULL || scan[2] == '\0')
{
stab_bad_demangle (*pp);
- return false;
+ return FALSE;
}
return stab_demangle_function_name (minfo, pp, scan);
@@ -3941,7 +3952,7 @@ stab_demangle_prefix (minfo, pp, physname_len)
else
{
stab_bad_demangle (*pp);
- return false;
+ return FALSE;
}
/*NOTREACHED*/
}
@@ -3950,7 +3961,7 @@ stab_demangle_prefix (minfo, pp, physname_len)
double underscore which separates the function name from the
signature. */
-static boolean
+static bfd_boolean
stab_demangle_function_name (minfo, pp, scan)
struct stab_demangle_info *minfo;
const char **pp;
@@ -3975,7 +3986,7 @@ stab_demangle_function_name (minfo, pp, scan)
/* This is a type conversion operator. */
tem = name + 5;
if (! stab_demangle_type (minfo, &tem, (debug_type *) NULL))
- return false;
+ return FALSE;
}
else if (name[0] == '_'
&& name[1] == '_'
@@ -3987,28 +3998,28 @@ stab_demangle_function_name (minfo, pp, scan)
/* This is a type conversion operator. */
tem = name + 4;
if (! stab_demangle_type (minfo, &tem, (debug_type *) NULL))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Demangle the signature. This is where the argument types are
found. */
-static boolean
+static bfd_boolean
stab_demangle_signature (minfo, pp)
struct stab_demangle_info *minfo;
const char **pp;
{
const char *orig;
- boolean expect_func, func_done;
+ bfd_boolean expect_func, func_done;
const char *hold;
orig = *pp;
- expect_func = false;
- func_done = false;
+ expect_func = FALSE;
+ func_done = FALSE;
hold = NULL;
while (**pp != '\0')
@@ -4019,8 +4030,8 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_qualified (minfo, pp, (debug_type *) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
- expect_func = true;
+ return FALSE;
+ expect_func = TRUE;
hold = NULL;
break;
@@ -4044,8 +4055,8 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_class (minfo, pp, (const char **) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
- expect_func = true;
+ return FALSE;
+ expect_func = TRUE;
hold = NULL;
break;
@@ -4053,10 +4064,10 @@ stab_demangle_signature (minfo, pp)
/* Function. I don't know if this actually happens with g++
output. */
hold = NULL;
- func_done = true;
+ func_done = TRUE;
++*pp;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
break;
case 't':
@@ -4065,9 +4076,9 @@ stab_demangle_signature (minfo, pp)
hold = *pp;
if (! stab_demangle_template (minfo, pp, (char **) NULL)
|| ! stab_demangle_remember_type (minfo, hold, *pp - hold))
- return false;
+ return FALSE;
hold = NULL;
- expect_func = true;
+ expect_func = TRUE;
break;
case '_':
@@ -4077,22 +4088,22 @@ stab_demangle_signature (minfo, pp)
has been mangled by some algorithm we don't know how to
deal with. So just reject the entire demangling. */
stab_bad_demangle (orig);
- return false;
+ return FALSE;
default:
/* Assume we have stumbled onto the first outermost function
argument token, and start processing args. */
- func_done = true;
+ func_done = TRUE;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
break;
}
if (expect_func)
{
- func_done = true;
+ func_done = TRUE;
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
}
}
@@ -4103,16 +4114,16 @@ stab_demangle_signature (minfo, pp)
first case, and need to ensure that the '(void)' gets added
to the current declp. */
if (! stab_demangle_args (minfo, pp, &minfo->args, &minfo->varargs))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/* Demangle a qualified name, such as "Q25Outer5Inner" which is the
mangled form of "Outer::Inner". */
-static boolean
+static bfd_boolean
stab_demangle_qualified (minfo, pp, ptype)
struct stab_demangle_info *minfo;
const char **pp;
@@ -4135,7 +4146,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (! ISDIGIT (*p) || *p == '0')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
qualifiers = atoi (p);
while (ISDIGIT (*p))
@@ -4143,7 +4154,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (*p != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp = p + 1;
break;
@@ -4160,7 +4171,7 @@ stab_demangle_qualified (minfo, pp, ptype)
case '0':
default:
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
context = DEBUG_TYPE_NULL;
@@ -4176,7 +4187,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (! stab_demangle_template (minfo, pp,
ptype != NULL ? &name : NULL))
- return false;
+ return FALSE;
if (ptype != NULL)
{
@@ -4185,7 +4196,7 @@ stab_demangle_qualified (minfo, pp, ptype)
DEBUG_KIND_CLASS);
free (name);
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
else
@@ -4196,7 +4207,7 @@ stab_demangle_qualified (minfo, pp, ptype)
if (strlen (*pp) < len)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (ptype != NULL)
@@ -4230,7 +4241,7 @@ stab_demangle_qualified (minfo, pp, ptype)
ft = debug_get_field_type (minfo->dhandle, *fields);
if (ft == NULL)
- return false;
+ return FALSE;
dn = debug_get_type_name (minfo->dhandle, ft);
if (dn != NULL && strcmp (dn, name) == 0)
{
@@ -4267,7 +4278,7 @@ stab_demangle_qualified (minfo, pp, ptype)
? DEBUG_KIND_ILLEGAL
: DEBUG_KIND_CLASS));
if (context == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
}
@@ -4279,13 +4290,13 @@ stab_demangle_qualified (minfo, pp, ptype)
if (ptype != NULL)
*ptype = context;
- return true;
+ return TRUE;
}
/* Demangle a template. If PNAME is not NULL, this sets *PNAME to a
string representation of the template. */
-static boolean
+static bfd_boolean
stab_demangle_template (minfo, pp, pname)
struct stab_demangle_info *minfo;
const char **pp;
@@ -4303,7 +4314,7 @@ stab_demangle_template (minfo, pp, pname)
if (r == 0 || strlen (*pp) < r)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp += r;
@@ -4311,7 +4322,7 @@ stab_demangle_template (minfo, pp, pname)
if (stab_demangle_get_count (pp, &r) == 0)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
for (i = 0; i < r; i++)
@@ -4321,26 +4332,26 @@ stab_demangle_template (minfo, pp, pname)
/* This is a type parameter. */
++*pp;
if (! stab_demangle_type (minfo, pp, (debug_type *) NULL))
- return false;
+ return FALSE;
}
else
{
const char *old_p;
- boolean pointerp, realp, integralp, charp, boolp;
- boolean done;
+ bfd_boolean pointerp, realp, integralp, charp, boolp;
+ bfd_boolean done;
old_p = *pp;
- pointerp = false;
- realp = false;
- integralp = false;
- charp = false;
- boolp = false;
- done = false;
+ pointerp = FALSE;
+ realp = FALSE;
+ integralp = FALSE;
+ charp = FALSE;
+ boolp = FALSE;
+ done = FALSE;
/* This is a value parameter. */
if (! stab_demangle_type (minfo, pp, (debug_type *) NULL))
- return false;
+ return FALSE;
while (*old_p != '\0' && ! done)
{
@@ -4349,8 +4360,8 @@ stab_demangle_template (minfo, pp, pname)
case 'P':
case 'p':
case 'R':
- pointerp = true;
- done = true;
+ pointerp = TRUE;
+ done = TRUE;
break;
case 'C': /* Const. */
case 'S': /* Signed. */
@@ -4362,8 +4373,8 @@ stab_demangle_template (minfo, pp, pname)
++old_p;
break;
case 'Q': /* Qualified name. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
case 'T': /* Remembered type. */
abort ();
@@ -4374,27 +4385,27 @@ stab_demangle_template (minfo, pp, pname)
case 'i': /* Int. */
case 's': /* Short. */
case 'w': /* Wchar_t. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
case 'b': /* Bool. */
- boolp = true;
- done = true;
+ boolp = TRUE;
+ done = TRUE;
break;
case 'c': /* Char. */
- charp = true;
- done = true;
+ charp = TRUE;
+ done = TRUE;
break;
case 'r': /* Long double. */
case 'd': /* Double. */
case 'f': /* Float. */
- realp = true;
- done = true;
+ realp = TRUE;
+ done = TRUE;
break;
default:
/* Assume it's a user defined integral type. */
- integralp = true;
- done = true;
+ integralp = TRUE;
+ done = TRUE;
break;
}
}
@@ -4416,7 +4427,7 @@ stab_demangle_template (minfo, pp, pname)
if (val == 0)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
else if (boolp)
@@ -4427,7 +4438,7 @@ stab_demangle_template (minfo, pp, pname)
if (val != 0 && val != 1)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
else if (realp)
@@ -4456,7 +4467,7 @@ stab_demangle_template (minfo, pp, pname)
if (! stab_demangle_get_count (pp, &len))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
*pp += len;
}
@@ -4487,7 +4498,7 @@ stab_demangle_template (minfo, pp, pname)
stab_bad_demangle (orig);
if (s3 != NULL)
free (s3);
- return false;
+ return FALSE;
}
/* Eliminating all spaces, except those between > characters,
@@ -4503,12 +4514,12 @@ stab_demangle_template (minfo, pp, pname)
free (s3);
}
- return true;
+ return TRUE;
}
/* Demangle a class name. */
-static boolean
+static bfd_boolean
stab_demangle_class (minfo, pp, pstart)
struct stab_demangle_info *minfo ATTRIBUTE_UNUSED;
const char **pp;
@@ -4523,7 +4534,7 @@ stab_demangle_class (minfo, pp, pstart)
if (strlen (*pp) < n)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (pstart != NULL)
@@ -4531,18 +4542,18 @@ stab_demangle_class (minfo, pp, pstart)
*pp += n;
- return true;
+ return TRUE;
}
/* Demangle function arguments. If the pargs argument is not NULL, it
is set to a NULL terminated array holding the arguments. */
-static boolean
+static bfd_boolean
stab_demangle_args (minfo, pp, pargs, pvarargs)
struct stab_demangle_info *minfo;
const char **pp;
debug_type **pargs;
- boolean *pvarargs;
+ bfd_boolean *pvarargs;
{
const char *orig;
unsigned int alloc, count;
@@ -4553,7 +4564,7 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (pargs != NULL)
{
*pargs = (debug_type *) xmalloc (alloc * sizeof **pargs);
- *pvarargs = false;
+ *pvarargs = FALSE;
}
count = 0;
@@ -4574,20 +4585,20 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (! stab_demangle_get_count (pp, &r))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
}
if (! stab_demangle_get_count (pp, &t))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (t >= minfo->typestring_count)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
while (r-- > 0)
{
@@ -4595,13 +4606,13 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
tem = minfo->typestrings[t].typestring;
if (! stab_demangle_arg (minfo, &tem, pargs, &count, &alloc))
- return false;
+ return FALSE;
}
}
else
{
if (! stab_demangle_arg (minfo, pp, pargs, &count, &alloc))
- return false;
+ return FALSE;
}
}
@@ -4611,16 +4622,16 @@ stab_demangle_args (minfo, pp, pargs, pvarargs)
if (**pp == 'e')
{
if (pargs != NULL)
- *pvarargs = true;
+ *pvarargs = TRUE;
++*pp;
}
- return true;
+ return TRUE;
}
/* Demangle a single argument. */
-static boolean
+static bfd_boolean
stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
struct stab_demangle_info *minfo;
const char **pp;
@@ -4635,12 +4646,12 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
if (! stab_demangle_type (minfo, pp,
pargs == NULL ? (debug_type *) NULL : &type)
|| ! stab_demangle_remember_type (minfo, start, *pp - start))
- return false;
+ return FALSE;
if (pargs != NULL)
{
if (type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
if (*pcount + 1 >= *palloc)
{
@@ -4652,13 +4663,13 @@ stab_demangle_arg (minfo, pp, pargs, pcount, palloc)
++*pcount;
}
- return true;
+ return TRUE;
}
/* Demangle a type. If the ptype argument is not NULL, *ptype is set
to the newly allocated type. */
-static boolean
+static bfd_boolean
stab_demangle_type (minfo, pp, ptype)
struct stab_demangle_info *minfo;
const char **pp;
@@ -4675,7 +4686,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A pointer type. */
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_pointer_type (minfo->dhandle, *ptype);
break;
@@ -4684,7 +4695,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A reference type. */
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_reference_type (minfo->dhandle, *ptype);
break;
@@ -4701,7 +4712,7 @@ stab_demangle_type (minfo, pp, ptype)
if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
high *= 10;
high += **pp - '0';
@@ -4710,21 +4721,21 @@ stab_demangle_type (minfo, pp, ptype)
if (**pp != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
{
debug_type int_type;
int_type = debug_find_named_type (minfo->dhandle, "int");
if (int_type == NULL)
- int_type = debug_make_int_type (minfo->dhandle, 4, false);
+ int_type = debug_make_int_type (minfo->dhandle, 4, FALSE);
*ptype = debug_make_array_type (minfo->dhandle, *ptype, int_type,
- 0, high, false);
+ 0, high, FALSE);
}
}
break;
@@ -4739,16 +4750,16 @@ stab_demangle_type (minfo, pp, ptype)
if (! stab_demangle_get_count (pp, &i))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (i >= minfo->typestring_count)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
p = minfo->typestrings[i].typestring;
if (! stab_demangle_type (minfo, &p, ptype))
- return false;
+ return FALSE;
}
break;
@@ -4756,7 +4767,7 @@ stab_demangle_type (minfo, pp, ptype)
/* A function. */
{
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
++*pp;
if (! stab_demangle_args (minfo, pp,
@@ -4764,20 +4775,20 @@ stab_demangle_type (minfo, pp, ptype)
? (debug_type **) NULL
: &args),
(ptype == NULL
- ? (boolean *) NULL
+ ? (bfd_boolean *) NULL
: &varargs)))
- return false;
+ return FALSE;
if (**pp != '_')
{
/* cplus_demangle will accept a function without a return
type, but I don't know when that will happen, or what
to do if it does. */
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_function_type (minfo->dhandle, *ptype, args,
varargs);
@@ -4788,18 +4799,18 @@ stab_demangle_type (minfo, pp, ptype)
case 'M':
case 'O':
{
- boolean memberp, constp, volatilep;
+ bfd_boolean memberp, constp, volatilep;
debug_type class_type = DEBUG_TYPE_NULL;
debug_type *args;
- boolean varargs;
+ bfd_boolean varargs;
unsigned int n;
const char *name;
memberp = **pp == 'M';
- constp = false;
- volatilep = false;
+ constp = FALSE;
+ volatilep = FALSE;
args = NULL;
- varargs = false;
+ varargs = FALSE;
++*pp;
if (ISDIGIT (**pp))
@@ -4808,7 +4819,7 @@ stab_demangle_type (minfo, pp, ptype)
if (strlen (*pp) < n)
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
name = *pp;
*pp += n;
@@ -4820,7 +4831,7 @@ stab_demangle_type (minfo, pp, ptype)
name, (int) n,
DEBUG_KIND_CLASS);
if (class_type == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
else if (**pp == 'Q')
@@ -4829,30 +4840,30 @@ stab_demangle_type (minfo, pp, ptype)
(ptype == NULL
? (debug_type *) NULL
: &class_type)))
- return false;
+ return FALSE;
}
else
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (memberp)
{
if (**pp == 'C')
{
- constp = true;
+ constp = TRUE;
++*pp;
}
else if (**pp == 'V')
{
- volatilep = true;
+ volatilep = TRUE;
++*pp;
}
if (**pp != 'F')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_args (minfo, pp,
@@ -4860,20 +4871,20 @@ stab_demangle_type (minfo, pp, ptype)
? (debug_type **) NULL
: &args),
(ptype == NULL
- ? (boolean *) NULL
+ ? (bfd_boolean *) NULL
: &varargs)))
- return false;
+ return FALSE;
}
if (**pp != '_')
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
{
@@ -4894,13 +4905,13 @@ stab_demangle_type (minfo, pp, ptype)
case 'G':
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
break;
case 'C':
++*pp;
if (! stab_demangle_type (minfo, pp, ptype))
- return false;
+ return FALSE;
if (ptype != NULL)
*ptype = debug_make_const_type (minfo->dhandle, *ptype);
break;
@@ -4911,66 +4922,66 @@ stab_demangle_type (minfo, pp, ptype)
hold = *pp;
if (! stab_demangle_qualified (minfo, pp, ptype))
- return false;
+ return FALSE;
}
break;
default:
if (! stab_demangle_fund_type (minfo, pp, ptype))
- return false;
+ return FALSE;
break;
}
- return true;
+ return TRUE;
}
/* Demangle a fundamental type. If the ptype argument is not NULL,
*ptype is set to the newly allocated type. */
-static boolean
+static bfd_boolean
stab_demangle_fund_type (minfo, pp, ptype)
struct stab_demangle_info *minfo;
const char **pp;
debug_type *ptype;
{
const char *orig;
- boolean constp, volatilep, unsignedp, signedp;
- boolean done;
+ bfd_boolean constp, volatilep, unsignedp, signedp;
+ bfd_boolean done;
orig = *pp;
- constp = false;
- volatilep = false;
- unsignedp = false;
- signedp = false;
+ constp = FALSE;
+ volatilep = FALSE;
+ unsignedp = FALSE;
+ signedp = FALSE;
- done = false;
+ done = FALSE;
while (! done)
{
switch (**pp)
{
case 'C':
- constp = true;
+ constp = TRUE;
++*pp;
break;
case 'U':
- unsignedp = true;
+ unsignedp = TRUE;
++*pp;
break;
case 'S':
- signedp = true;
+ signedp = TRUE;
++*pp;
break;
case 'V':
- volatilep = true;
+ volatilep = TRUE;
++*pp;
break;
default:
- done = true;
+ done = TRUE;
break;
}
}
@@ -5075,7 +5086,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
{
*ptype = debug_find_named_type (minfo->dhandle, "__wchar_t");
if (*ptype == DEBUG_TYPE_NULL)
- *ptype = debug_make_int_type (minfo->dhandle, 2, true);
+ *ptype = debug_make_int_type (minfo->dhandle, 2, TRUE);
}
++*pp;
break;
@@ -5115,7 +5126,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
/* Fall through. */
case '0': case '1': case '2': case '3': case '4':
@@ -5124,7 +5135,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
const char *hold;
if (! stab_demangle_class (minfo, pp, &hold))
- return false;
+ return FALSE;
if (ptype != NULL)
{
char *name;
@@ -5140,7 +5151,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
hold, *pp - hold,
DEBUG_KIND_ILLEGAL);
if (*ptype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
}
@@ -5152,7 +5163,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
if (! stab_demangle_template (minfo, pp,
ptype != NULL ? &name : NULL))
- return false;
+ return FALSE;
if (ptype != NULL)
{
*ptype = stab_find_tagged_type (minfo->dhandle, minfo->info,
@@ -5160,14 +5171,14 @@ stab_demangle_fund_type (minfo, pp, ptype)
DEBUG_KIND_CLASS);
free (name);
if (*ptype == DEBUG_TYPE_NULL)
- return false;
+ return FALSE;
}
}
break;
default:
stab_bad_demangle (orig);
- return false;
+ return FALSE;
}
if (ptype != NULL)
@@ -5178,12 +5189,12 @@ stab_demangle_fund_type (minfo, pp, ptype)
*ptype = debug_make_volatile_type (minfo->dhandle, *ptype);
}
- return true;
+ return TRUE;
}
/* Remember a type string in a demangled string. */
-static boolean
+static bfd_boolean
stab_demangle_remember_type (minfo, p, len)
struct stab_demangle_info *minfo;
const char *p;
@@ -5202,5 +5213,5 @@ stab_demangle_remember_type (minfo, p, len)
minfo->typestrings[minfo->typestring_count].len = (unsigned int) len;
++minfo->typestring_count;
- return true;
+ return TRUE;
}
diff --git a/binutils/strings.c b/binutils/strings.c
index dade244..f1222e0 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -107,17 +107,17 @@ static int address_radix;
/* Minimum length of sequence of graphic chars to trigger output. */
static int string_min;
-/* true means print address within file for each string. */
-static boolean print_addresses;
+/* TRUE means print address within file for each string. */
+static bfd_boolean print_addresses;
-/* true means print filename for each string. */
-static boolean print_filenames;
+/* TRUE means print filename for each string. */
+static bfd_boolean print_filenames;
-/* true means for object files scan only the data section. */
-static boolean datasection_only;
+/* TRUE means for object files scan only the data section. */
+static bfd_boolean datasection_only;
-/* true if we found an initialized data section in the current file. */
-static boolean got_a_section;
+/* TRUE if we found an initialized data section in the current file. */
+static bfd_boolean got_a_section;
/* The BFD object file format. */
static char *target;
@@ -139,18 +139,24 @@ static struct option long_options[] =
{NULL, 0, NULL, 0}
};
-static void strings_a_section PARAMS ((bfd *, asection *, PTR));
-static boolean strings_object_file PARAMS ((const char *));
-static boolean strings_file PARAMS ((char *file));
-static int integer_arg PARAMS ((char *s));
-static void print_strings PARAMS ((const char *filename, FILE *stream,
- file_off address, int stop_point,
- int magiccount, char *magic));
-static void usage PARAMS ((FILE *stream, int status));
-static long get_char PARAMS ((FILE *stream, file_off *address,
- int *magiccount, char **magic));
+static void strings_a_section
+ PARAMS ((bfd *, asection *, PTR));
+static bfd_boolean strings_object_file
+ PARAMS ((const char *));
+static bfd_boolean strings_file
+ PARAMS ((char *file));
+static int integer_arg
+ PARAMS ((char *s));
+static void print_strings
+ PARAMS ((const char *filename, FILE *stream, file_off address,
+ int stop_point, int magiccount, char *magic));
+static void usage
+ PARAMS ((FILE *stream, int status));
+static long get_char
+ PARAMS ((FILE *stream, file_off *address, int *magiccount, char **magic));
-int main PARAMS ((int, char **));
+int main
+ PARAMS ((int, char **));
int
main (argc, argv)
@@ -159,7 +165,7 @@ main (argc, argv)
{
int optc;
int exit_status = 0;
- boolean files_given = false;
+ bfd_boolean files_given = FALSE;
#if defined (HAVE_SETLOCALE)
setlocale (LC_ALL, "");
@@ -170,9 +176,9 @@ main (argc, argv)
program_name = argv[0];
xmalloc_set_program_name (program_name);
string_min = -1;
- print_addresses = false;
- print_filenames = false;
- datasection_only = true;
+ print_addresses = FALSE;
+ print_filenames = FALSE;
+ datasection_only = TRUE;
target = NULL;
encoding = 's';
@@ -182,11 +188,11 @@ main (argc, argv)
switch (optc)
{
case 'a':
- datasection_only = false;
+ datasection_only = FALSE;
break;
case 'f':
- print_filenames = true;
+ print_filenames = TRUE;
break;
case 'H':
@@ -202,12 +208,12 @@ main (argc, argv)
break;
case 'o':
- print_addresses = true;
+ print_addresses = TRUE;
address_radix = 8;
break;
case 't':
- print_addresses = true;
+ print_addresses = TRUE;
if (optarg[1] != '\0')
usage (stderr, 1);
switch (optarg[0])
@@ -281,28 +287,28 @@ main (argc, argv)
if (optind >= argc)
{
- datasection_only = false;
+ datasection_only = FALSE;
#ifdef SET_BINARY
SET_BINARY (fileno (stdin));
#endif
print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL);
- files_given = true;
+ files_given = TRUE;
}
else
{
for (; optind < argc; ++optind)
{
if (strcmp (argv[optind], "-") == 0)
- datasection_only = false;
+ datasection_only = FALSE;
else
{
- files_given = true;
- exit_status |= (strings_file (argv[optind]) == false);
+ files_given = TRUE;
+ exit_status |= strings_file (argv[optind]) == FALSE;
}
}
}
- if (files_given == false)
+ if (!files_given)
usage (stderr, 1);
return (exit_status);
@@ -326,7 +332,7 @@ strings_a_section (abfd, sect, filearg)
PTR mem = xmalloc (sz);
if (bfd_get_section_contents (abfd, sect, mem, (file_ptr) 0, sz))
{
- got_a_section = true;
+ got_a_section = TRUE;
print_strings (file, (FILE *) NULL, sect->filepos, 0, sz, mem);
}
free (mem);
@@ -336,10 +342,10 @@ strings_a_section (abfd, sect, filearg)
/* Scan all of the sections in FILE, and print the strings
in the initialized data section(s).
- Return true if successful,
- false if not (such as if FILE is not an object file). */
+ Return TRUE if successful,
+ FALSE if not (such as if FILE is not an object file). */
-static boolean
+static bfd_boolean
strings_object_file (file)
const char *file;
{
@@ -348,33 +354,33 @@ strings_object_file (file)
if (abfd == NULL)
{
/* Treat the file as a non-object file. */
- return false;
+ return FALSE;
}
/* This call is mainly for its side effect of reading in the sections.
We follow the traditional behavior of `strings' in that we don't
complain if we don't recognize a file to be an object file. */
- if (bfd_check_format (abfd, bfd_object) == false)
+ if (!bfd_check_format (abfd, bfd_object))
{
bfd_close (abfd);
- return false;
+ return FALSE;
}
- got_a_section = false;
+ got_a_section = FALSE;
bfd_map_over_sections (abfd, strings_a_section, (PTR) file);
if (!bfd_close (abfd))
{
bfd_nonfatal (file);
- return false;
+ return FALSE;
}
return got_a_section;
}
-/* Print the strings in FILE. Return true if ok, false if an error occurs. */
+/* Print the strings in FILE. Return TRUE if ok, FALSE if an error occurs. */
-static boolean
+static bfd_boolean
strings_file (file)
char *file;
{
@@ -391,7 +397,7 @@ strings_file (file)
{
fprintf (stderr, "%s: ", program_name);
perror (file);
- return false;
+ return FALSE;
}
print_strings (file, stream, (file_off) 0, 0, 0, (char *) 0);
@@ -400,11 +406,11 @@ strings_file (file)
{
fprintf (stderr, "%s: ", program_name);
perror (file);
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/* Read the next character, return EOF if none available.
diff --git a/binutils/unwind-ia64.h b/binutils/unwind-ia64.h
index 7d5033d..30f15b8 100644
--- a/binutils/unwind-ia64.h
+++ b/binutils/unwind-ia64.h
@@ -22,10 +22,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#define UNW_VER(x) ((x) >> 48)
-#define UNW_FLAG_MASK 0x0000ffff00000000
-#define UNW_FLAG_OSMASK 0x0000f00000000000
-#define UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000L)
-#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000L)
-#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffL)
+#define UNW_FLAG_MASK 0x0000ffff00000000LL
+#define UNW_FLAG_OSMASK 0x0000f00000000000LL
+#define UNW_FLAG_EHANDLER(x) ((x) & 0x0000000100000000LL)
+#define UNW_FLAG_UHANDLER(x) ((x) & 0x0000000200000000LL)
+#define UNW_LENGTH(x) ((x) & 0x00000000ffffffffLL)
extern const unsigned char * unw_decode PARAMS ((const unsigned char *, int, void *));
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;
}