Use bool in binutils
* sysdep.h (POISON_BFD_BOOLEAN): Define. * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c, * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c, * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h, * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c, * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c, * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h, * windmc.c, * windmc.h, * windres.c, * winduni.c, * wrstabs.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout.
This commit is contained in:
parent
78933a4ad9
commit
015dc7e1f8
@ -1,3 +1,16 @@
|
||||
2021-03-31 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* sysdep.h (POISON_BFD_BOOLEAN): Define.
|
||||
* addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
|
||||
* binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
|
||||
* debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
|
||||
* elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
|
||||
* objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
|
||||
* readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
|
||||
* windmc.c, * windmc.h, * windres.c, * winduni.c,
|
||||
* wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
|
||||
and TRUE with true throughout.
|
||||
|
||||
2021-03-31 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* coffdump.c: Include stdint.h in place of bfd_stdint.h.
|
||||
|
@ -38,12 +38,12 @@
|
||||
#include "bucomm.h"
|
||||
#include "elf-bfd.h"
|
||||
|
||||
static bfd_boolean unwind_inlines; /* -i, unwind inlined functions. */
|
||||
static bfd_boolean with_addresses; /* -a, show addresses. */
|
||||
static bfd_boolean with_functions; /* -f, show function names. */
|
||||
static bfd_boolean do_demangle; /* -C, demangle names. */
|
||||
static bfd_boolean pretty_print; /* -p, print on one line. */
|
||||
static bfd_boolean base_names; /* -s, strip directory names. */
|
||||
static bool unwind_inlines; /* -i, unwind inlined functions. */
|
||||
static bool with_addresses; /* -a, show addresses. */
|
||||
static bool with_functions; /* -f, show function names. */
|
||||
static bool do_demangle; /* -C, demangle names. */
|
||||
static bool pretty_print; /* -p, print on one line. */
|
||||
static bool base_names; /* -s, strip directory names. */
|
||||
|
||||
/* Flags passed to the name demangler. */
|
||||
static int demangle_flags = DMGL_PARAMS | DMGL_ANSI;
|
||||
@ -117,7 +117,7 @@ slurp_symtab (bfd *abfd)
|
||||
{
|
||||
long storage;
|
||||
long symcount;
|
||||
bfd_boolean dynamic = FALSE;
|
||||
bool dynamic = false;
|
||||
|
||||
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
||||
return;
|
||||
@ -126,7 +126,7 @@ slurp_symtab (bfd *abfd)
|
||||
if (storage == 0)
|
||||
{
|
||||
storage = bfd_get_dynamic_symtab_upper_bound (abfd);
|
||||
dynamic = TRUE;
|
||||
dynamic = true;
|
||||
}
|
||||
if (storage < 0)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
@ -167,7 +167,7 @@ static const char *filename;
|
||||
static const char *functionname;
|
||||
static unsigned int line;
|
||||
static unsigned int discriminator;
|
||||
static bfd_boolean found;
|
||||
static bool found;
|
||||
|
||||
/* Look for an address in a section. This is called via
|
||||
bfd_map_over_sections. */
|
||||
@ -267,7 +267,7 @@ translate_addresses (bfd *abfd, asection *section)
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
found = FALSE;
|
||||
found = false;
|
||||
if (section)
|
||||
find_offset_in_section (abfd, section);
|
||||
else
|
||||
@ -337,7 +337,7 @@ translate_addresses (bfd *abfd, asection *section)
|
||||
else
|
||||
printf ("?\n");
|
||||
if (!unwind_inlines)
|
||||
found = FALSE;
|
||||
found = false;
|
||||
else
|
||||
found = bfd_find_inliner_info (abfd, &filename, &functionname,
|
||||
&line);
|
||||
@ -455,13 +455,13 @@ main (int argc, char **argv)
|
||||
case 0:
|
||||
break; /* We've been given a long option. */
|
||||
case 'a':
|
||||
with_addresses = TRUE;
|
||||
with_addresses = true;
|
||||
break;
|
||||
case 'b':
|
||||
target = optarg;
|
||||
break;
|
||||
case 'C':
|
||||
do_demangle = TRUE;
|
||||
do_demangle = true;
|
||||
if (optarg != NULL)
|
||||
{
|
||||
enum demangling_styles style;
|
||||
@ -484,13 +484,13 @@ main (int argc, char **argv)
|
||||
file_name = optarg;
|
||||
break;
|
||||
case 's':
|
||||
base_names = TRUE;
|
||||
base_names = true;
|
||||
break;
|
||||
case 'f':
|
||||
with_functions = TRUE;
|
||||
with_functions = true;
|
||||
break;
|
||||
case 'p':
|
||||
pretty_print = TRUE;
|
||||
pretty_print = true;
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
@ -501,7 +501,7 @@ main (int argc, char **argv)
|
||||
usage (stdout, 0);
|
||||
break;
|
||||
case 'i':
|
||||
unwind_inlines = TRUE;
|
||||
unwind_inlines = true;
|
||||
break;
|
||||
case 'j':
|
||||
section_name = optarg;
|
||||
|
@ -54,7 +54,7 @@ static void delete_members (bfd *, char **files_to_delete);
|
||||
|
||||
static void move_members (bfd *, char **files_to_move);
|
||||
static void replace_members
|
||||
(bfd *, char **files_to_replace, bfd_boolean quick);
|
||||
(bfd *, char **files_to_replace, bool quick);
|
||||
static void print_descr (bfd * abfd);
|
||||
static void write_archive (bfd *);
|
||||
static int ranlib_only (const char *archname);
|
||||
@ -124,19 +124,19 @@ get_pos_bfd (bfd **, enum pos, const char *);
|
||||
|
||||
/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only
|
||||
extract the COUNTED_NAME_COUNTER instance of that name. */
|
||||
static bfd_boolean counted_name_mode = 0;
|
||||
static bool counted_name_mode = 0;
|
||||
static int counted_name_counter = 0;
|
||||
|
||||
/* Whether to truncate names of files stored in the archive. */
|
||||
static bfd_boolean ar_truncate = FALSE;
|
||||
static bool 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 bfd_boolean full_pathname = FALSE;
|
||||
static bool full_pathname = false;
|
||||
|
||||
/* Whether to create a "thin" archive (symbol index only -- no files). */
|
||||
static bfd_boolean make_thin_archive = FALSE;
|
||||
static bool make_thin_archive = false;
|
||||
|
||||
#define LIBDEPS "__.LIBDEP"
|
||||
/* Text to store in the __.LIBDEP archive element for the linker to use. */
|
||||
@ -215,7 +215,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
|
||||
|
||||
for (; count > 0; files++, count--)
|
||||
{
|
||||
bfd_boolean found = FALSE;
|
||||
bool found = false;
|
||||
|
||||
match_count = 0;
|
||||
for (head = arch->archive_next; head; head = head->archive_next)
|
||||
@ -257,7 +257,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
|
||||
continue;
|
||||
}
|
||||
|
||||
found = TRUE;
|
||||
found = true;
|
||||
function (head);
|
||||
head->archive_pass = 1;
|
||||
/* PR binutils/15796: Once a file has been matched, do not
|
||||
@ -275,7 +275,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
|
||||
}
|
||||
}
|
||||
|
||||
bfd_boolean operation_alters_arch = FALSE;
|
||||
bool operation_alters_arch = false;
|
||||
|
||||
static void
|
||||
usage (int help)
|
||||
@ -519,22 +519,22 @@ decode_options (int argc, char **argv)
|
||||
break;
|
||||
case 'd':
|
||||
operation = del;
|
||||
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;
|
||||
@ -557,7 +557,7 @@ decode_options (int argc, char **argv)
|
||||
display_offsets = 1;
|
||||
break;
|
||||
case 'V':
|
||||
show_version = TRUE;
|
||||
show_version = true;
|
||||
break;
|
||||
case 's':
|
||||
write_armap = 1;
|
||||
@ -584,22 +584,22 @@ decode_options (int argc, char **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;
|
||||
case 'T':
|
||||
make_thin_archive = TRUE;
|
||||
make_thin_archive = true;
|
||||
break;
|
||||
case 'D':
|
||||
deterministic = TRUE;
|
||||
deterministic = true;
|
||||
break;
|
||||
case 'U':
|
||||
deterministic = FALSE;
|
||||
deterministic = false;
|
||||
break;
|
||||
case OPTION_PLUGIN:
|
||||
#if BFD_SUPPORTS_PLUGINS
|
||||
@ -650,7 +650,7 @@ static void
|
||||
ranlib_main (int argc, char **argv)
|
||||
{
|
||||
int arg_index, status = 0;
|
||||
bfd_boolean touch = FALSE;
|
||||
bool touch = false;
|
||||
int c;
|
||||
|
||||
while ((c = getopt_long (argc, argv, "DhHUvVt", long_options, NULL)) != EOF)
|
||||
@ -658,17 +658,17 @@ ranlib_main (int argc, char **argv)
|
||||
switch (c)
|
||||
{
|
||||
case 'D':
|
||||
deterministic = TRUE;
|
||||
deterministic = true;
|
||||
break;
|
||||
case 'U':
|
||||
deterministic = FALSE;
|
||||
deterministic = false;
|
||||
break;
|
||||
case 'h':
|
||||
case 'H':
|
||||
show_help = 1;
|
||||
break;
|
||||
case 't':
|
||||
touch = TRUE;
|
||||
touch = true;
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
@ -1292,7 +1292,7 @@ write_archive (bfd *iarch)
|
||||
obfd->flags |= BFD_ARCHIVE_FULL_PATH;
|
||||
|
||||
if (make_thin_archive || bfd_is_thin_archive (iarch))
|
||||
bfd_set_thin_archive (obfd, TRUE);
|
||||
bfd_set_thin_archive (obfd, true);
|
||||
|
||||
if (!bfd_set_archive_head (obfd, contents_head))
|
||||
bfd_fatal (old_name);
|
||||
@ -1307,7 +1307,7 @@ write_archive (bfd *iarch)
|
||||
/* We don't care if this fails; we might be creating the archive. */
|
||||
bfd_close (iarch);
|
||||
|
||||
if (smart_rename (new_name, old_name, tmpfd, NULL, FALSE) != 0)
|
||||
if (smart_rename (new_name, old_name, tmpfd, NULL, false) != 0)
|
||||
xexit (1);
|
||||
free (old_name);
|
||||
free (new_name);
|
||||
@ -1357,8 +1357,8 @@ static void
|
||||
delete_members (bfd *arch, char **files_to_delete)
|
||||
{
|
||||
bfd **current_ptr_ptr;
|
||||
bfd_boolean found;
|
||||
bfd_boolean something_changed = FALSE;
|
||||
bool found;
|
||||
bool something_changed = false;
|
||||
int match_count;
|
||||
|
||||
for (; *files_to_delete != NULL; ++files_to_delete)
|
||||
@ -1371,12 +1371,12 @@ delete_members (bfd *arch, char **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->archive_next);
|
||||
while (*current_ptr_ptr)
|
||||
@ -1393,8 +1393,8 @@ delete_members (bfd *arch, char **files_to_delete)
|
||||
}
|
||||
else
|
||||
{
|
||||
found = TRUE;
|
||||
something_changed = TRUE;
|
||||
found = true;
|
||||
something_changed = true;
|
||||
if (verbose)
|
||||
printf ("d - %s\n",
|
||||
*files_to_delete);
|
||||
@ -1471,9 +1471,9 @@ move_members (bfd *arch, char **files_to_move)
|
||||
/* Ought to default to replacing in place, but this is existing practice! */
|
||||
|
||||
static void
|
||||
replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
|
||||
replace_members (bfd *arch, char **files_to_move, bool quick)
|
||||
{
|
||||
bfd_boolean changed = FALSE;
|
||||
bool changed = false;
|
||||
bfd **after_bfd; /* New entries go after this one. */
|
||||
bfd *current;
|
||||
bfd **current_ptr;
|
||||
@ -1493,7 +1493,7 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
|
||||
normalize (bfd_get_filename (current), arch)) == 0
|
||||
&& current->arelt_data != NULL)
|
||||
{
|
||||
bfd_boolean replaced;
|
||||
bool replaced;
|
||||
if (newer_only)
|
||||
{
|
||||
struct stat fsbuf, asbuf;
|
||||
@ -1531,7 +1531,7 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
|
||||
{
|
||||
/* Snip out this entry from the chain. */
|
||||
*current_ptr = (*current_ptr)->archive_next;
|
||||
changed = TRUE;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
goto next_file;
|
||||
|
@ -74,7 +74,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
||||
want to hack multiple references. */
|
||||
for (ptr = list; ptr; ptr = ptr->next)
|
||||
{
|
||||
bfd_boolean found = FALSE;
|
||||
bool found = false;
|
||||
bfd *prev = arch;
|
||||
|
||||
for (head = arch->archive_next; head; head = head->archive_next)
|
||||
@ -82,7 +82,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
||||
if (bfd_get_filename (head) != NULL
|
||||
&& FILENAME_CMP (ptr->name, bfd_get_filename (head)) == 0)
|
||||
{
|
||||
found = TRUE;
|
||||
found = true;
|
||||
function (head, prev);
|
||||
}
|
||||
prev = head;
|
||||
@ -98,7 +98,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
||||
static void
|
||||
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
print_arelt_descr(outfile, abfd, verbose, FALSE);
|
||||
print_arelt_descr(outfile, abfd, verbose, false);
|
||||
}
|
||||
|
||||
void
|
||||
@ -364,7 +364,7 @@ ar_save (void)
|
||||
}
|
||||
}
|
||||
|
||||
smart_rename (temp_name, real_name, temp_fd, NULL, FALSE);
|
||||
smart_rename (temp_name, real_name, temp_fd, NULL, false);
|
||||
obfd = 0;
|
||||
free (temp_name);
|
||||
free (real_name);
|
||||
|
@ -53,13 +53,13 @@ iovec_stat (struct bfd *abfd ATTRIBUTE_UNUSED,
|
||||
return fstat (fileno ((FILE*) stream), sb);
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
check_format_any (struct bfd *abfd, bfd_format format)
|
||||
{
|
||||
char** targets = NULL;
|
||||
|
||||
if (bfd_check_format_matches (abfd, format, &targets))
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (targets)
|
||||
{
|
||||
@ -68,7 +68,7 @@ check_format_any (struct bfd *abfd, bfd_format format)
|
||||
return bfd_check_format (abfd, format);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -38,9 +38,9 @@ ar_emul_default_usage (FILE *fp)
|
||||
fprintf (fp, _(" No emulation specific options\n"));
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_append (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
bool verbose, bool flatten)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
@ -50,45 +50,45 @@ ar_emul_append (bfd **after_bfd, char *file_name, const char *target,
|
||||
return bin_dummy_emulation.ar_append (after_bfd, new_bfd,
|
||||
verbose, flatten);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_append_bfd (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
bool verbose, bool flatten)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_append)
|
||||
return bin_dummy_emulation.ar_append (after_bfd, new_bfd,
|
||||
verbose, flatten);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
any_ok (bfd *new_bfd ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose, bfd_boolean flatten,
|
||||
bfd_boolean (*check) (bfd *))
|
||||
bool verbose, bool flatten,
|
||||
bool (*check) (bfd *))
|
||||
{
|
||||
/* When flattening, add the members of an archive instead of the
|
||||
archive itself. */
|
||||
if (flatten && bfd_check_format (new_bfd, bfd_archive))
|
||||
{
|
||||
bfd *elt;
|
||||
bfd_boolean added = FALSE;
|
||||
bool added = false;
|
||||
|
||||
for (elt = bfd_openr_next_archived_file (new_bfd, NULL);
|
||||
elt;
|
||||
elt = bfd_openr_next_archived_file (new_bfd, elt))
|
||||
{
|
||||
if (do_ar_emul_append (after_bfd, elt, verbose, TRUE, check))
|
||||
if (do_ar_emul_append (after_bfd, elt, verbose, true, check))
|
||||
{
|
||||
added = TRUE;
|
||||
added = true;
|
||||
after_bfd = &((*after_bfd)->archive_next);
|
||||
}
|
||||
}
|
||||
@ -97,26 +97,26 @@ do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
||||
}
|
||||
|
||||
if (!check (new_bfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
AR_EMUL_APPEND_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_default_append (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
bool verbose, bool flatten)
|
||||
{
|
||||
return do_ar_emul_append (after_bfd, new_bfd, verbose, flatten, any_ok);
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_replace (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose)
|
||||
bool verbose)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
@ -127,43 +127,43 @@ ar_emul_replace (bfd **after_bfd, char *file_name, const char *target,
|
||||
return bin_dummy_emulation.ar_replace (after_bfd, new_bfd,
|
||||
verbose);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_replace_bfd (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose)
|
||||
bool verbose)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_replace)
|
||||
return bin_dummy_emulation.ar_replace (after_bfd, new_bfd,
|
||||
verbose);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_default_replace (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose)
|
||||
bool verbose)
|
||||
{
|
||||
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_parse_arg (char *arg)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_parse_arg)
|
||||
return bin_dummy_emulation.ar_parse_arg (arg);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
ar_emul_default_parse_arg (char *arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@ -28,23 +28,15 @@
|
||||
|
||||
extern void ar_emul_usage (FILE *);
|
||||
extern void ar_emul_default_usage (FILE *);
|
||||
extern bfd_boolean ar_emul_append (bfd **, char *, const char *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
extern bfd_boolean ar_emul_append_bfd (bfd **, bfd *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
extern bfd_boolean ar_emul_default_append (bfd **, bfd *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
extern bfd_boolean do_ar_emul_append (bfd **, bfd *,
|
||||
bfd_boolean, bfd_boolean,
|
||||
bfd_boolean (*)(bfd *));
|
||||
extern bfd_boolean ar_emul_replace (bfd **, char *, const char *,
|
||||
bfd_boolean);
|
||||
extern bfd_boolean ar_emul_replace_bfd (bfd **, bfd *,
|
||||
bfd_boolean);
|
||||
extern bfd_boolean ar_emul_default_replace (bfd **, bfd *,
|
||||
bfd_boolean);
|
||||
extern bfd_boolean ar_emul_parse_arg (char *);
|
||||
extern bfd_boolean ar_emul_default_parse_arg (char *);
|
||||
extern bool ar_emul_append (bfd **, char *, const char *, bool, bool);
|
||||
extern bool ar_emul_append_bfd (bfd **, bfd *, bool, bool);
|
||||
extern bool ar_emul_default_append (bfd **, bfd *, bool, bool);
|
||||
extern bool do_ar_emul_append (bfd **, bfd *, bool, bool, bool (*)(bfd *));
|
||||
extern bool ar_emul_replace (bfd **, char *, const char *, bool);
|
||||
extern bool ar_emul_replace_bfd (bfd **, bfd *, bool);
|
||||
extern bool ar_emul_default_replace (bfd **, bfd *, bool);
|
||||
extern bool ar_emul_parse_arg (char *);
|
||||
extern bool ar_emul_default_parse_arg (char *);
|
||||
|
||||
/* Macros for common output. */
|
||||
|
||||
@ -64,10 +56,10 @@ extern bfd_boolean ar_emul_default_parse_arg (char *);
|
||||
typedef struct bin_emulation_xfer_struct
|
||||
{
|
||||
/* Print out the extra options. */
|
||||
void (* ar_usage) (FILE *fp);
|
||||
bfd_boolean (* ar_append) (bfd **, bfd *, bfd_boolean, bfd_boolean);
|
||||
bfd_boolean (* ar_replace) (bfd **, bfd *, bfd_boolean);
|
||||
bfd_boolean (* ar_parse_arg) (char *);
|
||||
void (*ar_usage) (FILE *fp);
|
||||
bool (*ar_append) (bfd **, bfd *, bool, bool);
|
||||
bool (*ar_replace) (bfd **, bfd *, bool);
|
||||
bool (*ar_parse_arg) (char *);
|
||||
}
|
||||
bin_emulation_xfer_type;
|
||||
|
||||
|
@ -435,7 +435,7 @@ display_info (void)
|
||||
Mode User\tGroup\tSize\tDate Name */
|
||||
|
||||
void
|
||||
print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose, bfd_boolean offsets)
|
||||
print_arelt_descr (FILE *file, bfd *abfd, bool verbose, bool offsets)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
@ -677,18 +677,18 @@ bfd_get_archive_filename (const bfd *abfd)
|
||||
is valid for writing. For security reasons absolute paths
|
||||
and paths containing /../ are not allowed. See PR 17533. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
is_valid_archive_path (char const * pathname)
|
||||
{
|
||||
const char * n = pathname;
|
||||
|
||||
if (IS_ABSOLUTE_PATH (n))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
while (*n)
|
||||
{
|
||||
if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
while (*n && ! IS_DIR_SEPARATOR (*n))
|
||||
n++;
|
||||
@ -696,5 +696,5 @@ is_valid_archive_path (char const * pathname)
|
||||
n++;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ void list_supported_architectures (const char *, FILE *);
|
||||
|
||||
int display_info (void);
|
||||
|
||||
void print_arelt_descr (FILE *, bfd *, bfd_boolean, bfd_boolean);
|
||||
void print_arelt_descr (FILE *, bfd *, bool, bool);
|
||||
|
||||
char *make_tempname (const char *, int *);
|
||||
char *make_tempdir (const char *);
|
||||
@ -58,7 +58,7 @@ bfd_vma parse_vma (const char *, const char *);
|
||||
|
||||
off_t get_file_size (const char *);
|
||||
|
||||
bfd_boolean is_valid_archive_path (char const *);
|
||||
bool is_valid_archive_path (char const *);
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
@ -72,7 +72,7 @@ extern void print_version (const char *);
|
||||
extern void set_times (const char *, const struct stat *);
|
||||
|
||||
extern int smart_rename (const char *, const char *, int,
|
||||
struct stat *, bfd_boolean);
|
||||
struct stat *, bool);
|
||||
|
||||
|
||||
/* In libiberty. */
|
||||
|
@ -24,28 +24,28 @@
|
||||
|
||||
/* Routine used to read generic debugging information. */
|
||||
|
||||
extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean);
|
||||
extern void *read_debugging_info (bfd *, asymbol **, long, bool);
|
||||
|
||||
/* Routine used to print generic debugging information. */
|
||||
|
||||
extern bfd_boolean print_debugging_info
|
||||
extern bool print_debugging_info
|
||||
(FILE *, void *, bfd *, asymbol **,
|
||||
char * (*) (struct bfd *, const char *, int), bfd_boolean);
|
||||
char * (*) (struct bfd *, const char *, int), bool);
|
||||
|
||||
/* Routines used to read and write stabs information. */
|
||||
|
||||
extern void *start_stab (void *, bfd *, bfd_boolean, asymbol **, long);
|
||||
extern void *start_stab (void *, bfd *, bool, asymbol **, long);
|
||||
|
||||
extern bfd_boolean finish_stab (void *, void *);
|
||||
extern bool finish_stab (void *, void *);
|
||||
|
||||
extern bfd_boolean parse_stab
|
||||
extern bool parse_stab
|
||||
(void *, void *, int, int, bfd_vma, const char *);
|
||||
|
||||
extern bfd_boolean write_stabs_in_sections_debugging_info
|
||||
extern bool write_stabs_in_sections_debugging_info
|
||||
(bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *);
|
||||
|
||||
/* Routine used to read COFF debugging information. */
|
||||
|
||||
extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
|
||||
extern bool parse_coff (bfd *, asymbol **, long, void *);
|
||||
|
||||
#endif
|
||||
|
@ -720,7 +720,7 @@ static struct coff_ofile *
|
||||
doit (void)
|
||||
{
|
||||
unsigned int i;
|
||||
bfd_boolean infile = FALSE;
|
||||
bool infile = false;
|
||||
struct coff_ofile *head =
|
||||
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
|
||||
|
||||
@ -753,7 +753,7 @@ doit (void)
|
||||
if (infile)
|
||||
pop_scope ();
|
||||
else
|
||||
infile = TRUE;
|
||||
infile = true;
|
||||
|
||||
push_scope (1);
|
||||
file_scope = n->scope = top_scope;
|
||||
|
388
binutils/debug.c
388
binutils/debug.c
File diff suppressed because it is too large
Load Diff
181
binutils/debug.h
181
binutils/debug.h
@ -169,45 +169,45 @@ 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. */
|
||||
bfd_boolean (*start_compilation_unit) (void *, const char *);
|
||||
bool (*start_compilation_unit) (void *, 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. */
|
||||
bfd_boolean (*start_source) (void *, const char *);
|
||||
bool (*start_source) (void *, 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. */
|
||||
bfd_boolean (*empty_type) (void *);
|
||||
bool (*empty_type) (void *);
|
||||
|
||||
/* Push a void type onto the type stack. */
|
||||
bfd_boolean (*void_type) (void *);
|
||||
bool (*void_type) (void *);
|
||||
|
||||
/* Push an integer type onto the type stack, given the size and
|
||||
whether it is unsigned. */
|
||||
bfd_boolean (*int_type) (void *, unsigned int, bfd_boolean);
|
||||
bool (*int_type) (void *, unsigned int, bool);
|
||||
|
||||
/* Push a floating type onto the type stack, given the size. */
|
||||
bfd_boolean (*float_type) (void *, unsigned int);
|
||||
bool (*float_type) (void *, unsigned int);
|
||||
|
||||
/* Push a complex type onto the type stack, given the size. */
|
||||
bfd_boolean (*complex_type) (void *, unsigned int);
|
||||
bool (*complex_type) (void *, unsigned int);
|
||||
|
||||
/* Push a bfd_boolean type onto the type stack, given the size. */
|
||||
bfd_boolean (*bool_type) (void *, unsigned int);
|
||||
/* Push a bool type onto the type stack, given the size. */
|
||||
bool (*bool_type) (void *, 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. */
|
||||
bfd_boolean (*enum_type)
|
||||
bool (*enum_type)
|
||||
(void *, 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. */
|
||||
bfd_boolean (*pointer_type) (void *);
|
||||
bool (*pointer_type) (void *);
|
||||
|
||||
/* Push a function type onto the type stack. The second argument
|
||||
indicates the number of argument types that have been pushed onto
|
||||
@ -217,34 +217,34 @@ struct debug_write_fns
|
||||
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. */
|
||||
bfd_boolean (*function_type) (void *, int, bfd_boolean);
|
||||
bool (*function_type) (void *, int, bool);
|
||||
|
||||
/* Pop the top type on the type stack, and push a reference to that
|
||||
type onto the type stack. */
|
||||
bfd_boolean (*reference_type) (void *);
|
||||
bool (*reference_type) (void *);
|
||||
|
||||
/* 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. */
|
||||
bfd_boolean (*range_type) (void *, bfd_signed_vma, bfd_signed_vma);
|
||||
bool (*range_type) (void *, 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. */
|
||||
bfd_boolean (*array_type)
|
||||
(void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
|
||||
bool (*array_type)
|
||||
(void *, bfd_signed_vma, bfd_signed_vma, bool);
|
||||
|
||||
/* 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. */
|
||||
bfd_boolean (*set_type) (void *, bfd_boolean);
|
||||
bool (*set_type) (void *, bool);
|
||||
|
||||
/* 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. */
|
||||
bfd_boolean (*offset_type) (void *);
|
||||
bool (*offset_type) (void *);
|
||||
|
||||
/* 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
|
||||
@ -258,15 +258,15 @@ struct debug_write_fns
|
||||
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. */
|
||||
bfd_boolean (*method_type) (void *, bfd_boolean, int, bfd_boolean);
|
||||
bool (*method_type) (void *, bool, int, bool);
|
||||
|
||||
/* Pop the top type off the type stack, and push a const qualified
|
||||
version of that type onto the type stack. */
|
||||
bfd_boolean (*const_type) (void *);
|
||||
bool (*const_type) (void *);
|
||||
|
||||
/* Pop the top type off the type stack, and push a volatile
|
||||
qualified version of that type onto the type stack. */
|
||||
bfd_boolean (*volatile_type) (void *);
|
||||
bool (*volatile_type) (void *);
|
||||
|
||||
/* Start building a struct. This is followed by calls to the
|
||||
struct_field function, and finished by a call to the
|
||||
@ -277,18 +277,18 @@ struct debug_write_fns
|
||||
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. */
|
||||
bfd_boolean (*start_struct_type)
|
||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int);
|
||||
bool (*start_struct_type)
|
||||
(void *, const char *, unsigned int, bool, 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. */
|
||||
bfd_boolean (*struct_field)
|
||||
bool (*struct_field)
|
||||
(void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
|
||||
|
||||
/* Finish building a struct, and push it onto the type stack. */
|
||||
bfd_boolean (*end_struct_type) (void *);
|
||||
bool (*end_struct_type) (void *);
|
||||
|
||||
/* Start building a class. This is followed by calls to several
|
||||
functions: struct_field, class_static_member, class_baseclass,
|
||||
@ -301,22 +301,21 @@ struct debug_write_fns
|
||||
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. */
|
||||
bfd_boolean (*start_class_type)
|
||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int,
|
||||
bfd_boolean, bfd_boolean);
|
||||
bool (*start_class_type)
|
||||
(void *, const char *, unsigned int, bool, unsigned int, bool, bool);
|
||||
|
||||
/* 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. */
|
||||
bfd_boolean (*class_static_member)
|
||||
bool (*class_static_member)
|
||||
(void *, 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. */
|
||||
bfd_boolean (*class_baseclass)
|
||||
(void *, bfd_vma, bfd_boolean, enum debug_visibility);
|
||||
bool (*class_baseclass)
|
||||
(void *, bfd_vma, bool, 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 +323,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. */
|
||||
bfd_boolean (*class_start_method) (void *, const char *);
|
||||
bool (*class_start_method) (void *, 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,27 +332,25 @@ 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). */
|
||||
bfd_boolean (*class_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean, bfd_vma, bfd_boolean);
|
||||
bool (*class_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bool, bool, bfd_vma, bool);
|
||||
|
||||
/* 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. */
|
||||
bfd_boolean (*class_static_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean);
|
||||
bool (*class_static_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bool, bool);
|
||||
|
||||
/* Finish describing a class method. */
|
||||
bfd_boolean (*class_end_method) (void *);
|
||||
bool (*class_end_method) (void *);
|
||||
|
||||
/* Finish describing a class, and push it onto the type stack. */
|
||||
bfd_boolean (*end_class_type) (void *);
|
||||
bool (*end_class_type) (void *);
|
||||
|
||||
/* Push a type on the stack which was given a name by an earlier
|
||||
call to typdef. */
|
||||
bfd_boolean (*typedef_type) (void *, const char *);
|
||||
bool (*typedef_type) (void *, 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
|
||||
@ -364,58 +361,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). */
|
||||
bfd_boolean (*tag_type)
|
||||
bool (*tag_type)
|
||||
(void *, const char *, unsigned int, enum debug_type_kind);
|
||||
|
||||
/* Pop the type stack, and typedef it to the given name. */
|
||||
bfd_boolean (*typdef) (void *, const char *);
|
||||
bool (*typdef) (void *, 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. */
|
||||
bfd_boolean (*tag) (void *, const char *);
|
||||
bool (*tag) (void *, const char *);
|
||||
|
||||
/* This is called to record a named integer constant. */
|
||||
bfd_boolean (*int_constant) (void *, const char *, bfd_vma);
|
||||
bool (*int_constant) (void *, const char *, bfd_vma);
|
||||
|
||||
/* This is called to record a named floating point constant. */
|
||||
bfd_boolean (*float_constant) (void *, const char *, double);
|
||||
bool (*float_constant) (void *, const char *, double);
|
||||
|
||||
/* This is called to record a typed integer constant. The type is
|
||||
popped off the type stack. */
|
||||
bfd_boolean (*typed_constant) (void *, const char *, bfd_vma);
|
||||
bool (*typed_constant) (void *, const char *, bfd_vma);
|
||||
|
||||
/* This is called to record a variable. The type is popped off the
|
||||
type stack. */
|
||||
bfd_boolean (*variable)
|
||||
bool (*variable)
|
||||
(void *, const char *, enum debug_var_kind, bfd_vma);
|
||||
|
||||
/* Start writing out a function. The return type must be popped off
|
||||
the stack. The bfd_boolean is TRUE if the function is global. This
|
||||
the stack. The bool is TRUE if the function is global. This
|
||||
is followed by calls to function_parameter, followed by block
|
||||
information. */
|
||||
bfd_boolean (*start_function) (void *, const char *, bfd_boolean);
|
||||
bool (*start_function) (void *, const char *, bool);
|
||||
|
||||
/* Record a function parameter for the current function. The type
|
||||
must be popped off the stack. */
|
||||
bfd_boolean (*function_parameter)
|
||||
bool (*function_parameter)
|
||||
(void *, 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. */
|
||||
bfd_boolean (*start_block) (void *, bfd_vma);
|
||||
bool (*start_block) (void *, bfd_vma);
|
||||
|
||||
/* Finish writing out a block. The argument is the ending address
|
||||
of the block. */
|
||||
bfd_boolean (*end_block) (void *, bfd_vma);
|
||||
bool (*end_block) (void *, bfd_vma);
|
||||
|
||||
/* Finish writing out a function. */
|
||||
bfd_boolean (*end_function) (void *);
|
||||
bool (*end_function) (void *);
|
||||
|
||||
/* Record line number information for the current compilation unit. */
|
||||
bfd_boolean (*lineno) (void *, const char *, unsigned long, bfd_vma);
|
||||
bool (*lineno) (void *, const char *, unsigned long, bfd_vma);
|
||||
};
|
||||
|
||||
/* Exported functions. */
|
||||
@ -433,81 +430,81 @@ extern void *debug_init (void);
|
||||
/* Set the source filename. This implicitly starts a new compilation
|
||||
unit. */
|
||||
|
||||
extern bfd_boolean debug_set_filename (void *, const char *);
|
||||
extern bool debug_set_filename (void *, const char *);
|
||||
|
||||
/* Change source files to the given file name. This is used for
|
||||
include files in a single compilation unit. */
|
||||
|
||||
extern bfd_boolean debug_start_source (void *, const char *);
|
||||
extern bool debug_start_source (void *, const char *);
|
||||
|
||||
/* Record a function definition. This implicitly starts a function
|
||||
block. The debug_type argument is the type of the return value.
|
||||
The bfd_boolean indicates whether the function is globally visible.
|
||||
The bool 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 bfd_boolean debug_record_function
|
||||
(void *, const char *, debug_type, bfd_boolean, bfd_vma);
|
||||
extern bool debug_record_function
|
||||
(void *, const char *, debug_type, bool, bfd_vma);
|
||||
|
||||
/* Record a parameter for the current function. */
|
||||
|
||||
extern bfd_boolean debug_record_parameter
|
||||
extern bool debug_record_parameter
|
||||
(void *, const char *, debug_type, enum debug_parm_kind, bfd_vma);
|
||||
|
||||
/* End a function definition. The argument is the address where the
|
||||
function ends. */
|
||||
|
||||
extern bfd_boolean debug_end_function (void *, bfd_vma);
|
||||
extern bool debug_end_function (void *, 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 bfd_boolean debug_start_block (void *, bfd_vma);
|
||||
extern bool debug_start_block (void *, 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 bfd_boolean debug_end_block (void *, bfd_vma);
|
||||
extern bool debug_end_block (void *, bfd_vma);
|
||||
|
||||
/* Associate a line number in the current source file with a given
|
||||
address. */
|
||||
|
||||
extern bfd_boolean debug_record_line (void *, unsigned long, bfd_vma);
|
||||
extern bool debug_record_line (void *, unsigned long, bfd_vma);
|
||||
|
||||
/* Start a named common block. This is a block of variables that may
|
||||
move in memory. */
|
||||
|
||||
extern bfd_boolean debug_start_common_block (void *, const char *);
|
||||
extern bool debug_start_common_block (void *, const char *);
|
||||
|
||||
/* End a named common block. */
|
||||
|
||||
extern bfd_boolean debug_end_common_block (void *, const char *);
|
||||
extern bool debug_end_common_block (void *, const char *);
|
||||
|
||||
/* Record a named integer constant. */
|
||||
|
||||
extern bfd_boolean debug_record_int_const (void *, const char *, bfd_vma);
|
||||
extern bool debug_record_int_const (void *, const char *, bfd_vma);
|
||||
|
||||
/* Record a named floating point constant. */
|
||||
|
||||
extern bfd_boolean debug_record_float_const (void *, const char *, double);
|
||||
extern bool debug_record_float_const (void *, const char *, double);
|
||||
|
||||
/* Record a typed constant with an integral value. */
|
||||
|
||||
extern bfd_boolean debug_record_typed_const
|
||||
extern bool debug_record_typed_const
|
||||
(void *, const char *, debug_type, bfd_vma);
|
||||
|
||||
/* Record a label. */
|
||||
|
||||
extern bfd_boolean debug_record_label
|
||||
extern bool debug_record_label
|
||||
(void *, const char *, debug_type, bfd_vma);
|
||||
|
||||
/* Record a variable. */
|
||||
|
||||
extern bfd_boolean debug_record_variable
|
||||
extern bool debug_record_variable
|
||||
(void *, const char *, debug_type, enum debug_var_kind, bfd_vma);
|
||||
|
||||
/* Make an indirect type. The first argument is a pointer to the
|
||||
@ -524,10 +521,10 @@ extern debug_type debug_make_indirect_type
|
||||
|
||||
extern debug_type debug_make_void_type (void *);
|
||||
|
||||
/* Make an integer type of a given size. The bfd_boolean argument is TRUE
|
||||
/* Make an integer type of a given size. The bool argument is TRUE
|
||||
if the integer is unsigned. */
|
||||
|
||||
extern debug_type debug_make_int_type (void *, unsigned int, bfd_boolean);
|
||||
extern debug_type debug_make_int_type (void *, unsigned int, bool);
|
||||
|
||||
/* Make a floating point type of a given size. FIXME: On some
|
||||
platforms, like an Alpha, you probably need to be able to specify
|
||||
@ -548,18 +545,18 @@ extern debug_type debug_make_complex_type (void *, unsigned int);
|
||||
The fourth argument is a NULL terminated array of fields. */
|
||||
|
||||
extern debug_type debug_make_struct_type
|
||||
(void *, bfd_boolean, bfd_vma, debug_field *);
|
||||
(void *, bool, 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 bfd_boolean which is TRUE if this
|
||||
if it is not this object, and a bool which is TRUE if this
|
||||
object has its own virtual function table. */
|
||||
|
||||
extern debug_type debug_make_object_type
|
||||
(void *, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
|
||||
debug_method *, debug_type, bfd_boolean);
|
||||
(void *, bool, bfd_vma, debug_field *, debug_baseclass *,
|
||||
debug_method *, debug_type, bool);
|
||||
|
||||
/* Make an enumeration type. The arguments are a null terminated
|
||||
array of strings, and an array of corresponding values. */
|
||||
@ -578,7 +575,7 @@ extern debug_type debug_make_pointer_type (void *, debug_type);
|
||||
are unknown. */
|
||||
|
||||
extern debug_type debug_make_function_type
|
||||
(void *, debug_type, debug_type *, bfd_boolean);
|
||||
(void *, debug_type, debug_type *, bool);
|
||||
|
||||
/* Make a reference to a given type. */
|
||||
|
||||
@ -598,13 +595,13 @@ extern debug_type debug_make_range_type
|
||||
|
||||
extern debug_type debug_make_array_type
|
||||
(void *, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
|
||||
bfd_boolean);
|
||||
bool);
|
||||
|
||||
/* Make a set of a given type. For example, a Pascal set type. The
|
||||
bfd_boolean argument is TRUE if this set is actually a bitstring, as in
|
||||
bool argument is TRUE if this set is actually a bitstring, as in
|
||||
CHILL. */
|
||||
|
||||
extern debug_type debug_make_set_type (void *, debug_type, bfd_boolean);
|
||||
extern debug_type debug_make_set_type (void *, debug_type, bool);
|
||||
|
||||
/* 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
|
||||
@ -624,7 +621,7 @@ extern debug_type debug_make_offset_type (void *, debug_type, debug_type);
|
||||
the argument types from the mangled name. */
|
||||
|
||||
extern debug_type debug_make_method_type
|
||||
(void *, debug_type, debug_type, debug_type *, bfd_boolean);
|
||||
(void *, debug_type, debug_type, debug_type *, bool);
|
||||
|
||||
/* Make a const qualified version of a given type. */
|
||||
|
||||
@ -647,7 +644,7 @@ extern debug_type debug_make_undefined_tagged_type
|
||||
class. */
|
||||
|
||||
extern debug_baseclass debug_make_baseclass
|
||||
(void *, debug_type, bfd_vma, bfd_boolean, enum debug_visibility);
|
||||
(void *, debug_type, bfd_vma, bool, 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
|
||||
@ -685,16 +682,16 @@ extern debug_method debug_make_method
|
||||
function context. */
|
||||
|
||||
extern debug_method_variant debug_make_method_variant
|
||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean, bfd_vma, debug_type);
|
||||
(void *, const char *, debug_type, enum debug_visibility, bool,
|
||||
bool, 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
|
||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean);
|
||||
(void *, const char *, debug_type, enum debug_visibility, bool,
|
||||
bool);
|
||||
|
||||
/* Name a type. This returns a new type with an attached name. */
|
||||
|
||||
@ -707,7 +704,7 @@ extern debug_type debug_tag_type (void *, const char *, debug_type);
|
||||
|
||||
/* Record the size of a given type. */
|
||||
|
||||
extern bfd_boolean debug_record_type_size (void *, debug_type, unsigned int);
|
||||
extern bool debug_record_type_size (void *, debug_type, unsigned int);
|
||||
|
||||
/* Find a named type. */
|
||||
|
||||
@ -738,11 +735,11 @@ extern debug_type debug_get_return_type (void *, 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
|
||||
bfd_boolean which is set to TRUE if the function takes a variable
|
||||
bool which is set to TRUE if the function takes a variable
|
||||
number of arguments. */
|
||||
|
||||
extern const debug_type *debug_get_parameter_types
|
||||
(void *, debug_type, bfd_boolean *);
|
||||
(void *, debug_type, bool *);
|
||||
|
||||
/* Get the target type of a pointer or reference or const or volatile
|
||||
type. */
|
||||
@ -786,7 +783,7 @@ extern const char *debug_get_field_physname (void *, debug_field);
|
||||
first void * is the debugging handle. The second void * is a handle
|
||||
which is passed to the functions. */
|
||||
|
||||
extern bfd_boolean debug_write
|
||||
extern bool debug_write
|
||||
(void *, const struct debug_write_fns *, void *);
|
||||
|
||||
#endif /* DEBUG_H */
|
||||
|
@ -355,7 +355,7 @@ static char *exp_name;
|
||||
static char *imp_name;
|
||||
static char *delayimp_name;
|
||||
static char *identify_imp_name;
|
||||
static bfd_boolean identify_strict;
|
||||
static bool identify_strict;
|
||||
|
||||
/* Types used to implement a linked list of dllnames associated
|
||||
with the specified import lib. Used by the identify_* code.
|
||||
@ -376,14 +376,14 @@ typedef struct dll_name_list_t
|
||||
/* Types used to pass data to iterator functions. */
|
||||
typedef struct symname_search_data_t
|
||||
{
|
||||
const char * symname;
|
||||
bfd_boolean found;
|
||||
const char *symname;
|
||||
bool found;
|
||||
} symname_search_data_type;
|
||||
|
||||
typedef struct identify_data_t
|
||||
{
|
||||
dll_name_list_type * list;
|
||||
bfd_boolean ms_style_implib;
|
||||
dll_name_list_type *list;
|
||||
bool ms_style_implib;
|
||||
} identify_data_type;
|
||||
|
||||
|
||||
@ -403,23 +403,23 @@ static int dontdeltemps = 0;
|
||||
|
||||
/* TRUE if we should export all symbols. Otherwise, we only export
|
||||
symbols listed in .drectve sections or in the def file. */
|
||||
static bfd_boolean export_all_symbols;
|
||||
static bool export_all_symbols;
|
||||
|
||||
/* TRUE if we should exclude the symbols in DEFAULT_EXCLUDES when
|
||||
exporting all symbols. */
|
||||
static bfd_boolean do_default_excludes = TRUE;
|
||||
static bool do_default_excludes = true;
|
||||
|
||||
static bfd_boolean use_nul_prefixed_import_tables = FALSE;
|
||||
static bool use_nul_prefixed_import_tables = false;
|
||||
|
||||
/* 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
|
||||
compatibility to old Cygwin releases. */
|
||||
static bfd_boolean create_compat_implib;
|
||||
static bool create_compat_implib;
|
||||
|
||||
/* TRUE if we have to write PE+ import libraries. */
|
||||
static bfd_boolean create_for_pep;
|
||||
static bool create_for_pep;
|
||||
|
||||
static char *def_file;
|
||||
|
||||
@ -611,7 +611,7 @@ struct mac
|
||||
int how_dljtab_roff1; /* Offset for the ind 32 reloc into idata 5. */
|
||||
int how_dljtab_roff2; /* Offset for the ind 32 reloc into idata 5. */
|
||||
int how_dljtab_roff3; /* Offset for the ind 32 reloc into idata 5. */
|
||||
bfd_boolean how_seh;
|
||||
bool how_seh;
|
||||
const char *trampoline;
|
||||
};
|
||||
|
||||
@ -625,7 +625,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
|
||||
"pe-arm-little", bfd_arch_arm,
|
||||
arm_jtab, sizeof (arm_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -634,7 +634,7 @@ mtable[] =
|
||||
"jmp *", ".global", ".space", ".align\t2",".align\t4", "",
|
||||
"pe-i386",bfd_arch_i386,
|
||||
i386_jtab, sizeof (i386_jtab), 2,
|
||||
i386_dljtab, sizeof (i386_dljtab), 2, 7, 12, FALSE, i386_trampoline
|
||||
i386_dljtab, sizeof (i386_dljtab), 2, 7, 12, false, i386_trampoline
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -644,7 +644,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
|
||||
"pe-arm-little", bfd_arch_arm,
|
||||
thumb_jtab, sizeof (thumb_jtab), 12,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
#define MARM_INTERWORK 3
|
||||
@ -654,7 +654,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
|
||||
"pe-arm-little", bfd_arch_arm,
|
||||
arm_interwork_jtab, sizeof (arm_interwork_jtab), 12,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -664,7 +664,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "",
|
||||
"pe-mcore-big", bfd_arch_mcore,
|
||||
mcore_be_jtab, sizeof (mcore_be_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -674,7 +674,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-EL",
|
||||
"pe-mcore-little", bfd_arch_mcore,
|
||||
mcore_le_jtab, sizeof (mcore_le_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -684,7 +684,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "",
|
||||
"elf32-mcore-big", bfd_arch_mcore,
|
||||
mcore_be_jtab, sizeof (mcore_be_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -694,7 +694,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-EL",
|
||||
"elf32-mcore-little", bfd_arch_mcore,
|
||||
mcore_le_jtab, sizeof (mcore_le_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -704,7 +704,7 @@ mtable[] =
|
||||
".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
|
||||
"pe-arm-wince-little", bfd_arch_arm,
|
||||
arm_jtab, sizeof (arm_jtab), 8,
|
||||
0, 0, 0, 0, 0, FALSE, 0
|
||||
0, 0, 0, 0, 0, false, 0
|
||||
}
|
||||
,
|
||||
{
|
||||
@ -713,7 +713,7 @@ mtable[] =
|
||||
"jmp *", ".global", ".space", ".align\t2",".align\t4", "",
|
||||
"pe-x86-64",bfd_arch_i386,
|
||||
i386_jtab, sizeof (i386_jtab), 2,
|
||||
i386_x64_dljtab, sizeof (i386_x64_dljtab), 2, 9, 14, TRUE, i386_x64_trampoline
|
||||
i386_x64_dljtab, sizeof (i386_x64_dljtab), 2, 9, 14, true, i386_x64_trampoline
|
||||
}
|
||||
,
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
||||
@ -762,7 +762,7 @@ static void run (const char *, char *);
|
||||
static void scan_drectve_symbols (bfd *);
|
||||
static void scan_filtered_symbols (bfd *, void *, long, unsigned int);
|
||||
static void add_excludes (const char *);
|
||||
static bfd_boolean match_exclude (const char *);
|
||||
static bool match_exclude (const char *);
|
||||
static void set_default_excludes (void);
|
||||
static long filter_symbols (bfd *, void *, long, unsigned int);
|
||||
static void scan_all_symbols (bfd *);
|
||||
@ -793,7 +793,7 @@ static void identify_dll_for_implib (void);
|
||||
static void identify_search_archive
|
||||
(bfd *, void (*) (bfd *, bfd *, void *), void *);
|
||||
static void identify_search_member (bfd *, bfd *, void *);
|
||||
static bfd_boolean identify_process_section_p (asection *, bfd_boolean);
|
||||
static bool identify_process_section_p (asection *, bool);
|
||||
static void identify_search_section (bfd *, asection *, void *);
|
||||
static void identify_member_contains_symname (bfd *, bfd *, void *);
|
||||
|
||||
@ -1445,7 +1445,7 @@ scan_filtered_symbols (bfd *abfd, void *minisyms, long symcount,
|
||||
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));
|
||||
|
||||
@ -1504,15 +1504,15 @@ add_excludes (const char *new_excludes)
|
||||
|
||||
/* See if STRING is on the list of symbols to exclude. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
match_exclude (const char *string)
|
||||
{
|
||||
struct string_list *excl_item;
|
||||
|
||||
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. */
|
||||
@ -1544,7 +1544,7 @@ filter_symbols (bfd *abfd, void *minisyms, long symcount, unsigned int size)
|
||||
int keep = 0;
|
||||
asymbol *sym;
|
||||
|
||||
sym = bfd_minisymbol_to_symbol (abfd, FALSE, (const void *) from, store);
|
||||
sym = bfd_minisymbol_to_symbol (abfd, false, (const void *) from, store);
|
||||
if (sym == NULL)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
|
||||
@ -1589,7 +1589,7 @@ scan_all_symbols (bfd *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));
|
||||
|
||||
@ -3195,7 +3195,7 @@ identify_member_contains_symname (bfd * abfd,
|
||||
search_data->symname,
|
||||
strlen (search_data->symname)) == 0)
|
||||
{
|
||||
search_data->found = TRUE;
|
||||
search_data->found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3229,11 +3229,11 @@ identify_dll_for_implib (void)
|
||||
|
||||
/* Initialize identify_data. */
|
||||
identify_data.list = dll_name_list_create ();
|
||||
identify_data.ms_style_implib = FALSE;
|
||||
identify_data.ms_style_implib = false;
|
||||
|
||||
/* Initialize search_data. */
|
||||
search_data.symname = "__NULL_IMPORT_DESCRIPTOR";
|
||||
search_data.found = FALSE;
|
||||
search_data.found = false;
|
||||
|
||||
if (bfd_init () != BFD_INIT_MAGIC)
|
||||
fatal (_("fatal error: libbfd ABI mismatch"));
|
||||
@ -3257,7 +3257,7 @@ identify_dll_for_implib (void)
|
||||
identify_member_contains_symname,
|
||||
(void *)(& search_data));
|
||||
if (search_data.found)
|
||||
identify_data.ms_style_implib = TRUE;
|
||||
identify_data.ms_style_implib = true;
|
||||
|
||||
/* Rewind the bfd. */
|
||||
if (! bfd_close (abfd))
|
||||
@ -3372,8 +3372,8 @@ identify_search_member (bfd *abfd,
|
||||
By default, this is .idata$7 (.idata$6 if the import library is
|
||||
ms-style). */
|
||||
|
||||
static bfd_boolean
|
||||
identify_process_section_p (asection * section, bfd_boolean ms_style_implib)
|
||||
static bool
|
||||
identify_process_section_p (asection * section, bool ms_style_implib)
|
||||
{
|
||||
static const char * SECTION_NAME = ".idata$7";
|
||||
static const char * MS_SECTION_NAME = ".idata$6";
|
||||
@ -3382,8 +3382,8 @@ identify_process_section_p (asection * section, bfd_boolean ms_style_implib)
|
||||
(ms_style_implib ? MS_SECTION_NAME : SECTION_NAME);
|
||||
|
||||
if (strcmp (section_name, section->name) == 0)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If *section has contents and its name is .idata$7 (.idata$6 if
|
||||
@ -3396,7 +3396,7 @@ identify_search_section (bfd * abfd, asection * section, void * obj)
|
||||
bfd_byte *data = 0;
|
||||
bfd_size_type datasize;
|
||||
identify_data_type * identify_data = (identify_data_type *)obj;
|
||||
bfd_boolean ms_style = identify_data->ms_style_implib;
|
||||
bool ms_style = identify_data->ms_style_implib;
|
||||
|
||||
if ((section->flags & SEC_HAS_CONTENTS) == 0)
|
||||
return;
|
||||
@ -3803,19 +3803,19 @@ main (int ac, char **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 OPTION_USE_NUL_PREFIXED_IMPORT_TABLES:
|
||||
use_nul_prefixed_import_tables = TRUE;
|
||||
use_nul_prefixed_import_tables = true;
|
||||
break;
|
||||
case OPTION_ADD_STDCALL_UNDERSCORE:
|
||||
add_stdcall_underscore = 1;
|
||||
@ -3980,7 +3980,7 @@ main (int ac, char **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 ();
|
||||
|
360
binutils/dwarf.c
360
binutils/dwarf.c
@ -78,8 +78,8 @@ typedef struct dwo_info
|
||||
struct dwo_info * next;
|
||||
} dwo_info;
|
||||
|
||||
static dwo_info * first_dwo_info = NULL;
|
||||
static bfd_boolean need_dwo_info;
|
||||
static dwo_info *first_dwo_info = NULL;
|
||||
static bool need_dwo_info;
|
||||
|
||||
separate_info * first_separate_info = NULL;
|
||||
|
||||
@ -107,7 +107,7 @@ int do_debug_cu_index;
|
||||
int do_wide;
|
||||
int do_debug_links;
|
||||
int do_follow_links = DEFAULT_FOR_FOLLOW_LINKS;
|
||||
bfd_boolean do_checks;
|
||||
bool do_checks;
|
||||
|
||||
int dwarf_cutoff_level = -1;
|
||||
unsigned long dwarf_start_die;
|
||||
@ -145,13 +145,13 @@ static int tu_count = 0;
|
||||
static struct cu_tu_set *cu_sets = NULL;
|
||||
static struct cu_tu_set *tu_sets = NULL;
|
||||
|
||||
static bfd_boolean load_cu_tu_indexes (void *);
|
||||
static bool load_cu_tu_indexes (void *);
|
||||
|
||||
/* An array that indicates for a given level of CU nesting whether
|
||||
the latest DW_AT_type seen for that level was a signed type or
|
||||
an unsigned type. */
|
||||
#define MAX_CU_NESTING (1 << 8)
|
||||
static bfd_boolean level_type_signed[MAX_CU_NESTING];
|
||||
static bool level_type_signed[MAX_CU_NESTING];
|
||||
|
||||
/* Values for do_debug_lines. */
|
||||
#define FLAG_DEBUG_LINES_RAW 1
|
||||
@ -341,7 +341,7 @@ dwarf_vmatoa64 (dwarf_vma hvalue, dwarf_vma lvalue, char *buf,
|
||||
dwarf_vma
|
||||
read_leb128 (unsigned char *data,
|
||||
const unsigned char *const end,
|
||||
bfd_boolean sign,
|
||||
bool sign,
|
||||
unsigned int *length_return,
|
||||
int *status_return)
|
||||
{
|
||||
@ -737,7 +737,7 @@ fetch_indirect_line_string (dwarf_vma offset)
|
||||
|
||||
static const char *
|
||||
fetch_indexed_string (dwarf_vma idx, struct cu_tu_set *this_set,
|
||||
dwarf_vma offset_size, bfd_boolean dwo)
|
||||
dwarf_vma offset_size, bool dwo)
|
||||
{
|
||||
enum dwarf_section_display_enum str_sec_idx = dwo ? str_dwo : str;
|
||||
enum dwarf_section_display_enum idx_sec_idx = dwo ? str_index_dwo : str_index;
|
||||
@ -2214,20 +2214,20 @@ get_type_abbrev_from_form (unsigned long form,
|
||||
found starting at DATA. */
|
||||
|
||||
static void
|
||||
get_type_signedness (abbrev_entry * entry,
|
||||
const struct dwarf_section * section,
|
||||
unsigned char * data,
|
||||
unsigned const char * end,
|
||||
dwarf_vma cu_offset,
|
||||
dwarf_vma pointer_size,
|
||||
dwarf_vma offset_size,
|
||||
int dwarf_version,
|
||||
bfd_boolean * is_signed,
|
||||
unsigned int nesting)
|
||||
get_type_signedness (abbrev_entry *entry,
|
||||
const struct dwarf_section *section,
|
||||
unsigned char *data,
|
||||
unsigned const char *end,
|
||||
dwarf_vma cu_offset,
|
||||
dwarf_vma pointer_size,
|
||||
dwarf_vma offset_size,
|
||||
int dwarf_version,
|
||||
bool *is_signed,
|
||||
unsigned int nesting)
|
||||
{
|
||||
abbrev_attr * attr;
|
||||
|
||||
* is_signed = FALSE;
|
||||
* is_signed = false;
|
||||
|
||||
#define MAX_NESTING 20
|
||||
if (nesting > MAX_NESTING)
|
||||
@ -2295,7 +2295,7 @@ get_type_signedness (abbrev_entry * entry,
|
||||
case DW_ATE_unsigned:
|
||||
case DW_ATE_unsigned_char:
|
||||
case DW_ATE_unsigned_fixed:
|
||||
* is_signed = FALSE;
|
||||
* is_signed = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -2306,7 +2306,7 @@ get_type_signedness (abbrev_entry * entry,
|
||||
case DW_ATE_imaginary_float:
|
||||
case DW_ATE_decimal_float:
|
||||
case DW_ATE_signed_fixed:
|
||||
* is_signed = TRUE;
|
||||
* is_signed = true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2315,10 +2315,10 @@ get_type_signedness (abbrev_entry * entry,
|
||||
}
|
||||
|
||||
static void
|
||||
read_and_print_leb128 (unsigned char * data,
|
||||
unsigned int * bytes_read,
|
||||
unsigned const char * end,
|
||||
bfd_boolean is_signed)
|
||||
read_and_print_leb128 (unsigned char *data,
|
||||
unsigned int *bytes_read,
|
||||
unsigned const char *end,
|
||||
bool is_signed)
|
||||
{
|
||||
int status;
|
||||
dwarf_vma val = read_leb128 (data, end, is_signed, bytes_read, &status);
|
||||
@ -2363,9 +2363,9 @@ display_discr_list (unsigned long form,
|
||||
return;
|
||||
}
|
||||
|
||||
bfd_boolean is_signed =
|
||||
bool is_signed =
|
||||
(level > 0 && level <= MAX_CU_NESTING)
|
||||
? level_type_signed [level - 1] : FALSE;
|
||||
? level_type_signed [level - 1] : false;
|
||||
|
||||
printf ("(");
|
||||
while (uvalue)
|
||||
@ -2728,7 +2728,7 @@ read_and_display_attr_value (unsigned long attribute,
|
||||
if (!do_loc)
|
||||
{
|
||||
const char *suffix = strrchr (section->name, '.');
|
||||
bfd_boolean dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||
bool dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||
|
||||
if (do_wide)
|
||||
/* We have already displayed the form name. */
|
||||
@ -2953,7 +2953,7 @@ read_and_display_attr_value (unsigned long attribute,
|
||||
case DW_FORM_strx2:
|
||||
case DW_FORM_strx3:
|
||||
case DW_FORM_strx4:
|
||||
add_dwo_name (fetch_indexed_string (uvalue, this_set, offset_size, FALSE), cu_offset);
|
||||
add_dwo_name (fetch_indexed_string (uvalue, this_set, offset_size, false), cu_offset);
|
||||
break;
|
||||
case DW_FORM_string:
|
||||
add_dwo_name ((const char *) orig_data, cu_offset);
|
||||
@ -2985,7 +2985,7 @@ read_and_display_attr_value (unsigned long attribute,
|
||||
case DW_FORM_strx2:
|
||||
case DW_FORM_strx3:
|
||||
case DW_FORM_strx4:
|
||||
add_dwo_dir (fetch_indexed_string (uvalue, this_set, offset_size, FALSE), cu_offset);
|
||||
add_dwo_dir (fetch_indexed_string (uvalue, this_set, offset_size, false), cu_offset);
|
||||
break;
|
||||
case DW_FORM_string:
|
||||
add_dwo_dir ((const char *) orig_data, cu_offset);
|
||||
@ -3027,10 +3027,10 @@ read_and_display_attr_value (unsigned long attribute,
|
||||
if (level >= 0 && level < MAX_CU_NESTING
|
||||
&& uvalue < (size_t) (end - start))
|
||||
{
|
||||
bfd_boolean is_signed = FALSE;
|
||||
abbrev_entry * type_abbrev;
|
||||
unsigned char * type_data;
|
||||
unsigned long type_cu_offset;
|
||||
bool is_signed = false;
|
||||
abbrev_entry *type_abbrev;
|
||||
unsigned char *type_data;
|
||||
unsigned long type_cu_offset;
|
||||
|
||||
type_abbrev = get_type_abbrev_from_form (form, uvalue, cu_offset,
|
||||
section, NULL, & type_data, & type_cu_offset);
|
||||
@ -3422,7 +3422,7 @@ read_and_display_attr (unsigned long attribute,
|
||||
following debug links, then attempt to load the requested section
|
||||
from one of the separate debug info files. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
load_debug_section_with_follow (enum dwarf_section_display_enum sec_enum,
|
||||
void * handle)
|
||||
{
|
||||
@ -3441,7 +3441,7 @@ load_debug_section_with_follow (enum dwarf_section_display_enum sec_enum,
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (do_follow_links)
|
||||
@ -3456,16 +3456,16 @@ load_debug_section_with_follow (enum dwarf_section_display_enum sec_enum,
|
||||
|
||||
/* FIXME: We should check to see if any of the remaining debug info
|
||||
files also contain this section, and, umm, do something about it. */
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
introduce (struct dwarf_section * section, bfd_boolean raw)
|
||||
introduce (struct dwarf_section * section, bool raw)
|
||||
{
|
||||
if (raw)
|
||||
{
|
||||
@ -3495,12 +3495,12 @@ introduce (struct dwarf_section * section, bfd_boolean raw)
|
||||
Returns TRUE upon success. Otherwise an error or warning message is
|
||||
printed and FALSE is returned. */
|
||||
|
||||
static bfd_boolean
|
||||
process_debug_info (struct dwarf_section * section,
|
||||
void * file,
|
||||
enum dwarf_section_display_enum abbrev_sec,
|
||||
bfd_boolean do_loc,
|
||||
bfd_boolean do_types)
|
||||
static bool
|
||||
process_debug_info (struct dwarf_section * section,
|
||||
void *file,
|
||||
enum dwarf_section_display_enum abbrev_sec,
|
||||
bool do_loc,
|
||||
bool do_types)
|
||||
{
|
||||
unsigned char *start = section->start;
|
||||
unsigned char *end = start + section->size;
|
||||
@ -3532,7 +3532,7 @@ process_debug_info (struct dwarf_section * section,
|
||||
{
|
||||
warn (_("Reserved length value (0x%s) found in section %s\n"),
|
||||
dwarf_vmatoa ("x", length), section->name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
section_begin += length + 4;
|
||||
@ -3544,14 +3544,14 @@ process_debug_info (struct dwarf_section * section,
|
||||
{
|
||||
warn (_("Corrupt unit length (0x%s) found in section %s\n"),
|
||||
dwarf_vmatoa ("x", length), section->name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_units == 0)
|
||||
{
|
||||
error (_("No comp units in %s section ?\n"), section->name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Then allocate an array to hold the information. */
|
||||
@ -3562,7 +3562,7 @@ process_debug_info (struct dwarf_section * section,
|
||||
error (_("Not enough memory for a debug info array of %u entries\n"),
|
||||
num_units);
|
||||
alloc_num_debug_info_entries = num_debug_info_entries = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* PR 17531: file: 92ca3797.
|
||||
@ -3590,11 +3590,11 @@ process_debug_info (struct dwarf_section * section,
|
||||
{
|
||||
warn (_("Unable to locate %s section!\n"),
|
||||
debug_displays [abbrev_sec].section.uncompressed_name);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!do_loc && dwarf_start_die == 0)
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
free_all_abbrevs ();
|
||||
free (cu_abbrev_map);
|
||||
@ -3765,13 +3765,13 @@ process_debug_info (struct dwarf_section * section,
|
||||
if (compunit.cu_version < 5)
|
||||
SAFE_BYTE_GET_AND_INC (compunit.cu_pointer_size, hdrptr, 1, end);
|
||||
|
||||
bfd_boolean do_dwo_id = FALSE;
|
||||
bool do_dwo_id = false;
|
||||
uint64_t dwo_id = 0;
|
||||
if (compunit.cu_unit_type == DW_UT_split_compile
|
||||
|| compunit.cu_unit_type == DW_UT_skeleton)
|
||||
{
|
||||
SAFE_BYTE_GET_AND_INC (dwo_id, hdrptr, 8, end);
|
||||
do_dwo_id = TRUE;
|
||||
do_dwo_id = true;
|
||||
}
|
||||
|
||||
/* PR 17512: file: 001-108546-0.001:0.1. */
|
||||
@ -3985,7 +3985,7 @@ process_debug_info (struct dwarf_section * section,
|
||||
}
|
||||
}
|
||||
if (dwarf_start_die != 0 && level < saved_level)
|
||||
return TRUE;
|
||||
return true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -4027,7 +4027,7 @@ process_debug_info (struct dwarf_section * section,
|
||||
}
|
||||
warn (_("DIE at offset 0x%lx refers to abbreviation number %lu which does not exist\n"),
|
||||
die_offset, abbrev_number);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!do_loc && do_printing)
|
||||
@ -4127,7 +4127,7 @@ process_debug_info (struct dwarf_section * section,
|
||||
if (!do_loc)
|
||||
printf ("\n");
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Locate and scan the .debug_info section in the file and record the pointer
|
||||
@ -4152,12 +4152,12 @@ load_debug_info (void * file)
|
||||
(void) load_cu_tu_indexes (file);
|
||||
|
||||
if (load_debug_section_with_follow (info, file)
|
||||
&& process_debug_info (&debug_displays [info].section, file, abbrev, TRUE, FALSE))
|
||||
&& process_debug_info (&debug_displays [info].section, file, abbrev, true, false))
|
||||
return num_debug_info_entries;
|
||||
|
||||
if (load_debug_section_with_follow (info_dwo, file)
|
||||
&& process_debug_info (&debug_displays [info_dwo].section, file,
|
||||
abbrev_dwo, TRUE, FALSE))
|
||||
abbrev_dwo, true, false))
|
||||
return num_debug_info_entries;
|
||||
|
||||
num_debug_info_entries = DEBUG_INFO_UNAVAILABLE;
|
||||
@ -4282,12 +4282,12 @@ read_debug_line_header (struct dwarf_section * section,
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
display_formatted_table (unsigned char * data,
|
||||
unsigned char * start,
|
||||
unsigned char * end,
|
||||
const DWARF2_Internal_LineInfo * linfo,
|
||||
struct dwarf_section * section,
|
||||
bfd_boolean is_dir)
|
||||
display_formatted_table (unsigned char *data,
|
||||
unsigned char *start,
|
||||
unsigned char *end,
|
||||
const DWARF2_Internal_LineInfo *linfo,
|
||||
struct dwarf_section *section,
|
||||
bool is_dir)
|
||||
{
|
||||
unsigned char *format_start, format_count, *format, formati;
|
||||
dwarf_vma data_count, datai;
|
||||
@ -4421,7 +4421,7 @@ display_debug_sup (struct dwarf_section * section,
|
||||
dwarf_vma checksum_len;
|
||||
|
||||
|
||||
introduce (section, TRUE);
|
||||
introduce (section, true);
|
||||
if (section->size < 4)
|
||||
{
|
||||
error (_("corrupt .debug_sup section: size is too small\n"));
|
||||
@ -4449,7 +4449,7 @@ display_debug_sup (struct dwarf_section * section,
|
||||
}
|
||||
start += sup_filename_len + 1;
|
||||
|
||||
checksum_len = read_leb128 (start, end, FALSE /* unsigned */, & num_read, & status);
|
||||
checksum_len = read_leb128 (start, end, false /* unsigned */, & num_read, & status);
|
||||
if (status)
|
||||
{
|
||||
error (_("corrupt .debug_sup section: bad LEB128 field for checksum length\n"));
|
||||
@ -4490,7 +4490,7 @@ display_debug_lines_raw (struct dwarf_section * section,
|
||||
unsigned char *start = section->start;
|
||||
int verbose_view = 0;
|
||||
|
||||
introduce (section, TRUE);
|
||||
introduce (section, true);
|
||||
|
||||
while (data < end)
|
||||
{
|
||||
@ -4586,9 +4586,9 @@ display_debug_lines_raw (struct dwarf_section * section,
|
||||
load_debug_section_with_follow (line_str, file);
|
||||
|
||||
data = display_formatted_table (data, start, end, &linfo, section,
|
||||
TRUE);
|
||||
true);
|
||||
data = display_formatted_table (data, start, end, &linfo, section,
|
||||
FALSE);
|
||||
false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4910,7 +4910,7 @@ display_debug_lines_decoded (struct dwarf_section * section,
|
||||
{
|
||||
static DWARF2_Internal_LineInfo saved_linfo;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (data < end)
|
||||
{
|
||||
@ -5738,7 +5738,7 @@ display_debug_pubnames_worker (struct dwarf_section *section,
|
||||
we test for that later on. */
|
||||
load_debug_info (file);
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (start < end)
|
||||
{
|
||||
@ -5883,7 +5883,7 @@ display_debug_macinfo (struct dwarf_section *section,
|
||||
unsigned char *curr = start;
|
||||
enum dwarf_macinfo_record_type op;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (curr < end)
|
||||
{
|
||||
@ -6045,17 +6045,17 @@ display_debug_macro (struct dwarf_section *section,
|
||||
unsigned char *end = start + section->size;
|
||||
unsigned char *curr = start;
|
||||
unsigned char *extended_op_buf[256];
|
||||
bfd_boolean is_dwo = FALSE;
|
||||
bool is_dwo = false;
|
||||
const char *suffix = strrchr (section->name, '.');
|
||||
|
||||
if (suffix && strcmp (suffix, ".dwo") == 0)
|
||||
is_dwo = TRUE;
|
||||
is_dwo = true;
|
||||
|
||||
load_debug_section_with_follow (str, file);
|
||||
load_debug_section_with_follow (line, file);
|
||||
load_debug_section_with_follow (str_index, file);
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (curr < end)
|
||||
{
|
||||
@ -6257,7 +6257,7 @@ display_debug_macro (struct dwarf_section *section,
|
||||
READ_ULEB (lineno, curr, end);
|
||||
READ_ULEB (offset, curr, end);
|
||||
string = (const unsigned char *)
|
||||
fetch_indexed_string (offset, NULL, offset_size, FALSE);
|
||||
fetch_indexed_string (offset, NULL, offset_size, false);
|
||||
if (op == DW_MACRO_define_strx)
|
||||
printf (" DW_MACRO_define_strx ");
|
||||
else
|
||||
@ -6326,7 +6326,7 @@ display_debug_abbrev (struct dwarf_section *section,
|
||||
unsigned char *start = section->start;
|
||||
const unsigned char *end = start + section->size;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
do
|
||||
{
|
||||
@ -6379,7 +6379,7 @@ display_debug_abbrev (struct dwarf_section *section,
|
||||
/* Return true when ADDR is the maximum address, when addresses are
|
||||
POINTER_SIZE bytes long. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
is_max_address (dwarf_vma addr, unsigned int pointer_size)
|
||||
{
|
||||
dwarf_vma mask = ~(~(dwarf_vma) 1 << (pointer_size * 8 - 1));
|
||||
@ -6944,12 +6944,12 @@ display_debug_loc (struct dwarf_section *section, void *file)
|
||||
unsigned char *next = start, *vnext = vstart;
|
||||
unsigned int *array = NULL;
|
||||
const char *suffix = strrchr (section->name, '.');
|
||||
bfd_boolean is_dwo = FALSE;
|
||||
bool is_dwo = false;
|
||||
int is_loclists = strstr (section->name, "debug_loclists") != NULL;
|
||||
dwarf_vma expected_start = 0;
|
||||
|
||||
if (suffix && strcmp (suffix, ".dwo") == 0)
|
||||
is_dwo = TRUE;
|
||||
is_dwo = true;
|
||||
|
||||
bytes = section->size;
|
||||
|
||||
@ -7066,7 +7066,7 @@ display_debug_loc (struct dwarf_section *section, void *file)
|
||||
if (!locs_sorted)
|
||||
array = (unsigned int *) xcmalloc (num_loc_list, sizeof (unsigned int));
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
if (reloc_at (section, 0))
|
||||
printf (_(" Warning: This section has relocations - addresses seen here may not be accurate.\n\n"));
|
||||
@ -7212,7 +7212,7 @@ display_debug_str (struct dwarf_section *section,
|
||||
return 0;
|
||||
}
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (bytes)
|
||||
{
|
||||
@ -7259,19 +7259,19 @@ display_debug_str (struct dwarf_section *section,
|
||||
static int
|
||||
display_debug_info (struct dwarf_section *section, void *file)
|
||||
{
|
||||
return process_debug_info (section, file, section->abbrev_sec, FALSE, FALSE);
|
||||
return process_debug_info (section, file, section->abbrev_sec, false, false);
|
||||
}
|
||||
|
||||
static int
|
||||
display_debug_types (struct dwarf_section *section, void *file)
|
||||
{
|
||||
return process_debug_info (section, file, section->abbrev_sec, FALSE, TRUE);
|
||||
return process_debug_info (section, file, section->abbrev_sec, false, true);
|
||||
}
|
||||
|
||||
static int
|
||||
display_trace_info (struct dwarf_section *section, void *file)
|
||||
{
|
||||
return process_debug_info (section, file, section->abbrev_sec, FALSE, TRUE);
|
||||
return process_debug_info (section, file, section->abbrev_sec, false, true);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -7281,7 +7281,7 @@ display_debug_aranges (struct dwarf_section *section,
|
||||
unsigned char *start = section->start;
|
||||
unsigned char *end = start + section->size;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
/* It does not matter if this load fails,
|
||||
we test for that later on. */
|
||||
@ -7441,7 +7441,7 @@ display_debug_addr (struct dwarf_section *section,
|
||||
return 0;
|
||||
}
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
/* PR 17531: file: cf38d01b.
|
||||
We use xcalloc because a corrupt file may not have initialised all of the
|
||||
@ -7546,14 +7546,14 @@ display_debug_str_offsets (struct dwarf_section *section,
|
||||
unsigned char *curr = start;
|
||||
|
||||
const char *suffix = strrchr (section->name, '.');
|
||||
bfd_boolean dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||
bool dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||
|
||||
if (dwo)
|
||||
load_debug_section_with_follow (str_dwo, file);
|
||||
else
|
||||
load_debug_section_with_follow (str, file);
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (curr < end)
|
||||
{
|
||||
@ -7925,7 +7925,7 @@ display_debug_ranges (struct dwarf_section *section,
|
||||
warn (_("Range lists in %s section start at 0x%lx\n"),
|
||||
section->name, (unsigned long) range_entries[0].ranges_offset);
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
printf (_(" Offset Begin End\n"));
|
||||
|
||||
@ -8667,12 +8667,12 @@ display_debug_frames (struct dwarf_section *section,
|
||||
Frame_Chunk *chunks = NULL, *forward_refs = NULL;
|
||||
Frame_Chunk *remembered_state = NULL;
|
||||
Frame_Chunk *rs;
|
||||
bfd_boolean is_eh = strcmp (section->name, ".eh_frame") == 0;
|
||||
bool is_eh = strcmp (section->name, ".eh_frame") == 0;
|
||||
unsigned int max_regs = 0;
|
||||
const char *bad_reg = _("bad register: ");
|
||||
unsigned int saved_eh_addr_size = eh_addr_size;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
while (start < end)
|
||||
{
|
||||
@ -8688,7 +8688,7 @@ display_debug_frames (struct dwarf_section *section,
|
||||
unsigned int encoded_ptr_size = saved_eh_addr_size;
|
||||
unsigned int offset_size;
|
||||
unsigned int initial_length_size;
|
||||
bfd_boolean all_nops;
|
||||
bool all_nops;
|
||||
static Frame_Chunk fde_fc;
|
||||
|
||||
saved_start = start;
|
||||
@ -9117,7 +9117,7 @@ display_debug_frames (struct dwarf_section *section,
|
||||
start = tmp;
|
||||
}
|
||||
|
||||
all_nops = TRUE;
|
||||
all_nops = true;
|
||||
|
||||
/* Now we know what registers are used, make a second pass over
|
||||
the chunk, this time actually printing out the info. */
|
||||
@ -9143,7 +9143,7 @@ display_debug_frames (struct dwarf_section *section,
|
||||
|
||||
/* Make a note if something other than DW_CFA_nop happens. */
|
||||
if (op != DW_CFA_nop)
|
||||
all_nops = FALSE;
|
||||
all_nops = false;
|
||||
|
||||
/* Warning: if you add any more cases to this switch, be
|
||||
sure to add them to the corresponding switch above. */
|
||||
@ -9654,7 +9654,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
const unsigned char *const section_end = section->start + section->size;
|
||||
unsigned char *unit_end;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
load_debug_section_with_follow (str, file);
|
||||
|
||||
@ -9667,7 +9667,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
uint32_t augmentation_string_size;
|
||||
unsigned int i;
|
||||
unsigned long sec_off;
|
||||
bfd_boolean augmentation_printable;
|
||||
bool augmentation_printable;
|
||||
const char *augmentation_string;
|
||||
|
||||
unit_start = hdrptr;
|
||||
@ -9735,7 +9735,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
|
||||
printf (_("Augmentation string:"));
|
||||
|
||||
augmentation_printable = TRUE;
|
||||
augmentation_printable = true;
|
||||
augmentation_string = (const char *) hdrptr;
|
||||
|
||||
for (i = 0; i < augmentation_string_size; i++)
|
||||
@ -9746,7 +9746,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
||||
printf (" %02x", uc);
|
||||
|
||||
if (uc != 0 && !ISPRINT (uc))
|
||||
augmentation_printable = FALSE;
|
||||
augmentation_printable = false;
|
||||
}
|
||||
|
||||
if (augmentation_printable)
|
||||
@ -10010,7 +10010,7 @@ display_debug_links (struct dwarf_section * section,
|
||||
const unsigned char * filename;
|
||||
unsigned int filelen;
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
/* The .gnu_debuglink section is formatted as:
|
||||
(c-string) Filename.
|
||||
@ -10093,7 +10093,7 @@ display_gdb_index (struct dwarf_section *section,
|
||||
|
||||
/* The documentation for the format of this file is in gdb/dwarf2read.c. */
|
||||
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
if (section->size < 6 * sizeof (uint32_t))
|
||||
{
|
||||
@ -10432,7 +10432,7 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
|
||||
|
||||
if (do_display)
|
||||
{
|
||||
introduce (section, FALSE);
|
||||
introduce (section, false);
|
||||
|
||||
printf (_(" Version: %u\n"), version);
|
||||
if (version >= 2)
|
||||
@ -10514,7 +10514,7 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
|
||||
unsigned char *poffsets = ppool + (size_t) ncols * 4;
|
||||
unsigned char *psizes = poffsets + (size_t) nused * ncols * 4;
|
||||
unsigned char *pend = psizes + (size_t) nused * ncols * 4;
|
||||
bfd_boolean is_tu_index;
|
||||
bool is_tu_index;
|
||||
struct cu_tu_set *this_set = NULL;
|
||||
unsigned int row;
|
||||
unsigned char *prow;
|
||||
@ -10706,25 +10706,25 @@ static int cu_tu_indexes_read = -1; /* Tri-state variable. */
|
||||
section sets that we can use to associate a .debug_info.dwo section
|
||||
with its associated .debug_abbrev.dwo section in a .dwp file. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
load_cu_tu_indexes (void *file)
|
||||
{
|
||||
/* If we have already loaded (or tried to load) the CU and TU indexes
|
||||
then do not bother to repeat the task. */
|
||||
if (cu_tu_indexes_read == -1)
|
||||
{
|
||||
cu_tu_indexes_read = TRUE;
|
||||
cu_tu_indexes_read = true;
|
||||
|
||||
if (load_debug_section_with_follow (dwp_cu_index, file))
|
||||
if (! process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0))
|
||||
cu_tu_indexes_read = FALSE;
|
||||
cu_tu_indexes_read = false;
|
||||
|
||||
if (load_debug_section_with_follow (dwp_tu_index, file))
|
||||
if (! process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0))
|
||||
cu_tu_indexes_read = FALSE;
|
||||
cu_tu_indexes_read = false;
|
||||
}
|
||||
|
||||
return (bfd_boolean) cu_tu_indexes_read;
|
||||
return (bool) cu_tu_indexes_read;
|
||||
}
|
||||
|
||||
/* Find the set of sections that includes section SHNDX. */
|
||||
@ -10905,10 +10905,10 @@ calc_gnu_debuglink_crc32 (unsigned long crc,
|
||||
return ~crc & 0xffffffff;
|
||||
}
|
||||
|
||||
typedef bfd_boolean (* check_func_type) (const char *, void *);
|
||||
typedef const char * (* parse_func_type) (struct dwarf_section *, void *);
|
||||
typedef bool (*check_func_type) (const char *, void *);
|
||||
typedef const char *(* parse_func_type) (struct dwarf_section *, void *);
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
||||
{
|
||||
static unsigned char buffer [8 * 1024];
|
||||
@ -10919,7 +10919,7 @@ check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
||||
|
||||
sep_data = open_debug_file (pathname);
|
||||
if (sep_data == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Yes - we are opening the file twice... */
|
||||
f = fopen (pathname, "rb");
|
||||
@ -10928,7 +10928,7 @@ check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
||||
/* Paranoia: This should never happen. */
|
||||
close_debug_file (sep_data);
|
||||
warn (_("Unable to reopen separate debug info file: %s\n"), pathname);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
while ((count = fread (buffer, 1, sizeof (buffer), f)) > 0)
|
||||
@ -10941,10 +10941,10 @@ check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
||||
close_debug_file (sep_data);
|
||||
warn (_("Separate debug info file %s found, but CRC does not match - ignoring\n"),
|
||||
pathname);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char *
|
||||
@ -10967,18 +10967,18 @@ parse_gnu_debuglink (struct dwarf_section * section, void * data)
|
||||
return name;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
check_gnu_debugaltlink (const char * filename, void * data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
void * sep_data = open_debug_file (filename);
|
||||
|
||||
if (sep_data == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* FIXME: We should now extract the build-id in the separate file
|
||||
and check it... */
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef struct build_id_data
|
||||
@ -11030,7 +11030,7 @@ add_separate_debug_file (const char * filename, void * handle)
|
||||
file. If successful, store the path of the file in filename and
|
||||
return TRUE, otherwise return FALSE. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
||||
char ** filename,
|
||||
void * file)
|
||||
@ -11052,16 +11052,16 @@ debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
||||
filelen = strnlen ((const char *)section->start, section->size);
|
||||
if (filelen == section->size)
|
||||
/* Corrupt debugaltlink. */
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
build_id = section->start + filelen + 1;
|
||||
build_id_len = section->size - (filelen + 1);
|
||||
|
||||
if (build_id_len == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (build_id)
|
||||
{
|
||||
@ -11070,7 +11070,7 @@ debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
||||
|
||||
client = debuginfod_begin ();
|
||||
if (client == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* Query debuginfod servers for the target file. If found its path
|
||||
will be stored in filename. */
|
||||
@ -11087,11 +11087,11 @@ debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
||||
/* File successfully retrieved. Close fd since we want to
|
||||
use open_debug_file () on filename instead. */
|
||||
close (fd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -11436,12 +11436,12 @@ check_for_and_load_links (void * file, const char * filename)
|
||||
If TRUE is returned then the linked list starting at first_separate_info
|
||||
will be populated with open file handles. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
load_separate_debug_files (void * file, const char * filename)
|
||||
{
|
||||
/* Skip this operation if we are not interested in debug links. */
|
||||
if (! do_follow_links && ! do_debug_links)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* See if there are any dwo links. */
|
||||
if (load_debug_section (str, file)
|
||||
@ -11451,13 +11451,13 @@ load_separate_debug_files (void * file, const char * filename)
|
||||
free_dwo_info ();
|
||||
|
||||
if (process_debug_info (& debug_displays[info].section, file, abbrev,
|
||||
TRUE, FALSE))
|
||||
true, false))
|
||||
{
|
||||
bfd_boolean introduced = FALSE;
|
||||
dwo_info * dwinfo;
|
||||
const char * dir = NULL;
|
||||
const char * id = NULL;
|
||||
const char * name = NULL;
|
||||
bool introduced = false;
|
||||
dwo_info *dwinfo;
|
||||
const char *dir = NULL;
|
||||
const char *id = NULL;
|
||||
const char *name = NULL;
|
||||
|
||||
for (dwinfo = first_dwo_info; dwinfo != NULL; dwinfo = dwinfo->next)
|
||||
{
|
||||
@ -11500,7 +11500,7 @@ load_separate_debug_files (void * file, const char * filename)
|
||||
{
|
||||
printf (_("The %s section contains link(s) to dwo file(s):\n\n"),
|
||||
debug_displays [info].section.uncompressed_name);
|
||||
introduced = TRUE;
|
||||
introduced = true;
|
||||
}
|
||||
|
||||
printf (_(" Name: %s\n"), name);
|
||||
@ -11524,7 +11524,7 @@ load_separate_debug_files (void * file, const char * filename)
|
||||
if (! do_follow_links)
|
||||
/* The other debug links will be displayed by display_debug_links()
|
||||
so we do not need to do any further processing here. */
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
/* FIXME: We do not check for the presence of both link sections in the same file. */
|
||||
/* FIXME: We do not check for the presence of multiple, same-name debuglink sections. */
|
||||
@ -11532,10 +11532,10 @@ load_separate_debug_files (void * file, const char * filename)
|
||||
|
||||
check_for_and_load_links (file, filename);
|
||||
if (first_separate_info != NULL)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
do_follow_links = 0;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -11753,53 +11753,53 @@ dwarf_select_sections_all (void)
|
||||
|
||||
struct dwarf_section_display debug_displays[] =
|
||||
{
|
||||
{ { ".debug_abbrev", ".zdebug_abbrev", NO_ABBREVS }, display_debug_abbrev, &do_debug_abbrevs, FALSE },
|
||||
{ { ".debug_aranges", ".zdebug_aranges", NO_ABBREVS }, display_debug_aranges, &do_debug_aranges, TRUE },
|
||||
{ { ".debug_frame", ".zdebug_frame", NO_ABBREVS }, display_debug_frames, &do_debug_frames, TRUE },
|
||||
{ { ".debug_info", ".zdebug_info", ABBREV (abbrev)}, display_debug_info, &do_debug_info, TRUE },
|
||||
{ { ".debug_line", ".zdebug_line", NO_ABBREVS }, display_debug_lines, &do_debug_lines, TRUE },
|
||||
{ { ".debug_pubnames", ".zdebug_pubnames", NO_ABBREVS }, display_debug_pubnames, &do_debug_pubnames, FALSE },
|
||||
{ { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NO_ABBREVS }, display_debug_gnu_pubnames, &do_debug_pubnames, FALSE },
|
||||
{ { ".eh_frame", "", NO_ABBREVS }, display_debug_frames, &do_debug_frames, TRUE },
|
||||
{ { ".debug_macinfo", ".zdebug_macinfo", NO_ABBREVS }, display_debug_macinfo, &do_debug_macinfo, FALSE },
|
||||
{ { ".debug_macro", ".zdebug_macro", NO_ABBREVS }, display_debug_macro, &do_debug_macinfo, TRUE },
|
||||
{ { ".debug_str", ".zdebug_str", NO_ABBREVS }, display_debug_str, &do_debug_str, FALSE },
|
||||
{ { ".debug_line_str", ".zdebug_line_str", NO_ABBREVS }, display_debug_str, &do_debug_str, FALSE },
|
||||
{ { ".debug_loc", ".zdebug_loc", NO_ABBREVS }, display_debug_loc, &do_debug_loc, TRUE },
|
||||
{ { ".debug_loclists", ".zdebug_loclists", NO_ABBREVS }, display_debug_loc, &do_debug_loc, TRUE },
|
||||
{ { ".debug_pubtypes", ".zdebug_pubtypes", NO_ABBREVS }, display_debug_pubnames, &do_debug_pubtypes, FALSE },
|
||||
{ { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NO_ABBREVS }, display_debug_gnu_pubnames, &do_debug_pubtypes, FALSE },
|
||||
{ { ".debug_ranges", ".zdebug_ranges", NO_ABBREVS }, display_debug_ranges, &do_debug_ranges, TRUE },
|
||||
{ { ".debug_rnglists", ".zdebug_rnglists", NO_ABBREVS }, display_debug_ranges, &do_debug_ranges, TRUE },
|
||||
{ { ".debug_static_func", ".zdebug_static_func", NO_ABBREVS }, display_debug_not_supported, NULL, FALSE },
|
||||
{ { ".debug_static_vars", ".zdebug_static_vars", NO_ABBREVS }, display_debug_not_supported, NULL, FALSE },
|
||||
{ { ".debug_types", ".zdebug_types", ABBREV (abbrev) }, display_debug_types, &do_debug_info, TRUE },
|
||||
{ { ".debug_weaknames", ".zdebug_weaknames", NO_ABBREVS }, display_debug_not_supported, NULL, FALSE },
|
||||
{ { ".gdb_index", "", NO_ABBREVS }, display_gdb_index, &do_gdb_index, FALSE },
|
||||
{ { ".debug_names", "", NO_ABBREVS }, display_debug_names, &do_gdb_index, FALSE },
|
||||
{ { ".trace_info", "", ABBREV (trace_abbrev) }, display_trace_info, &do_trace_info, TRUE },
|
||||
{ { ".trace_abbrev", "", NO_ABBREVS }, display_debug_abbrev, &do_trace_abbrevs, FALSE },
|
||||
{ { ".trace_aranges", "", NO_ABBREVS }, display_debug_aranges, &do_trace_aranges, FALSE },
|
||||
{ { ".debug_info.dwo", ".zdebug_info.dwo", ABBREV (abbrev_dwo) }, display_debug_info, &do_debug_info, TRUE },
|
||||
{ { ".debug_abbrev.dwo", ".zdebug_abbrev.dwo", NO_ABBREVS }, display_debug_abbrev, &do_debug_abbrevs, FALSE },
|
||||
{ { ".debug_types.dwo", ".zdebug_types.dwo", ABBREV (abbrev_dwo) }, display_debug_types, &do_debug_info, TRUE },
|
||||
{ { ".debug_line.dwo", ".zdebug_line.dwo", NO_ABBREVS }, display_debug_lines, &do_debug_lines, TRUE },
|
||||
{ { ".debug_loc.dwo", ".zdebug_loc.dwo", NO_ABBREVS }, display_debug_loc, &do_debug_loc, TRUE },
|
||||
{ { ".debug_macro.dwo", ".zdebug_macro.dwo", NO_ABBREVS }, display_debug_macro, &do_debug_macinfo, TRUE },
|
||||
{ { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NO_ABBREVS }, display_debug_macinfo, &do_debug_macinfo, FALSE },
|
||||
{ { ".debug_str.dwo", ".zdebug_str.dwo", NO_ABBREVS }, display_debug_str, &do_debug_str, TRUE },
|
||||
{ { ".debug_str_offsets", ".zdebug_str_offsets", NO_ABBREVS }, display_debug_str_offsets, &do_debug_str_offsets, TRUE },
|
||||
{ { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NO_ABBREVS }, display_debug_str_offsets, &do_debug_str_offsets, TRUE },
|
||||
{ { ".debug_addr", ".zdebug_addr", NO_ABBREVS }, display_debug_addr, &do_debug_addr, TRUE },
|
||||
{ { ".debug_cu_index", "", NO_ABBREVS }, display_cu_index, &do_debug_cu_index, FALSE },
|
||||
{ { ".debug_tu_index", "", NO_ABBREVS }, display_cu_index, &do_debug_cu_index, FALSE },
|
||||
{ { ".gnu_debuglink", "", NO_ABBREVS }, display_debug_links, &do_debug_links, FALSE },
|
||||
{ { ".gnu_debugaltlink", "", NO_ABBREVS }, display_debug_links, &do_debug_links, FALSE },
|
||||
{ { ".debug_sup", "", NO_ABBREVS }, display_debug_sup, &do_debug_links, FALSE },
|
||||
{ { ".debug_abbrev", ".zdebug_abbrev", NO_ABBREVS }, display_debug_abbrev, &do_debug_abbrevs, false },
|
||||
{ { ".debug_aranges", ".zdebug_aranges", NO_ABBREVS }, display_debug_aranges, &do_debug_aranges, true },
|
||||
{ { ".debug_frame", ".zdebug_frame", NO_ABBREVS }, display_debug_frames, &do_debug_frames, true },
|
||||
{ { ".debug_info", ".zdebug_info", ABBREV (abbrev)}, display_debug_info, &do_debug_info, true },
|
||||
{ { ".debug_line", ".zdebug_line", NO_ABBREVS }, display_debug_lines, &do_debug_lines, true },
|
||||
{ { ".debug_pubnames", ".zdebug_pubnames", NO_ABBREVS }, display_debug_pubnames, &do_debug_pubnames, false },
|
||||
{ { ".debug_gnu_pubnames", ".zdebug_gnu_pubnames", NO_ABBREVS }, display_debug_gnu_pubnames, &do_debug_pubnames, false },
|
||||
{ { ".eh_frame", "", NO_ABBREVS }, display_debug_frames, &do_debug_frames, true },
|
||||
{ { ".debug_macinfo", ".zdebug_macinfo", NO_ABBREVS }, display_debug_macinfo, &do_debug_macinfo, false },
|
||||
{ { ".debug_macro", ".zdebug_macro", NO_ABBREVS }, display_debug_macro, &do_debug_macinfo, true },
|
||||
{ { ".debug_str", ".zdebug_str", NO_ABBREVS }, display_debug_str, &do_debug_str, false },
|
||||
{ { ".debug_line_str", ".zdebug_line_str", NO_ABBREVS }, display_debug_str, &do_debug_str, false },
|
||||
{ { ".debug_loc", ".zdebug_loc", NO_ABBREVS }, display_debug_loc, &do_debug_loc, true },
|
||||
{ { ".debug_loclists", ".zdebug_loclists", NO_ABBREVS }, display_debug_loc, &do_debug_loc, true },
|
||||
{ { ".debug_pubtypes", ".zdebug_pubtypes", NO_ABBREVS }, display_debug_pubnames, &do_debug_pubtypes, false },
|
||||
{ { ".debug_gnu_pubtypes", ".zdebug_gnu_pubtypes", NO_ABBREVS }, display_debug_gnu_pubnames, &do_debug_pubtypes, false },
|
||||
{ { ".debug_ranges", ".zdebug_ranges", NO_ABBREVS }, display_debug_ranges, &do_debug_ranges, true },
|
||||
{ { ".debug_rnglists", ".zdebug_rnglists", NO_ABBREVS }, display_debug_ranges, &do_debug_ranges, true },
|
||||
{ { ".debug_static_func", ".zdebug_static_func", NO_ABBREVS }, display_debug_not_supported, NULL, false },
|
||||
{ { ".debug_static_vars", ".zdebug_static_vars", NO_ABBREVS }, display_debug_not_supported, NULL, false },
|
||||
{ { ".debug_types", ".zdebug_types", ABBREV (abbrev) }, display_debug_types, &do_debug_info, true },
|
||||
{ { ".debug_weaknames", ".zdebug_weaknames", NO_ABBREVS }, display_debug_not_supported, NULL, false },
|
||||
{ { ".gdb_index", "", NO_ABBREVS }, display_gdb_index, &do_gdb_index, false },
|
||||
{ { ".debug_names", "", NO_ABBREVS }, display_debug_names, &do_gdb_index, false },
|
||||
{ { ".trace_info", "", ABBREV (trace_abbrev) }, display_trace_info, &do_trace_info, true },
|
||||
{ { ".trace_abbrev", "", NO_ABBREVS }, display_debug_abbrev, &do_trace_abbrevs, false },
|
||||
{ { ".trace_aranges", "", NO_ABBREVS }, display_debug_aranges, &do_trace_aranges, false },
|
||||
{ { ".debug_info.dwo", ".zdebug_info.dwo", ABBREV (abbrev_dwo) }, display_debug_info, &do_debug_info, true },
|
||||
{ { ".debug_abbrev.dwo", ".zdebug_abbrev.dwo", NO_ABBREVS }, display_debug_abbrev, &do_debug_abbrevs, false },
|
||||
{ { ".debug_types.dwo", ".zdebug_types.dwo", ABBREV (abbrev_dwo) }, display_debug_types, &do_debug_info, true },
|
||||
{ { ".debug_line.dwo", ".zdebug_line.dwo", NO_ABBREVS }, display_debug_lines, &do_debug_lines, true },
|
||||
{ { ".debug_loc.dwo", ".zdebug_loc.dwo", NO_ABBREVS }, display_debug_loc, &do_debug_loc, true },
|
||||
{ { ".debug_macro.dwo", ".zdebug_macro.dwo", NO_ABBREVS }, display_debug_macro, &do_debug_macinfo, true },
|
||||
{ { ".debug_macinfo.dwo", ".zdebug_macinfo.dwo", NO_ABBREVS }, display_debug_macinfo, &do_debug_macinfo, false },
|
||||
{ { ".debug_str.dwo", ".zdebug_str.dwo", NO_ABBREVS }, display_debug_str, &do_debug_str, true },
|
||||
{ { ".debug_str_offsets", ".zdebug_str_offsets", NO_ABBREVS }, display_debug_str_offsets, &do_debug_str_offsets, true },
|
||||
{ { ".debug_str_offsets.dwo", ".zdebug_str_offsets.dwo", NO_ABBREVS }, display_debug_str_offsets, &do_debug_str_offsets, true },
|
||||
{ { ".debug_addr", ".zdebug_addr", NO_ABBREVS }, display_debug_addr, &do_debug_addr, true },
|
||||
{ { ".debug_cu_index", "", NO_ABBREVS }, display_cu_index, &do_debug_cu_index, false },
|
||||
{ { ".debug_tu_index", "", NO_ABBREVS }, display_cu_index, &do_debug_cu_index, false },
|
||||
{ { ".gnu_debuglink", "", NO_ABBREVS }, display_debug_links, &do_debug_links, false },
|
||||
{ { ".gnu_debugaltlink", "", NO_ABBREVS }, display_debug_links, &do_debug_links, false },
|
||||
{ { ".debug_sup", "", NO_ABBREVS }, display_debug_sup, &do_debug_links, false },
|
||||
/* Separate debug info files can containt their own .debug_str section,
|
||||
and this might be in *addition* to a .debug_str section already present
|
||||
in the main file. Hence we need to have two entries for .debug_str. */
|
||||
{ { ".debug_str", ".zdebug_str", NO_ABBREVS }, display_debug_str, &do_debug_str, FALSE },
|
||||
{ { ".debug_str", ".zdebug_str", NO_ABBREVS }, display_debug_str, &do_debug_str, false },
|
||||
};
|
||||
|
||||
/* A static assertion. */
|
||||
|
@ -150,10 +150,10 @@ struct dwarf_section
|
||||
and a pointer to a function that can decode it. */
|
||||
struct dwarf_section_display
|
||||
{
|
||||
struct dwarf_section section;
|
||||
int (* display) (struct dwarf_section *, void *);
|
||||
int * enabled;
|
||||
bfd_boolean relocate;
|
||||
struct dwarf_section section;
|
||||
int (*display) (struct dwarf_section *, void *);
|
||||
int *enabled;
|
||||
bool relocate;
|
||||
};
|
||||
|
||||
extern struct dwarf_section_display debug_displays [];
|
||||
@ -221,7 +221,7 @@ extern int do_debug_cu_index;
|
||||
extern int do_wide;
|
||||
extern int do_debug_links;
|
||||
extern int do_follow_links;
|
||||
extern bfd_boolean do_checks;
|
||||
extern bool do_checks;
|
||||
|
||||
extern int dwarf_cutoff_level;
|
||||
extern unsigned long dwarf_start_die;
|
||||
@ -232,11 +232,11 @@ extern void init_dwarf_regnames_by_elf_machine_code (unsigned int);
|
||||
extern void init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch,
|
||||
unsigned long mach);
|
||||
|
||||
extern bfd_boolean load_debug_section (enum dwarf_section_display_enum, void *);
|
||||
extern void free_debug_section (enum dwarf_section_display_enum);
|
||||
extern bfd_boolean load_separate_debug_files (void *, const char *);
|
||||
extern void close_debug_file (void *);
|
||||
extern void * open_debug_file (const char *);
|
||||
extern bool load_debug_section (enum dwarf_section_display_enum, void *);
|
||||
extern void free_debug_section (enum dwarf_section_display_enum);
|
||||
extern bool load_separate_debug_files (void *, const char *);
|
||||
extern void close_debug_file (void *);
|
||||
extern void *open_debug_file (const char *);
|
||||
|
||||
extern void free_debug_memory (void);
|
||||
|
||||
@ -254,10 +254,10 @@ extern void * xcrealloc (void *, size_t, size_t);
|
||||
/* A callback into the client. Returns TRUE if there is a
|
||||
relocation against the given debug section at the given
|
||||
offset. */
|
||||
extern bfd_boolean reloc_at (struct dwarf_section *, dwarf_vma);
|
||||
extern bool reloc_at (struct dwarf_section *, dwarf_vma);
|
||||
|
||||
extern dwarf_vma read_leb128 (unsigned char *, const unsigned char *const,
|
||||
bfd_boolean, unsigned int *, int *);
|
||||
bool, unsigned int *, int *);
|
||||
|
||||
#if HAVE_LIBDEBUGINFOD
|
||||
extern unsigned char * get_build_id (void *);
|
||||
@ -276,7 +276,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
||||
do \
|
||||
{ \
|
||||
unsigned int _len; \
|
||||
read_leb128 (start, end, FALSE, &_len, NULL); \
|
||||
read_leb128 (start, end, false, &_len, NULL); \
|
||||
start += _len; \
|
||||
} \
|
||||
while (0)
|
||||
@ -285,7 +285,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
||||
do \
|
||||
{ \
|
||||
unsigned int _len; \
|
||||
read_leb128 (start, end, TRUE, &_len, NULL); \
|
||||
read_leb128 (start, end, true, &_len, NULL); \
|
||||
start += _len; \
|
||||
} \
|
||||
while (0)
|
||||
@ -297,7 +297,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
||||
unsigned int _len; \
|
||||
int _status; \
|
||||
\
|
||||
_val = read_leb128 (start, end, FALSE, &_len, &_status); \
|
||||
_val = read_leb128 (start, end, false, &_len, &_status); \
|
||||
start += _len; \
|
||||
(var) = _val; \
|
||||
if ((var) != _val) \
|
||||
@ -313,7 +313,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
||||
unsigned int _len; \
|
||||
int _status; \
|
||||
\
|
||||
_val = read_leb128 (start, end, TRUE, &_len, &_status); \
|
||||
_val = read_leb128 (start, end, true, &_len, &_status); \
|
||||
start += _len; \
|
||||
(var) = _val; \
|
||||
if ((var) != _val) \
|
||||
|
@ -540,7 +540,7 @@ process_object (const char *file_name, FILE *file)
|
||||
|
||||
static int
|
||||
process_archive (const char * file_name, FILE * file,
|
||||
bfd_boolean is_thin_archive)
|
||||
bool is_thin_archive)
|
||||
{
|
||||
struct archive_info arch;
|
||||
struct archive_info nested_arch;
|
||||
@ -566,7 +566,7 @@ process_archive (const char * file_name, FILE * file,
|
||||
|
||||
if (fstat (fileno (file), &statbuf) < 0
|
||||
|| setup_archive (&arch, file_name, file, statbuf.st_size,
|
||||
is_thin_archive, FALSE) != 0)
|
||||
is_thin_archive, false) != 0)
|
||||
{
|
||||
ret = 1;
|
||||
goto out;
|
||||
@ -770,9 +770,9 @@ process_file (const char *file_name)
|
||||
}
|
||||
|
||||
if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
ret = process_archive (file_name, file, FALSE);
|
||||
ret = process_archive (file_name, file, false);
|
||||
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
ret = process_archive (file_name, file, TRUE);
|
||||
ret = process_archive (file_name, file, true);
|
||||
else
|
||||
{
|
||||
rewind (file);
|
||||
|
@ -28,13 +28,13 @@
|
||||
|
||||
/* Default to <bigaf>. */
|
||||
/* FIXME: write only variable. */
|
||||
static bfd_boolean big_archive = TRUE;
|
||||
static bool big_archive = true;
|
||||
|
||||
/* Whether to include 32 bit objects. */
|
||||
static bfd_boolean X32 = TRUE;
|
||||
static bool X32 = true;
|
||||
|
||||
/* Whether to include 64 bit objects. */
|
||||
static bfd_boolean X64 = FALSE;
|
||||
static bool X64 = false;
|
||||
|
||||
static void
|
||||
ar_emul_aix_usage (FILE *fp)
|
||||
@ -47,7 +47,7 @@ ar_emul_aix_usage (FILE *fp)
|
||||
fprintf (fp, _(" [-X32_64] - accepts 32 and 64 bit objects\n"));
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
check_aix (bfd *try_bfd)
|
||||
{
|
||||
extern const bfd_target rs6000_xcoff_vec;
|
||||
@ -57,68 +57,68 @@ check_aix (bfd *try_bfd)
|
||||
if (bfd_check_format (try_bfd, bfd_object))
|
||||
{
|
||||
if (!X32 && try_bfd->xvec == &rs6000_xcoff_vec)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (!X64 && (try_bfd->xvec == &rs6000_xcoff64_vec
|
||||
|| try_bfd->xvec == &rs6000_xcoff64_aix_vec))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
ar_emul_aix_append (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
bool verbose, bool flatten)
|
||||
{
|
||||
return do_ar_emul_append (after_bfd, new_bfd, verbose, flatten, check_aix);
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
ar_emul_aix_replace (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose)
|
||||
bool verbose)
|
||||
{
|
||||
if (!check_aix (new_bfd))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
ar_emul_aix_parse_arg (char *arg)
|
||||
{
|
||||
if (startswith (arg, "-X32_64"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = TRUE;
|
||||
X64 = TRUE;
|
||||
big_archive = true;
|
||||
X32 = true;
|
||||
X64 = true;
|
||||
}
|
||||
else if (startswith (arg, "-X32"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = TRUE;
|
||||
X64 = FALSE;
|
||||
big_archive = true;
|
||||
X32 = true;
|
||||
X64 = false;
|
||||
}
|
||||
else if (startswith (arg, "-X64"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = FALSE;
|
||||
X64 = TRUE;
|
||||
big_archive = true;
|
||||
X32 = false;
|
||||
X64 = true;
|
||||
}
|
||||
else if (startswith (arg, "-g"))
|
||||
{
|
||||
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 =
|
||||
|
@ -34,9 +34,9 @@
|
||||
#include <assert.h>
|
||||
|
||||
/* Exported globals. */
|
||||
bfd_boolean mclex_want_nl = FALSE;
|
||||
bfd_boolean mclex_want_line = FALSE;
|
||||
bfd_boolean mclex_want_filename = FALSE;
|
||||
bool mclex_want_nl = false;
|
||||
bool mclex_want_line = false;
|
||||
bool mclex_want_filename = false;
|
||||
|
||||
/* Local globals. */
|
||||
static unichar *input_stream = NULL;
|
||||
@ -365,7 +365,7 @@ yylex (void)
|
||||
&& (input_stream_pos[1] == '\n'
|
||||
|| (input_stream_pos[1] == '\r' && input_stream_pos[2] == '\n')))
|
||||
{
|
||||
mclex_want_line = FALSE;
|
||||
mclex_want_line = false;
|
||||
return skip_until_eol () ? MCENDLINE : -1;
|
||||
}
|
||||
if (!skip_until_eol ())
|
||||
@ -383,7 +383,7 @@ yylex (void)
|
||||
input_line += 1;
|
||||
if (mclex_want_nl && ch == '\n')
|
||||
{
|
||||
mclex_want_nl = FALSE;
|
||||
mclex_want_nl = false;
|
||||
return NL;
|
||||
}
|
||||
}
|
||||
@ -391,7 +391,7 @@ yylex (void)
|
||||
++input_stream_pos;
|
||||
if (mclex_want_filename)
|
||||
{
|
||||
mclex_want_filename = FALSE;
|
||||
mclex_want_filename = false;
|
||||
if (ch == '"')
|
||||
{
|
||||
start_token++;
|
||||
|
@ -461,11 +461,11 @@ print_symname (const char *form, struct extended_symbol_info *info,
|
||||
if (info != NULL && info->elfinfo && with_symbol_versions)
|
||||
{
|
||||
const char *version_string;
|
||||
bfd_boolean hidden;
|
||||
bool hidden;
|
||||
|
||||
version_string
|
||||
= bfd_get_symbol_version_string (abfd, &info->elfinfo->symbol,
|
||||
FALSE, &hidden);
|
||||
false, &hidden);
|
||||
if (version_string && version_string[0])
|
||||
{
|
||||
const char *at = "@@";
|
||||
@ -487,7 +487,7 @@ print_symdef_entry (bfd *abfd)
|
||||
{
|
||||
symindex idx = BFD_NO_MORE_SYMBOLS;
|
||||
carsym *thesym;
|
||||
bfd_boolean everprinted = FALSE;
|
||||
bool everprinted = false;
|
||||
|
||||
for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
|
||||
idx != BFD_NO_MORE_SYMBOLS;
|
||||
@ -497,7 +497,7 @@ print_symdef_entry (bfd *abfd)
|
||||
if (!everprinted)
|
||||
{
|
||||
printf (_("\nArchive index:\n"));
|
||||
everprinted = TRUE;
|
||||
everprinted = true;
|
||||
}
|
||||
elt = bfd_get_elt_at_index (abfd, idx);
|
||||
if (elt == NULL)
|
||||
@ -512,14 +512,14 @@ print_symdef_entry (bfd *abfd)
|
||||
|
||||
|
||||
/* True when we can report missing plugin error. */
|
||||
bfd_boolean report_plugin_err = TRUE;
|
||||
bool report_plugin_err = true;
|
||||
|
||||
/* Choose which symbol entries to print;
|
||||
compact them downward to get rid of the rest.
|
||||
Return the number of symbols to be printed. */
|
||||
|
||||
static long
|
||||
filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
|
||||
filter_symbols (bfd *abfd, bool is_dynamic, void *minisyms,
|
||||
long symcount, unsigned int size)
|
||||
{
|
||||
bfd_byte *from, *fromend, *to;
|
||||
@ -549,7 +549,7 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
|
||||
&& strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0
|
||||
&& report_plugin_err)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
report_plugin_err = false;
|
||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
@ -603,7 +603,7 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
|
||||
/* These globals are used to pass information into the sorting
|
||||
routines. */
|
||||
static bfd *sort_bfd;
|
||||
static bfd_boolean sort_dynamic;
|
||||
static bool sort_dynamic;
|
||||
static asymbol *sort_x;
|
||||
static asymbol *sort_y;
|
||||
|
||||
@ -794,7 +794,7 @@ size_forward2 (const void *P_x, const void *P_y)
|
||||
size. */
|
||||
|
||||
static long
|
||||
sort_symbols_by_size (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
|
||||
sort_symbols_by_size (bfd *abfd, bool is_dynamic, void *minisyms,
|
||||
long symcount, unsigned int size,
|
||||
struct size_sym **symsizesp)
|
||||
{
|
||||
@ -1088,11 +1088,11 @@ print_symbol (bfd * abfd,
|
||||
/* Print the symbols when sorting by size. */
|
||||
|
||||
static void
|
||||
print_size_symbols (bfd * abfd,
|
||||
bfd_boolean is_dynamic,
|
||||
struct size_sym * symsizes,
|
||||
long symcount,
|
||||
bfd * archive_bfd)
|
||||
print_size_symbols (bfd *abfd,
|
||||
bool is_dynamic,
|
||||
struct size_sym *symsizes,
|
||||
long symcount,
|
||||
bfd *archive_bfd)
|
||||
{
|
||||
asymbol *store;
|
||||
struct size_sym *from;
|
||||
@ -1127,12 +1127,12 @@ print_size_symbols (bfd * abfd,
|
||||
SIZE is the size of a symbol in MINISYMS. */
|
||||
|
||||
static void
|
||||
print_symbols (bfd * abfd,
|
||||
bfd_boolean is_dynamic,
|
||||
void * minisyms,
|
||||
long symcount,
|
||||
unsigned int size,
|
||||
bfd * archive_bfd)
|
||||
print_symbols (bfd *abfd,
|
||||
bool is_dynamic,
|
||||
void *minisyms,
|
||||
long symcount,
|
||||
unsigned int size,
|
||||
bfd *archive_bfd)
|
||||
{
|
||||
asymbol *store;
|
||||
bfd_byte *from;
|
||||
@ -1250,7 +1250,7 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
||||
LTO plugin. */
|
||||
if (abfd->lto_slim_object)
|
||||
{
|
||||
report_plugin_err = FALSE;
|
||||
report_plugin_err = false;
|
||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
@ -1418,21 +1418,21 @@ display_archive (bfd *file)
|
||||
}
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
display_file (char *filename)
|
||||
{
|
||||
bfd_boolean retval = TRUE;
|
||||
bool retval = true;
|
||||
bfd *file;
|
||||
char **matching;
|
||||
|
||||
if (get_file_size (filename) < 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
file = bfd_openr (filename, target ? target : plugin_target);
|
||||
if (file == NULL)
|
||||
{
|
||||
bfd_nonfatal (filename);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If printing line numbers, decompress the debug sections. */
|
||||
@ -1457,7 +1457,7 @@ display_file (char *filename)
|
||||
list_matching_formats (matching);
|
||||
free (matching);
|
||||
}
|
||||
retval = FALSE;
|
||||
retval = false;
|
||||
}
|
||||
|
||||
if (!bfd_close (file))
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -464,7 +464,7 @@ dump_segment (bfd *abfd ATTRIBUTE_UNUSED, bfd_mach_o_load_command *cmd)
|
||||
}
|
||||
|
||||
static void
|
||||
dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bfd_boolean verbose)
|
||||
dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bool verbose)
|
||||
{
|
||||
bfd_mach_o_dysymtab_command *dysymtab = &cmd->command.dysymtab;
|
||||
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
|
||||
@ -656,7 +656,7 @@ dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bfd_boolean verbose)
|
||||
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
||||
void (*dump)(bfd *abfd, unsigned char *buf, unsigned int len,
|
||||
ufile_ptr off))
|
||||
@ -664,7 +664,7 @@ load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
||||
unsigned char *buf;
|
||||
|
||||
if (len == 0)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
buf = xmalloc (len);
|
||||
|
||||
@ -672,10 +672,10 @@ load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
||||
&& bfd_bread (buf, len, abfd) == len)
|
||||
dump (abfd, buf, len, off);
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
free (buf);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static const bfd_mach_o_xlat_name bfd_mach_o_dyld_rebase_type_name[] =
|
||||
@ -968,7 +968,7 @@ dump_dyld_info_export (bfd *abfd, unsigned char *buf, unsigned int len,
|
||||
|
||||
static void
|
||||
dump_dyld_info (bfd *abfd, bfd_mach_o_load_command *cmd,
|
||||
bfd_boolean verbose)
|
||||
bool verbose)
|
||||
{
|
||||
bfd_mach_o_dyld_info_command *dinfo = &cmd->command.dyld_info;
|
||||
|
||||
@ -1527,7 +1527,7 @@ dump_build_version (bfd *abfd, bfd_mach_o_load_command *cmd)
|
||||
|
||||
static void
|
||||
dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
|
||||
unsigned int idx, bfd_boolean verbose)
|
||||
unsigned int idx, bool verbose)
|
||||
{
|
||||
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
|
||||
const char *cmd_name;
|
||||
@ -1769,9 +1769,9 @@ dump_load_commands (bfd *abfd, unsigned int cmd32, unsigned int cmd64)
|
||||
for (cmd = mdata->first_command, i = 0; cmd != NULL; cmd = cmd->next, i++)
|
||||
{
|
||||
if (cmd32 == 0)
|
||||
dump_load_command (abfd, cmd, i, FALSE);
|
||||
dump_load_command (abfd, cmd, i, false);
|
||||
else if (cmd->type == cmd32 || cmd->type == cmd64)
|
||||
dump_load_command (abfd, cmd, i, TRUE);
|
||||
dump_load_command (abfd, cmd, i, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
853
binutils/prdbg.c
853
binutils/prdbg.c
File diff suppressed because it is too large
Load Diff
@ -86,7 +86,7 @@ struct coff_types
|
||||
static debug_type *coff_get_slot (struct coff_types *, long);
|
||||
static debug_type parse_coff_type
|
||||
(bfd *, struct coff_symbols *, struct coff_types *, long, int,
|
||||
union internal_auxent *, bfd_boolean, void *);
|
||||
union internal_auxent *, bool, void *);
|
||||
static debug_type parse_coff_base_type
|
||||
(bfd *, struct coff_symbols *, struct coff_types *, long, int,
|
||||
union internal_auxent *, void *);
|
||||
@ -96,10 +96,10 @@ static debug_type parse_coff_struct_type
|
||||
static debug_type parse_coff_enum_type
|
||||
(bfd *, struct coff_symbols *, struct coff_types *,
|
||||
union internal_auxent *, void *);
|
||||
static bfd_boolean parse_coff_symbol
|
||||
static bool parse_coff_symbol
|
||||
(bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
|
||||
void *, debug_type, bfd_boolean);
|
||||
static bfd_boolean external_coff_symbol_p (int sym_class);
|
||||
void *, debug_type, bool);
|
||||
static bool external_coff_symbol_p (int sym_class);
|
||||
|
||||
/* Return the slot for a type. */
|
||||
|
||||
@ -140,7 +140,7 @@ coff_get_slot (struct coff_types *types, long indx)
|
||||
static debug_type
|
||||
parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
struct coff_types *types, long coff_symno, int ntype,
|
||||
union internal_auxent *pauxent, bfd_boolean useaux,
|
||||
union internal_auxent *pauxent, bool useaux,
|
||||
void *dhandle)
|
||||
{
|
||||
debug_type type;
|
||||
@ -162,7 +162,7 @@ parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
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))
|
||||
{
|
||||
@ -188,14 +188,14 @@ parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
@ -240,7 +240,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
union internal_auxent *pauxent, void *dhandle)
|
||||
{
|
||||
debug_type ret;
|
||||
bfd_boolean set_basic;
|
||||
bool set_basic;
|
||||
const char *name;
|
||||
debug_type *slot;
|
||||
|
||||
@ -249,7 +249,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
&& types->basic[ntype] != DEBUG_TYPE_NULL)
|
||||
return types->basic[ntype];
|
||||
|
||||
set_basic = TRUE;
|
||||
set_basic = true;
|
||||
name = NULL;
|
||||
|
||||
switch (ntype)
|
||||
@ -265,23 +265,23 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
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;
|
||||
|
||||
@ -301,28 +301,28 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
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,
|
||||
@ -331,12 +331,12 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
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);
|
||||
@ -344,7 +344,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
slot = coff_get_slot (types, coff_symno);
|
||||
*slot = ret;
|
||||
|
||||
set_basic = FALSE;
|
||||
set_basic = false;
|
||||
break;
|
||||
|
||||
case T_ENUM:
|
||||
@ -357,7 +357,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
slot = coff_get_slot (types, coff_symno);
|
||||
*slot = ret;
|
||||
|
||||
set_basic = FALSE;
|
||||
set_basic = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -383,7 +383,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
int alloc;
|
||||
debug_field *fields;
|
||||
int count;
|
||||
bfd_boolean done;
|
||||
bool done;
|
||||
|
||||
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
|
||||
|
||||
@ -391,7 +391,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
|
||||
count = 0;
|
||||
|
||||
done = FALSE;
|
||||
done = false;
|
||||
while (! done
|
||||
&& symbols->coff_symno < symend
|
||||
&& symbols->symno < symbols->symcount)
|
||||
@ -446,7 +446,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
break;
|
||||
|
||||
case C_EOS:
|
||||
done = TRUE;
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
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)
|
||||
@ -493,7 +493,7 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
const char **names;
|
||||
bfd_signed_vma *vals;
|
||||
int count;
|
||||
bfd_boolean done;
|
||||
bool done;
|
||||
|
||||
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
|
||||
|
||||
@ -502,7 +502,7 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
vals = (bfd_signed_vma *) xmalloc (alloc * sizeof *vals);
|
||||
count = 0;
|
||||
|
||||
done = FALSE;
|
||||
done = false;
|
||||
while (! done
|
||||
&& symbols->coff_symno < symend
|
||||
&& symbols->symno < symbols->symcount)
|
||||
@ -542,7 +542,7 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
break;
|
||||
|
||||
case C_EOS:
|
||||
done = TRUE;
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -554,11 +554,11 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
||||
|
||||
/* Handle a single COFF symbol. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
asymbol *sym, long coff_symno,
|
||||
struct internal_syment *psyment, void *dhandle,
|
||||
debug_type type, bfd_boolean within_function)
|
||||
debug_type type, bool within_function)
|
||||
{
|
||||
switch (psyment->n_sclass)
|
||||
{
|
||||
@ -568,14 +568,14 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
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:
|
||||
@ -584,14 +584,14 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
? 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:
|
||||
@ -600,20 +600,20 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
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:
|
||||
@ -624,7 +624,7 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
|
||||
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. */
|
||||
@ -637,29 +637,29 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Determine if a symbol has external visibility. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
external_coff_symbol_p (int sym_class)
|
||||
{
|
||||
switch (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. */
|
||||
|
||||
bfd_boolean
|
||||
bool
|
||||
parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
{
|
||||
struct coff_symbols symbols;
|
||||
@ -671,7 +671,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
int fntype;
|
||||
bfd_vma fnend;
|
||||
alent *linenos;
|
||||
bfd_boolean within_function;
|
||||
bool within_function;
|
||||
long this_coff_symno;
|
||||
|
||||
symbols.syms = syms;
|
||||
@ -689,7 +689,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
fntype = 0;
|
||||
fnend = 0;
|
||||
linenos = NULL;
|
||||
within_function = FALSE;
|
||||
within_function = false;
|
||||
|
||||
while (symbols.symno < symcount)
|
||||
{
|
||||
@ -706,7 +706,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
{
|
||||
non_fatal (_("bfd_coff_get_syment failed: %s"),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
name = bfd_asymbol_name (sym);
|
||||
@ -726,7 +726,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
{
|
||||
non_fatal (_("bfd_coff_get_auxent failed: %s"),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
paux = &auxent;
|
||||
}
|
||||
@ -736,7 +736,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *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)
|
||||
@ -754,7 +754,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
case C_FILE:
|
||||
next_c_file = syment.n_value;
|
||||
if (! debug_set_filename (dhandle, name))
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
|
||||
case C_STAT:
|
||||
@ -778,12 +778,12 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *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:
|
||||
@ -793,18 +793,18 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *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)
|
||||
{
|
||||
@ -825,7 +825,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||
if (! debug_record_line (dhandle,
|
||||
linenos->line_number + base,
|
||||
linenos->u.offset + addr))
|
||||
return FALSE;
|
||||
return false;
|
||||
++linenos;
|
||||
}
|
||||
}
|
||||
@ -835,23 +835,23 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *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;
|
||||
|
||||
@ -859,26 +859,26 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *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;
|
||||
}
|
||||
|
@ -31,10 +31,10 @@
|
||||
#include "debug.h"
|
||||
#include "budbg.h"
|
||||
|
||||
static bfd_boolean read_section_stabs_debugging_info
|
||||
(bfd *, asymbol **, long, void *, bfd_boolean *);
|
||||
static bfd_boolean read_symbol_stabs_debugging_info
|
||||
(bfd *, asymbol **, long, void *, bfd_boolean *);
|
||||
static bool read_section_stabs_debugging_info
|
||||
(bfd *, asymbol **, long, void *, bool *);
|
||||
static bool read_symbol_stabs_debugging_info
|
||||
(bfd *, asymbol **, long, void *, bool *);
|
||||
static void save_stab (int, int, bfd_vma, const char *);
|
||||
static void stab_context (void);
|
||||
static void free_saved_stabs (void);
|
||||
@ -44,10 +44,10 @@ static void free_saved_stabs (void);
|
||||
|
||||
void *
|
||||
read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
bfd_boolean no_messages)
|
||||
bool no_messages)
|
||||
{
|
||||
void *dhandle;
|
||||
bfd_boolean found;
|
||||
bool found;
|
||||
|
||||
dhandle = debug_init ();
|
||||
if (dhandle == NULL)
|
||||
@ -72,7 +72,7 @@ read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
{
|
||||
if (! parse_coff (abfd, syms, symcount, dhandle))
|
||||
goto err_exit;
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (! found)
|
||||
@ -90,9 +90,9 @@ read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
|
||||
/* Read stabs in sections debugging information from a BFD. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
void *dhandle, bfd_boolean *pfound)
|
||||
void *dhandle, bool *pfound)
|
||||
{
|
||||
static struct
|
||||
{
|
||||
@ -108,7 +108,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
unsigned int i;
|
||||
void *shandle;
|
||||
|
||||
*pfound = FALSE;
|
||||
*pfound = false;
|
||||
shandle = NULL;
|
||||
|
||||
for (i = 0; i < sizeof names / sizeof names[0]; i++)
|
||||
@ -133,7 +133,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
free (shandle);
|
||||
free (stabs);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
strsize = bfd_section_size (strsec);
|
||||
@ -146,22 +146,22 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
free (shandle);
|
||||
free (strings);
|
||||
free (stabs);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
/* Zero terminate the strings table, just in case. */
|
||||
strings [strsize] = 0;
|
||||
if (shandle == NULL)
|
||||
{
|
||||
shandle = start_stab (dhandle, abfd, TRUE, syms, symcount);
|
||||
shandle = start_stab (dhandle, abfd, true, syms, symcount);
|
||||
if (shandle == NULL)
|
||||
{
|
||||
free (strings);
|
||||
free (stabs);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
*pfound = TRUE;
|
||||
*pfound = true;
|
||||
|
||||
stroff = 0;
|
||||
next_stroff = 0;
|
||||
@ -248,7 +248,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
free (shandle);
|
||||
free (stabs);
|
||||
free (strings);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Don't free f, since I think the stabs code
|
||||
@ -269,17 +269,17 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
if (shandle != NULL)
|
||||
{
|
||||
if (! finish_stab (dhandle, shandle))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Read stabs in the symbol table. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
void *dhandle, bfd_boolean *pfound)
|
||||
void *dhandle, bool *pfound)
|
||||
{
|
||||
void *shandle;
|
||||
asymbol **ps, **symend;
|
||||
@ -299,16 +299,16 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
|
||||
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;
|
||||
if (s == NULL || strlen (s) < 1)
|
||||
return FALSE;
|
||||
return false;
|
||||
f = NULL;
|
||||
|
||||
while (strlen (s) > 0
|
||||
@ -334,7 +334,7 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
{
|
||||
stab_context ();
|
||||
free_saved_stabs ();
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Don't free f, since I think the stabs code expects
|
||||
@ -348,10 +348,10 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||
if (shandle != NULL)
|
||||
{
|
||||
if (! finish_stab (dhandle, shandle))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Record stabs strings, so that we can give some context for errors. */
|
||||
|
1477
binutils/readelf.c
1477
binutils/readelf.c
File diff suppressed because it is too large
Load Diff
@ -127,7 +127,7 @@ set_times (const char *destination, const struct stat *statbuf)
|
||||
|
||||
int
|
||||
smart_rename (const char *from, const char *to, int fromfd,
|
||||
struct stat *target_stat, bfd_boolean preserve_dates)
|
||||
struct stat *target_stat, bool preserve_dates)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
1012
binutils/stabs.c
1012
binutils/stabs.c
File diff suppressed because it is too large
Load Diff
@ -97,16 +97,16 @@ static int address_radix;
|
||||
static int string_min;
|
||||
|
||||
/* Whether or not we include all whitespace as a graphic char. */
|
||||
static bfd_boolean include_all_whitespace;
|
||||
static bool include_all_whitespace;
|
||||
|
||||
/* TRUE means print address within file for each string. */
|
||||
static bfd_boolean print_addresses;
|
||||
static bool print_addresses;
|
||||
|
||||
/* TRUE means print filename for each string. */
|
||||
static bfd_boolean print_filenames;
|
||||
static bool print_filenames;
|
||||
|
||||
/* TRUE means for object files scan only the data section. */
|
||||
static bfd_boolean datasection_only;
|
||||
static bool datasection_only;
|
||||
|
||||
/* The BFD object file format. */
|
||||
static char *target;
|
||||
@ -134,7 +134,7 @@ static struct option long_options[] =
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
static bfd_boolean strings_file (char *);
|
||||
static bool strings_file (char *);
|
||||
static void print_strings (const char *, FILE *, file_ptr, int, int, char *);
|
||||
static void usage (FILE *, int) ATTRIBUTE_NORETURN;
|
||||
|
||||
@ -145,7 +145,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
int optc;
|
||||
int exit_status = 0;
|
||||
bfd_boolean files_given = FALSE;
|
||||
bool files_given = false;
|
||||
char *s;
|
||||
int numeric_opt = 0;
|
||||
|
||||
@ -162,13 +162,13 @@ main (int argc, char **argv)
|
||||
expandargv (&argc, &argv);
|
||||
|
||||
string_min = 4;
|
||||
include_all_whitespace = FALSE;
|
||||
print_addresses = FALSE;
|
||||
print_filenames = FALSE;
|
||||
include_all_whitespace = false;
|
||||
print_addresses = false;
|
||||
print_filenames = false;
|
||||
if (DEFAULT_STRINGS_ALL)
|
||||
datasection_only = FALSE;
|
||||
datasection_only = false;
|
||||
else
|
||||
datasection_only = TRUE;
|
||||
datasection_only = true;
|
||||
target = NULL;
|
||||
encoding = 's';
|
||||
output_separator = NULL;
|
||||
@ -179,15 +179,15 @@ main (int argc, char **argv)
|
||||
switch (optc)
|
||||
{
|
||||
case 'a':
|
||||
datasection_only = FALSE;
|
||||
datasection_only = false;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
datasection_only = TRUE;
|
||||
datasection_only = true;
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
print_filenames = TRUE;
|
||||
print_filenames = true;
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
@ -201,16 +201,16 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
include_all_whitespace = TRUE;
|
||||
include_all_whitespace = true;
|
||||
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])
|
||||
@ -293,20 +293,20 @@ main (int argc, char **argv)
|
||||
|
||||
if (optind >= argc)
|
||||
{
|
||||
datasection_only = FALSE;
|
||||
datasection_only = false;
|
||||
SET_BINARY (fileno (stdin));
|
||||
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;
|
||||
files_given = true;
|
||||
exit_status |= !strings_file (argv[optind]);
|
||||
}
|
||||
}
|
||||
@ -324,7 +324,7 @@ main (int argc, char **argv)
|
||||
|
||||
static void
|
||||
strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
||||
bfd_boolean *got_a_section)
|
||||
bool *got_a_section)
|
||||
{
|
||||
bfd_size_type sectsize;
|
||||
bfd_byte *mem;
|
||||
@ -343,7 +343,7 @@ strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
||||
return;
|
||||
}
|
||||
|
||||
*got_a_section = TRUE;
|
||||
*got_a_section = true;
|
||||
print_strings (filename, NULL, sect->filepos, 0, sectsize, (char *) mem);
|
||||
free (mem);
|
||||
}
|
||||
@ -354,18 +354,18 @@ strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
||||
Return TRUE if successful,
|
||||
FALSE if not (such as if FILE is not an object file). */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
strings_object_file (const char *file)
|
||||
{
|
||||
bfd *abfd;
|
||||
asection *s;
|
||||
bfd_boolean got_a_section;
|
||||
bool got_a_section;
|
||||
|
||||
abfd = bfd_openr (file, target);
|
||||
|
||||
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
|
||||
@ -373,17 +373,17 @@ strings_object_file (const char *file)
|
||||
if (!bfd_check_format (abfd, bfd_object))
|
||||
{
|
||||
bfd_close (abfd);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
got_a_section = FALSE;
|
||||
got_a_section = false;
|
||||
for (s = abfd->sections; s != NULL; s = s->next)
|
||||
strings_a_section (abfd, s, file, &got_a_section);
|
||||
|
||||
if (!bfd_close (abfd))
|
||||
{
|
||||
bfd_nonfatal (file);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return got_a_section;
|
||||
@ -391,7 +391,7 @@ strings_object_file (const char *file)
|
||||
|
||||
/* Print the strings in FILE. Return TRUE if ok, FALSE if an error occurs. */
|
||||
|
||||
static bfd_boolean
|
||||
static bool
|
||||
strings_file (char *file)
|
||||
{
|
||||
struct stat st;
|
||||
@ -405,12 +405,12 @@ strings_file (char *file)
|
||||
else
|
||||
non_fatal (_("Warning: could not locate '%s'. reason: %s"),
|
||||
file, strerror (errno));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (S_ISDIR (st.st_mode))
|
||||
{
|
||||
non_fatal (_("Warning: '%s' is a directory"), file);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If we weren't told to scan the whole file,
|
||||
@ -426,7 +426,7 @@ strings_file (char *file)
|
||||
{
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
perror (file);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
print_strings (file, stream, (file_ptr) 0, 0, 0, (char *) 0);
|
||||
@ -435,11 +435,11 @@ strings_file (char *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.
|
||||
|
@ -201,4 +201,6 @@ size_t strnlen (const char *, size_t);
|
||||
#define HOST_WIDEST_INT long
|
||||
#endif
|
||||
|
||||
#define POISON_BFD_BOOLEAN 1
|
||||
|
||||
#endif /* _BIN_SYSDEP_H */
|
||||
|
@ -1063,7 +1063,7 @@ struct __attribute__ ((__packed__)) bin_toolbar
|
||||
};
|
||||
#define BIN_TOOLBAR_SIZE 12
|
||||
|
||||
extern bfd_boolean target_is_bigendian;
|
||||
extern bool target_is_bigendian;
|
||||
|
||||
typedef struct windres_bfd
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ typedef struct mc_msg_item
|
||||
struct bin_messagetable_item *res;
|
||||
} mc_msg_item;
|
||||
|
||||
bfd_boolean target_is_bigendian = 0;
|
||||
bool target_is_bigendian = 0;
|
||||
const char *def_target_arch;
|
||||
|
||||
/* Globals and static variable definitions. */
|
||||
|
@ -89,9 +89,9 @@ void mc_set_inputfile (const char *);
|
||||
void mc_set_content (const unichar *);
|
||||
|
||||
/* Lexer control variables. Used by mcparser.y file. */
|
||||
extern bfd_boolean mclex_want_nl;
|
||||
extern bfd_boolean mclex_want_line;
|
||||
extern bfd_boolean mclex_want_filename;
|
||||
extern bool mclex_want_nl;
|
||||
extern bool mclex_want_line;
|
||||
extern bool mclex_want_filename;
|
||||
|
||||
void mc_fatal (const char *, ...);
|
||||
void mc_warn (const char *, ...);
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
int verbose = 0;
|
||||
|
||||
bfd_boolean target_is_bigendian = 0;
|
||||
bool target_is_bigendian = 0;
|
||||
const char *def_target_arch;
|
||||
|
||||
static void set_endianness (bfd *, const char *);
|
||||
@ -713,12 +713,12 @@ quot (const char *string)
|
||||
#if defined (_WIN32) && !defined (__CYGWIN__)
|
||||
/* For Windows shells, quote "like this". */
|
||||
{
|
||||
bfd_boolean quoted = FALSE;
|
||||
bool quoted = false;
|
||||
|
||||
dest = buf;
|
||||
if (strchr (string, ' '))
|
||||
{
|
||||
quoted = TRUE;
|
||||
quoted = true;
|
||||
*dest++ = '"';
|
||||
}
|
||||
|
||||
|
@ -832,7 +832,7 @@ wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_t
|
||||
{
|
||||
rc_uint_type ret = 0;
|
||||
#if defined (_WIN32) || defined (__CYGWIN__)
|
||||
WINBOOL used_def = FALSE;
|
||||
WINBOOL used_def = false;
|
||||
|
||||
ret = (rc_uint_type) WideCharToMultiByte (cp, 0, u, -1, mb, mb_len,
|
||||
NULL, & used_def);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user