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>
|
2021-03-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* coffdump.c: Include stdint.h in place of bfd_stdint.h.
|
* coffdump.c: Include stdint.h in place of bfd_stdint.h.
|
||||||
|
|||||||
@ -38,12 +38,12 @@
|
|||||||
#include "bucomm.h"
|
#include "bucomm.h"
|
||||||
#include "elf-bfd.h"
|
#include "elf-bfd.h"
|
||||||
|
|
||||||
static bfd_boolean unwind_inlines; /* -i, unwind inlined functions. */
|
static bool unwind_inlines; /* -i, unwind inlined functions. */
|
||||||
static bfd_boolean with_addresses; /* -a, show addresses. */
|
static bool with_addresses; /* -a, show addresses. */
|
||||||
static bfd_boolean with_functions; /* -f, show function names. */
|
static bool with_functions; /* -f, show function names. */
|
||||||
static bfd_boolean do_demangle; /* -C, demangle names. */
|
static bool do_demangle; /* -C, demangle names. */
|
||||||
static bfd_boolean pretty_print; /* -p, print on one line. */
|
static bool pretty_print; /* -p, print on one line. */
|
||||||
static bfd_boolean base_names; /* -s, strip directory names. */
|
static bool base_names; /* -s, strip directory names. */
|
||||||
|
|
||||||
/* Flags passed to the name demangler. */
|
/* Flags passed to the name demangler. */
|
||||||
static int demangle_flags = DMGL_PARAMS | DMGL_ANSI;
|
static int demangle_flags = DMGL_PARAMS | DMGL_ANSI;
|
||||||
@ -117,7 +117,7 @@ slurp_symtab (bfd *abfd)
|
|||||||
{
|
{
|
||||||
long storage;
|
long storage;
|
||||||
long symcount;
|
long symcount;
|
||||||
bfd_boolean dynamic = FALSE;
|
bool dynamic = false;
|
||||||
|
|
||||||
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
||||||
return;
|
return;
|
||||||
@ -126,7 +126,7 @@ slurp_symtab (bfd *abfd)
|
|||||||
if (storage == 0)
|
if (storage == 0)
|
||||||
{
|
{
|
||||||
storage = bfd_get_dynamic_symtab_upper_bound (abfd);
|
storage = bfd_get_dynamic_symtab_upper_bound (abfd);
|
||||||
dynamic = TRUE;
|
dynamic = true;
|
||||||
}
|
}
|
||||||
if (storage < 0)
|
if (storage < 0)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
bfd_fatal (bfd_get_filename (abfd));
|
||||||
@ -167,7 +167,7 @@ static const char *filename;
|
|||||||
static const char *functionname;
|
static const char *functionname;
|
||||||
static unsigned int line;
|
static unsigned int line;
|
||||||
static unsigned int discriminator;
|
static unsigned int discriminator;
|
||||||
static bfd_boolean found;
|
static bool found;
|
||||||
|
|
||||||
/* Look for an address in a section. This is called via
|
/* Look for an address in a section. This is called via
|
||||||
bfd_map_over_sections. */
|
bfd_map_over_sections. */
|
||||||
@ -267,7 +267,7 @@ translate_addresses (bfd *abfd, asection *section)
|
|||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
found = FALSE;
|
found = false;
|
||||||
if (section)
|
if (section)
|
||||||
find_offset_in_section (abfd, section);
|
find_offset_in_section (abfd, section);
|
||||||
else
|
else
|
||||||
@ -337,7 +337,7 @@ translate_addresses (bfd *abfd, asection *section)
|
|||||||
else
|
else
|
||||||
printf ("?\n");
|
printf ("?\n");
|
||||||
if (!unwind_inlines)
|
if (!unwind_inlines)
|
||||||
found = FALSE;
|
found = false;
|
||||||
else
|
else
|
||||||
found = bfd_find_inliner_info (abfd, &filename, &functionname,
|
found = bfd_find_inliner_info (abfd, &filename, &functionname,
|
||||||
&line);
|
&line);
|
||||||
@ -455,13 +455,13 @@ main (int argc, char **argv)
|
|||||||
case 0:
|
case 0:
|
||||||
break; /* We've been given a long option. */
|
break; /* We've been given a long option. */
|
||||||
case 'a':
|
case 'a':
|
||||||
with_addresses = TRUE;
|
with_addresses = true;
|
||||||
break;
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
target = optarg;
|
target = optarg;
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
do_demangle = TRUE;
|
do_demangle = true;
|
||||||
if (optarg != NULL)
|
if (optarg != NULL)
|
||||||
{
|
{
|
||||||
enum demangling_styles style;
|
enum demangling_styles style;
|
||||||
@ -484,13 +484,13 @@ main (int argc, char **argv)
|
|||||||
file_name = optarg;
|
file_name = optarg;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
base_names = TRUE;
|
base_names = true;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
with_functions = TRUE;
|
with_functions = true;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
pretty_print = TRUE;
|
pretty_print = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
case 'V':
|
case 'V':
|
||||||
@ -501,7 +501,7 @@ main (int argc, char **argv)
|
|||||||
usage (stdout, 0);
|
usage (stdout, 0);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
unwind_inlines = TRUE;
|
unwind_inlines = true;
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
section_name = optarg;
|
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 move_members (bfd *, char **files_to_move);
|
||||||
static void replace_members
|
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 print_descr (bfd * abfd);
|
||||||
static void write_archive (bfd *);
|
static void write_archive (bfd *);
|
||||||
static int ranlib_only (const char *archname);
|
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
|
/* For extract/delete only. If COUNTED_NAME_MODE is TRUE, we only
|
||||||
extract the COUNTED_NAME_COUNTER instance of that name. */
|
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;
|
static int counted_name_counter = 0;
|
||||||
|
|
||||||
/* Whether to truncate names of files stored in the archive. */
|
/* 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.
|
/* Whether to use a full file name match when searching an archive.
|
||||||
This is convenient for archives created by the Microsoft lib
|
This is convenient for archives created by the Microsoft lib
|
||||||
program. */
|
program. */
|
||||||
static bfd_boolean full_pathname = FALSE;
|
static bool full_pathname = false;
|
||||||
|
|
||||||
/* Whether to create a "thin" archive (symbol index only -- no files). */
|
/* 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"
|
#define LIBDEPS "__.LIBDEP"
|
||||||
/* Text to store in the __.LIBDEP archive element for the linker to use. */
|
/* 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--)
|
for (; count > 0; files++, count--)
|
||||||
{
|
{
|
||||||
bfd_boolean found = FALSE;
|
bool found = false;
|
||||||
|
|
||||||
match_count = 0;
|
match_count = 0;
|
||||||
for (head = arch->archive_next; head; head = head->archive_next)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
found = TRUE;
|
found = true;
|
||||||
function (head);
|
function (head);
|
||||||
head->archive_pass = 1;
|
head->archive_pass = 1;
|
||||||
/* PR binutils/15796: Once a file has been matched, do not
|
/* 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
|
static void
|
||||||
usage (int help)
|
usage (int help)
|
||||||
@ -519,22 +519,22 @@ decode_options (int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
operation = del;
|
operation = del;
|
||||||
operation_alters_arch = TRUE;
|
operation_alters_arch = true;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
operation = move;
|
operation = move;
|
||||||
operation_alters_arch = TRUE;
|
operation_alters_arch = true;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
operation = print_files;
|
operation = print_files;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
operation = quick_append;
|
operation = quick_append;
|
||||||
operation_alters_arch = TRUE;
|
operation_alters_arch = true;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
operation = replace;
|
operation = replace;
|
||||||
operation_alters_arch = TRUE;
|
operation_alters_arch = true;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
operation = print_table;
|
operation = print_table;
|
||||||
@ -557,7 +557,7 @@ decode_options (int argc, char **argv)
|
|||||||
display_offsets = 1;
|
display_offsets = 1;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
show_version = TRUE;
|
show_version = true;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
write_armap = 1;
|
write_armap = 1;
|
||||||
@ -584,22 +584,22 @@ decode_options (int argc, char **argv)
|
|||||||
mri_mode = 1;
|
mri_mode = 1;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
counted_name_mode = TRUE;
|
counted_name_mode = true;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
ar_truncate = TRUE;
|
ar_truncate = true;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
full_pathname = TRUE;
|
full_pathname = true;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
make_thin_archive = TRUE;
|
make_thin_archive = true;
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
deterministic = TRUE;
|
deterministic = true;
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
deterministic = FALSE;
|
deterministic = false;
|
||||||
break;
|
break;
|
||||||
case OPTION_PLUGIN:
|
case OPTION_PLUGIN:
|
||||||
#if BFD_SUPPORTS_PLUGINS
|
#if BFD_SUPPORTS_PLUGINS
|
||||||
@ -650,7 +650,7 @@ static void
|
|||||||
ranlib_main (int argc, char **argv)
|
ranlib_main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int arg_index, status = 0;
|
int arg_index, status = 0;
|
||||||
bfd_boolean touch = FALSE;
|
bool touch = false;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "DhHUvVt", long_options, NULL)) != EOF)
|
while ((c = getopt_long (argc, argv, "DhHUvVt", long_options, NULL)) != EOF)
|
||||||
@ -658,17 +658,17 @@ ranlib_main (int argc, char **argv)
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'D':
|
case 'D':
|
||||||
deterministic = TRUE;
|
deterministic = true;
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
deterministic = FALSE;
|
deterministic = false;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
case 'H':
|
case 'H':
|
||||||
show_help = 1;
|
show_help = 1;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
touch = TRUE;
|
touch = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
case 'V':
|
case 'V':
|
||||||
@ -1292,7 +1292,7 @@ write_archive (bfd *iarch)
|
|||||||
obfd->flags |= BFD_ARCHIVE_FULL_PATH;
|
obfd->flags |= BFD_ARCHIVE_FULL_PATH;
|
||||||
|
|
||||||
if (make_thin_archive || bfd_is_thin_archive (iarch))
|
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))
|
if (!bfd_set_archive_head (obfd, contents_head))
|
||||||
bfd_fatal (old_name);
|
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. */
|
/* We don't care if this fails; we might be creating the archive. */
|
||||||
bfd_close (iarch);
|
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);
|
xexit (1);
|
||||||
free (old_name);
|
free (old_name);
|
||||||
free (new_name);
|
free (new_name);
|
||||||
@ -1357,8 +1357,8 @@ static void
|
|||||||
delete_members (bfd *arch, char **files_to_delete)
|
delete_members (bfd *arch, char **files_to_delete)
|
||||||
{
|
{
|
||||||
bfd **current_ptr_ptr;
|
bfd **current_ptr_ptr;
|
||||||
bfd_boolean found;
|
bool found;
|
||||||
bfd_boolean something_changed = FALSE;
|
bool something_changed = false;
|
||||||
int match_count;
|
int match_count;
|
||||||
|
|
||||||
for (; *files_to_delete != NULL; ++files_to_delete)
|
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"))
|
if (!strcmp (*files_to_delete, "__.SYMDEF"))
|
||||||
{
|
{
|
||||||
arch->has_armap = FALSE;
|
arch->has_armap = false;
|
||||||
write_armap = -1;
|
write_armap = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
found = FALSE;
|
found = false;
|
||||||
match_count = 0;
|
match_count = 0;
|
||||||
current_ptr_ptr = &(arch->archive_next);
|
current_ptr_ptr = &(arch->archive_next);
|
||||||
while (*current_ptr_ptr)
|
while (*current_ptr_ptr)
|
||||||
@ -1393,8 +1393,8 @@ delete_members (bfd *arch, char **files_to_delete)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
found = TRUE;
|
found = true;
|
||||||
something_changed = TRUE;
|
something_changed = true;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf ("d - %s\n",
|
printf ("d - %s\n",
|
||||||
*files_to_delete);
|
*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! */
|
/* Ought to default to replacing in place, but this is existing practice! */
|
||||||
|
|
||||||
static void
|
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 **after_bfd; /* New entries go after this one. */
|
||||||
bfd *current;
|
bfd *current;
|
||||||
bfd **current_ptr;
|
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
|
normalize (bfd_get_filename (current), arch)) == 0
|
||||||
&& current->arelt_data != NULL)
|
&& current->arelt_data != NULL)
|
||||||
{
|
{
|
||||||
bfd_boolean replaced;
|
bool replaced;
|
||||||
if (newer_only)
|
if (newer_only)
|
||||||
{
|
{
|
||||||
struct stat fsbuf, asbuf;
|
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. */
|
/* Snip out this entry from the chain. */
|
||||||
*current_ptr = (*current_ptr)->archive_next;
|
*current_ptr = (*current_ptr)->archive_next;
|
||||||
changed = TRUE;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto next_file;
|
goto next_file;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
|||||||
want to hack multiple references. */
|
want to hack multiple references. */
|
||||||
for (ptr = list; ptr; ptr = ptr->next)
|
for (ptr = list; ptr; ptr = ptr->next)
|
||||||
{
|
{
|
||||||
bfd_boolean found = FALSE;
|
bool found = false;
|
||||||
bfd *prev = arch;
|
bfd *prev = arch;
|
||||||
|
|
||||||
for (head = arch->archive_next; head; head = head->archive_next)
|
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
|
if (bfd_get_filename (head) != NULL
|
||||||
&& FILENAME_CMP (ptr->name, bfd_get_filename (head)) == 0)
|
&& FILENAME_CMP (ptr->name, bfd_get_filename (head)) == 0)
|
||||||
{
|
{
|
||||||
found = TRUE;
|
found = true;
|
||||||
function (head, prev);
|
function (head, prev);
|
||||||
}
|
}
|
||||||
prev = head;
|
prev = head;
|
||||||
@ -98,7 +98,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
|||||||
static void
|
static void
|
||||||
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
|
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
print_arelt_descr(outfile, abfd, verbose, FALSE);
|
print_arelt_descr(outfile, abfd, verbose, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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;
|
obfd = 0;
|
||||||
free (temp_name);
|
free (temp_name);
|
||||||
free (real_name);
|
free (real_name);
|
||||||
|
|||||||
@ -53,13 +53,13 @@ iovec_stat (struct bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
return fstat (fileno ((FILE*) stream), sb);
|
return fstat (fileno ((FILE*) stream), sb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
check_format_any (struct bfd *abfd, bfd_format format)
|
check_format_any (struct bfd *abfd, bfd_format format)
|
||||||
{
|
{
|
||||||
char** targets = NULL;
|
char** targets = NULL;
|
||||||
|
|
||||||
if (bfd_check_format_matches (abfd, format, &targets))
|
if (bfd_check_format_matches (abfd, format, &targets))
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
if (targets)
|
if (targets)
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ check_format_any (struct bfd *abfd, bfd_format format)
|
|||||||
return bfd_check_format (abfd, format);
|
return bfd_check_format (abfd, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
@ -38,9 +38,9 @@ ar_emul_default_usage (FILE *fp)
|
|||||||
fprintf (fp, _(" No emulation specific options\n"));
|
fprintf (fp, _(" No emulation specific options\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_append (bfd **after_bfd, char *file_name, const char *target,
|
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;
|
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,
|
return bin_dummy_emulation.ar_append (after_bfd, new_bfd,
|
||||||
verbose, flatten);
|
verbose, flatten);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_append_bfd (bfd **after_bfd, bfd *new_bfd,
|
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)
|
if (bin_dummy_emulation.ar_append)
|
||||||
return bin_dummy_emulation.ar_append (after_bfd, new_bfd,
|
return bin_dummy_emulation.ar_append (after_bfd, new_bfd,
|
||||||
verbose, flatten);
|
verbose, flatten);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
any_ok (bfd *new_bfd ATTRIBUTE_UNUSED)
|
any_ok (bfd *new_bfd ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
||||||
bfd_boolean verbose, bfd_boolean flatten,
|
bool verbose, bool flatten,
|
||||||
bfd_boolean (*check) (bfd *))
|
bool (*check) (bfd *))
|
||||||
{
|
{
|
||||||
/* When flattening, add the members of an archive instead of the
|
/* When flattening, add the members of an archive instead of the
|
||||||
archive itself. */
|
archive itself. */
|
||||||
if (flatten && bfd_check_format (new_bfd, bfd_archive))
|
if (flatten && bfd_check_format (new_bfd, bfd_archive))
|
||||||
{
|
{
|
||||||
bfd *elt;
|
bfd *elt;
|
||||||
bfd_boolean added = FALSE;
|
bool added = false;
|
||||||
|
|
||||||
for (elt = bfd_openr_next_archived_file (new_bfd, NULL);
|
for (elt = bfd_openr_next_archived_file (new_bfd, NULL);
|
||||||
elt;
|
elt;
|
||||||
elt = bfd_openr_next_archived_file (new_bfd, 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);
|
after_bfd = &((*after_bfd)->archive_next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,26 +97,26 @@ do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!check (new_bfd))
|
if (!check (new_bfd))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
AR_EMUL_APPEND_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
AR_EMUL_APPEND_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||||
|
|
||||||
new_bfd->archive_next = *after_bfd;
|
new_bfd->archive_next = *after_bfd;
|
||||||
*after_bfd = new_bfd;
|
*after_bfd = new_bfd;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_default_append (bfd **after_bfd, bfd *new_bfd,
|
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);
|
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,
|
ar_emul_replace (bfd **after_bfd, char *file_name, const char *target,
|
||||||
bfd_boolean verbose)
|
bool verbose)
|
||||||
{
|
{
|
||||||
bfd *new_bfd;
|
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,
|
return bin_dummy_emulation.ar_replace (after_bfd, new_bfd,
|
||||||
verbose);
|
verbose);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_replace_bfd (bfd **after_bfd, bfd *new_bfd,
|
ar_emul_replace_bfd (bfd **after_bfd, bfd *new_bfd,
|
||||||
bfd_boolean verbose)
|
bool verbose)
|
||||||
{
|
{
|
||||||
if (bin_dummy_emulation.ar_replace)
|
if (bin_dummy_emulation.ar_replace)
|
||||||
return bin_dummy_emulation.ar_replace (after_bfd, new_bfd,
|
return bin_dummy_emulation.ar_replace (after_bfd, new_bfd,
|
||||||
verbose);
|
verbose);
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_default_replace (bfd **after_bfd, bfd *new_bfd,
|
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));
|
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||||
|
|
||||||
new_bfd->archive_next = *after_bfd;
|
new_bfd->archive_next = *after_bfd;
|
||||||
*after_bfd = new_bfd;
|
*after_bfd = new_bfd;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
ar_emul_parse_arg (char *arg)
|
ar_emul_parse_arg (char *arg)
|
||||||
{
|
{
|
||||||
if (bin_dummy_emulation.ar_parse_arg)
|
if (bin_dummy_emulation.ar_parse_arg)
|
||||||
return bin_dummy_emulation.ar_parse_arg (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)
|
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_usage (FILE *);
|
||||||
extern void ar_emul_default_usage (FILE *);
|
extern void ar_emul_default_usage (FILE *);
|
||||||
extern bfd_boolean ar_emul_append (bfd **, char *, const char *,
|
extern bool ar_emul_append (bfd **, char *, const char *, bool, bool);
|
||||||
bfd_boolean, bfd_boolean);
|
extern bool ar_emul_append_bfd (bfd **, bfd *, bool, bool);
|
||||||
extern bfd_boolean ar_emul_append_bfd (bfd **, bfd *,
|
extern bool ar_emul_default_append (bfd **, bfd *, bool, bool);
|
||||||
bfd_boolean, bfd_boolean);
|
extern bool do_ar_emul_append (bfd **, bfd *, bool, bool, bool (*)(bfd *));
|
||||||
extern bfd_boolean ar_emul_default_append (bfd **, bfd *,
|
extern bool ar_emul_replace (bfd **, char *, const char *, bool);
|
||||||
bfd_boolean, bfd_boolean);
|
extern bool ar_emul_replace_bfd (bfd **, bfd *, bool);
|
||||||
extern bfd_boolean do_ar_emul_append (bfd **, bfd *,
|
extern bool ar_emul_default_replace (bfd **, bfd *, bool);
|
||||||
bfd_boolean, bfd_boolean,
|
extern bool ar_emul_parse_arg (char *);
|
||||||
bfd_boolean (*)(bfd *));
|
extern bool ar_emul_default_parse_arg (char *);
|
||||||
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 *);
|
|
||||||
|
|
||||||
/* Macros for common output. */
|
/* Macros for common output. */
|
||||||
|
|
||||||
@ -64,10 +56,10 @@ extern bfd_boolean ar_emul_default_parse_arg (char *);
|
|||||||
typedef struct bin_emulation_xfer_struct
|
typedef struct bin_emulation_xfer_struct
|
||||||
{
|
{
|
||||||
/* Print out the extra options. */
|
/* Print out the extra options. */
|
||||||
void (* ar_usage) (FILE *fp);
|
void (*ar_usage) (FILE *fp);
|
||||||
bfd_boolean (* ar_append) (bfd **, bfd *, bfd_boolean, bfd_boolean);
|
bool (*ar_append) (bfd **, bfd *, bool, bool);
|
||||||
bfd_boolean (* ar_replace) (bfd **, bfd *, bfd_boolean);
|
bool (*ar_replace) (bfd **, bfd *, bool);
|
||||||
bfd_boolean (* ar_parse_arg) (char *);
|
bool (*ar_parse_arg) (char *);
|
||||||
}
|
}
|
||||||
bin_emulation_xfer_type;
|
bin_emulation_xfer_type;
|
||||||
|
|
||||||
|
|||||||
@ -435,7 +435,7 @@ display_info (void)
|
|||||||
Mode User\tGroup\tSize\tDate Name */
|
Mode User\tGroup\tSize\tDate Name */
|
||||||
|
|
||||||
void
|
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;
|
struct stat buf;
|
||||||
|
|
||||||
@ -677,18 +677,18 @@ bfd_get_archive_filename (const bfd *abfd)
|
|||||||
is valid for writing. For security reasons absolute paths
|
is valid for writing. For security reasons absolute paths
|
||||||
and paths containing /../ are not allowed. See PR 17533. */
|
and paths containing /../ are not allowed. See PR 17533. */
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
is_valid_archive_path (char const * pathname)
|
is_valid_archive_path (char const * pathname)
|
||||||
{
|
{
|
||||||
const char * n = pathname;
|
const char * n = pathname;
|
||||||
|
|
||||||
if (IS_ABSOLUTE_PATH (n))
|
if (IS_ABSOLUTE_PATH (n))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
while (*n)
|
while (*n)
|
||||||
{
|
{
|
||||||
if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
|
if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
while (*n && ! IS_DIR_SEPARATOR (*n))
|
while (*n && ! IS_DIR_SEPARATOR (*n))
|
||||||
n++;
|
n++;
|
||||||
@ -696,5 +696,5 @@ is_valid_archive_path (char const * pathname)
|
|||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ void list_supported_architectures (const char *, FILE *);
|
|||||||
|
|
||||||
int display_info (void);
|
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_tempname (const char *, int *);
|
||||||
char *make_tempdir (const char *);
|
char *make_tempdir (const char *);
|
||||||
@ -58,7 +58,7 @@ bfd_vma parse_vma (const char *, const char *);
|
|||||||
|
|
||||||
off_t get_file_size (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;
|
extern char *program_name;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ extern void print_version (const char *);
|
|||||||
extern void set_times (const char *, const struct stat *);
|
extern void set_times (const char *, const struct stat *);
|
||||||
|
|
||||||
extern int smart_rename (const char *, const char *, int,
|
extern int smart_rename (const char *, const char *, int,
|
||||||
struct stat *, bfd_boolean);
|
struct stat *, bool);
|
||||||
|
|
||||||
|
|
||||||
/* In libiberty. */
|
/* In libiberty. */
|
||||||
|
|||||||
@ -24,28 +24,28 @@
|
|||||||
|
|
||||||
/* Routine used to read generic debugging information. */
|
/* 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. */
|
/* Routine used to print generic debugging information. */
|
||||||
|
|
||||||
extern bfd_boolean print_debugging_info
|
extern bool print_debugging_info
|
||||||
(FILE *, void *, bfd *, asymbol **,
|
(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. */
|
/* 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 *);
|
(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 *);
|
(bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *);
|
||||||
|
|
||||||
/* Routine used to read COFF debugging information. */
|
/* 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
|
#endif
|
||||||
|
|||||||
@ -720,7 +720,7 @@ static struct coff_ofile *
|
|||||||
doit (void)
|
doit (void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
bfd_boolean infile = FALSE;
|
bool infile = false;
|
||||||
struct coff_ofile *head =
|
struct coff_ofile *head =
|
||||||
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
|
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
|
||||||
|
|
||||||
@ -753,7 +753,7 @@ doit (void)
|
|||||||
if (infile)
|
if (infile)
|
||||||
pop_scope ();
|
pop_scope ();
|
||||||
else
|
else
|
||||||
infile = TRUE;
|
infile = true;
|
||||||
|
|
||||||
push_scope (1);
|
push_scope (1);
|
||||||
file_scope = n->scope = top_scope;
|
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
|
/* This is called at the start of each new compilation unit with the
|
||||||
name of the main file in the new unit. */
|
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
|
/* This is called at the start of each source file within a
|
||||||
compilation unit, before outputting any global information for
|
compilation unit, before outputting any global information for
|
||||||
that file. The argument is the name of the file. */
|
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. */
|
/* Each writer must keep a stack of types. */
|
||||||
|
|
||||||
/* Push an empty type onto the type stack. This type can appear if
|
/* Push an empty type onto the type stack. This type can appear if
|
||||||
there is a reference to a type which is never defined. */
|
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. */
|
/* 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
|
/* Push an integer type onto the type stack, given the size and
|
||||||
whether it is unsigned. */
|
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. */
|
/* 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. */
|
/* 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. */
|
/* Push a bool type onto the type stack, given the size. */
|
||||||
bfd_boolean (*bool_type) (void *, unsigned int);
|
bool (*bool_type) (void *, unsigned int);
|
||||||
|
|
||||||
/* Push an enum type onto the type stack, given the tag, a NULL
|
/* Push an enum type onto the type stack, given the tag, a NULL
|
||||||
terminated array of names and the associated values. If there is
|
terminated array of names and the associated values. If there is
|
||||||
no tag, the tag argument will be NULL. If this is an undefined
|
no tag, the tag argument will be NULL. If this is an undefined
|
||||||
enum, the names and values arguments will be NULL. */
|
enum, the names and values arguments will be NULL. */
|
||||||
bfd_boolean (*enum_type)
|
bool (*enum_type)
|
||||||
(void *, const char *, const char **, bfd_signed_vma *);
|
(void *, const char *, const char **, bfd_signed_vma *);
|
||||||
|
|
||||||
/* Pop the top type on the type stack, and push a pointer to that
|
/* Pop the top type on the type stack, and push a pointer to that
|
||||||
type onto the type stack. */
|
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
|
/* Push a function type onto the type stack. The second argument
|
||||||
indicates the number of argument types that have been pushed onto
|
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
|
function takes a variable number of arguments. The return type
|
||||||
of the function is pushed onto the type stack below the argument
|
of the function is pushed onto the type stack below the argument
|
||||||
types, if any. */
|
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
|
/* Pop the top type on the type stack, and push a reference to that
|
||||||
type onto the type stack. */
|
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
|
/* 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. */
|
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
|
/* 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
|
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
|
element type. These should be popped before the array type is
|
||||||
pushed. The arguments are the lower bound, the upper bound, and
|
pushed. The arguments are the lower bound, the upper bound, and
|
||||||
whether the array is a string. */
|
whether the array is a string. */
|
||||||
bfd_boolean (*array_type)
|
bool (*array_type)
|
||||||
(void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
|
(void *, bfd_signed_vma, bfd_signed_vma, bool);
|
||||||
|
|
||||||
/* Pop the top type on the type stack, and push a set of that type
|
/* 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
|
onto the type stack. The argument indicates whether this set is
|
||||||
a bitstring. */
|
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
|
/* 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
|
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
|
stack is the base type. These should be popped before the offset
|
||||||
type is pushed. */
|
type is pushed. */
|
||||||
bfd_boolean (*offset_type) (void *);
|
bool (*offset_type) (void *);
|
||||||
|
|
||||||
/* Push a method type onto the type stack. If the second argument
|
/* Push a method type onto the type stack. If the second argument
|
||||||
is TRUE, the top type on the stack is the class to which the
|
is TRUE, the top type on the stack is the class to which the
|
||||||
@ -258,15 +258,15 @@ struct debug_write_fns
|
|||||||
type on the type stack below the domain and the argument types is
|
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,
|
the return type of the method. All these types must be popped,
|
||||||
and then the method type must be pushed. */
|
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
|
/* Pop the top type off the type stack, and push a const qualified
|
||||||
version of that type onto the type stack. */
|
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
|
/* Pop the top type off the type stack, and push a volatile
|
||||||
qualified version of that type onto the type stack. */
|
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
|
/* Start building a struct. This is followed by calls to the
|
||||||
struct_field function, and finished by a call 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
|
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
|
undefined struct or union, the size will be 0 and struct_field
|
||||||
will not be called before end_struct_type is called. */
|
will not be called before end_struct_type is called. */
|
||||||
bfd_boolean (*start_struct_type)
|
bool (*start_struct_type)
|
||||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int);
|
(void *, const char *, unsigned int, bool, unsigned int);
|
||||||
|
|
||||||
/* Add a field to the struct type currently being built. The type
|
/* Add a field to the struct type currently being built. The type
|
||||||
of the field should be popped off the type stack. The arguments
|
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
|
are the name, the bit position, the bit size (may be zero if the
|
||||||
field is not packed), and the visibility. */
|
field is not packed), and the visibility. */
|
||||||
bfd_boolean (*struct_field)
|
bool (*struct_field)
|
||||||
(void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
|
(void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
|
||||||
|
|
||||||
/* Finish building a struct, and push it onto the type stack. */
|
/* 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
|
/* Start building a class. This is followed by calls to several
|
||||||
functions: struct_field, class_static_member, class_baseclass,
|
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
|
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
|
holding the virtual function table should be popped from the type
|
||||||
stack. */
|
stack. */
|
||||||
bfd_boolean (*start_class_type)
|
bool (*start_class_type)
|
||||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int,
|
(void *, const char *, unsigned int, bool, unsigned int, bool, bool);
|
||||||
bfd_boolean, bfd_boolean);
|
|
||||||
|
|
||||||
/* Add a static member to the class currently being built. The
|
/* Add a static member to the class currently being built. The
|
||||||
arguments are the field name, the physical name, and the
|
arguments are the field name, the physical name, and the
|
||||||
visibility. The type must be popped off the type stack. */
|
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);
|
(void *, const char *, const char *, enum debug_visibility);
|
||||||
|
|
||||||
/* Add a baseclass to the class currently being built. The type of
|
/* Add a baseclass to the class currently being built. The type of
|
||||||
the baseclass must be popped off the type stack. The arguments
|
the baseclass must be popped off the type stack. The arguments
|
||||||
are the bit position, whether the class is virtual, and the
|
are the bit position, whether the class is virtual, and the
|
||||||
visibility. */
|
visibility. */
|
||||||
bfd_boolean (*class_baseclass)
|
bool (*class_baseclass)
|
||||||
(void *, bfd_vma, bfd_boolean, enum debug_visibility);
|
(void *, bfd_vma, bool, enum debug_visibility);
|
||||||
|
|
||||||
/* Start adding a method to the class currently being built. This
|
/* Start adding a method to the class currently being built. This
|
||||||
is followed by calls to class_method_variant and
|
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
|
method which take different arguments. The method is finished
|
||||||
with a call to class_end_method. The argument is the method
|
with a call to class_end_method. The argument is the method
|
||||||
name. */
|
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.
|
/* Describe a variant to the class method currently being built.
|
||||||
The type of the variant must be popped off the type stack. The
|
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
|
const, whether the variant is volatile, the offset in the virtual
|
||||||
function table, and whether the context is on the type stack
|
function table, and whether the context is on the type stack
|
||||||
(below the variant type). */
|
(below the variant type). */
|
||||||
bfd_boolean (*class_method_variant)
|
bool (*class_method_variant)
|
||||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
(void *, const char *, enum debug_visibility, bool, bool, bfd_vma, bool);
|
||||||
bfd_boolean, bfd_vma, bfd_boolean);
|
|
||||||
|
|
||||||
/* Describe a static variant to the class method currently being
|
/* Describe a static variant to the class method currently being
|
||||||
built. The arguments are the same as for class_method_variant,
|
built. The arguments are the same as for class_method_variant,
|
||||||
except that the last two arguments are omitted. The type of the
|
except that the last two arguments are omitted. The type of the
|
||||||
variant must be popped off the type stack. */
|
variant must be popped off the type stack. */
|
||||||
bfd_boolean (*class_static_method_variant)
|
bool (*class_static_method_variant)
|
||||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
(void *, const char *, enum debug_visibility, bool, bool);
|
||||||
bfd_boolean);
|
|
||||||
|
|
||||||
/* Finish describing a class method. */
|
/* 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. */
|
/* 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
|
/* Push a type on the stack which was given a name by an earlier
|
||||||
call to typdef. */
|
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
|
/* 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
|
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
|
for a struct (class) being defined, in between the call to
|
||||||
start_struct_type (start_class_type) and the call to
|
start_struct_type (start_class_type) and the call to
|
||||||
end_struct_type (end_class_type). */
|
end_struct_type (end_class_type). */
|
||||||
bfd_boolean (*tag_type)
|
bool (*tag_type)
|
||||||
(void *, const char *, unsigned int, enum debug_type_kind);
|
(void *, const char *, unsigned int, enum debug_type_kind);
|
||||||
|
|
||||||
/* Pop the type stack, and typedef it to the given name. */
|
/* 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
|
/* 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
|
enum or whatever. The tag passed down here is redundant, since
|
||||||
was also passed when enum_type, start_struct_type, or
|
was also passed when enum_type, start_struct_type, or
|
||||||
start_class_type was called. */
|
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. */
|
/* 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. */
|
/* 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
|
/* This is called to record a typed integer constant. The type is
|
||||||
popped off the type stack. */
|
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
|
/* This is called to record a variable. The type is popped off the
|
||||||
type stack. */
|
type stack. */
|
||||||
bfd_boolean (*variable)
|
bool (*variable)
|
||||||
(void *, const char *, enum debug_var_kind, bfd_vma);
|
(void *, const char *, enum debug_var_kind, bfd_vma);
|
||||||
|
|
||||||
/* Start writing out a function. The return type must be popped off
|
/* 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
|
is followed by calls to function_parameter, followed by block
|
||||||
information. */
|
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
|
/* Record a function parameter for the current function. The type
|
||||||
must be popped off the stack. */
|
must be popped off the stack. */
|
||||||
bfd_boolean (*function_parameter)
|
bool (*function_parameter)
|
||||||
(void *, const char *, enum debug_parm_kind, bfd_vma);
|
(void *, const char *, enum debug_parm_kind, bfd_vma);
|
||||||
|
|
||||||
/* Start writing out a block. There is at least one top level block
|
/* Start writing out a block. There is at least one top level block
|
||||||
per function. Blocks may be nested. The argument is the
|
per function. Blocks may be nested. The argument is the
|
||||||
starting address of the block. */
|
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
|
/* Finish writing out a block. The argument is the ending address
|
||||||
of the block. */
|
of the block. */
|
||||||
bfd_boolean (*end_block) (void *, bfd_vma);
|
bool (*end_block) (void *, bfd_vma);
|
||||||
|
|
||||||
/* Finish writing out a function. */
|
/* Finish writing out a function. */
|
||||||
bfd_boolean (*end_function) (void *);
|
bool (*end_function) (void *);
|
||||||
|
|
||||||
/* Record line number information for the current compilation unit. */
|
/* 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. */
|
/* Exported functions. */
|
||||||
@ -433,81 +430,81 @@ extern void *debug_init (void);
|
|||||||
/* Set the source filename. This implicitly starts a new compilation
|
/* Set the source filename. This implicitly starts a new compilation
|
||||||
unit. */
|
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
|
/* Change source files to the given file name. This is used for
|
||||||
include files in a single compilation unit. */
|
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
|
/* Record a function definition. This implicitly starts a function
|
||||||
block. The debug_type argument is the type of the return value.
|
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 bfd_vma is the address of the start of the function. Currently
|
||||||
the parameter types are specified by calls to
|
the parameter types are specified by calls to
|
||||||
debug_record_parameter. */
|
debug_record_parameter. */
|
||||||
|
|
||||||
extern bfd_boolean debug_record_function
|
extern bool debug_record_function
|
||||||
(void *, const char *, debug_type, bfd_boolean, bfd_vma);
|
(void *, const char *, debug_type, bool, bfd_vma);
|
||||||
|
|
||||||
/* Record a parameter for the current function. */
|
/* 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);
|
(void *, const char *, debug_type, enum debug_parm_kind, bfd_vma);
|
||||||
|
|
||||||
/* End a function definition. The argument is the address where the
|
/* End a function definition. The argument is the address where the
|
||||||
function ends. */
|
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
|
/* Start a block in a function. All local information will be
|
||||||
recorded in this block, until the matching call to debug_end_block.
|
recorded in this block, until the matching call to debug_end_block.
|
||||||
debug_start_block and debug_end_block may be nested. The argument
|
debug_start_block and debug_end_block may be nested. The argument
|
||||||
is the address at which this block starts. */
|
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
|
/* Finish a block in a function. This matches the call to
|
||||||
debug_start_block. The argument is the address at which this block
|
debug_start_block. The argument is the address at which this block
|
||||||
ends. */
|
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
|
/* Associate a line number in the current source file with a given
|
||||||
address. */
|
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
|
/* Start a named common block. This is a block of variables that may
|
||||||
move in memory. */
|
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. */
|
/* 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. */
|
/* 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. */
|
/* 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. */
|
/* 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);
|
(void *, const char *, debug_type, bfd_vma);
|
||||||
|
|
||||||
/* Record a label. */
|
/* Record a label. */
|
||||||
|
|
||||||
extern bfd_boolean debug_record_label
|
extern bool debug_record_label
|
||||||
(void *, const char *, debug_type, bfd_vma);
|
(void *, const char *, debug_type, bfd_vma);
|
||||||
|
|
||||||
/* Record a variable. */
|
/* 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);
|
(void *, const char *, debug_type, enum debug_var_kind, bfd_vma);
|
||||||
|
|
||||||
/* Make an indirect type. The first argument is a pointer to the
|
/* 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 *);
|
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. */
|
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
|
/* Make a floating point type of a given size. FIXME: On some
|
||||||
platforms, like an Alpha, you probably need to be able to specify
|
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. */
|
The fourth argument is a NULL terminated array of fields. */
|
||||||
|
|
||||||
extern debug_type debug_make_struct_type
|
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
|
/* Make an object type. The first three arguments after the handle
|
||||||
are the same as for debug_make_struct_type. The next arguments are
|
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
|
a NULL terminated array of base classes, a NULL terminated array of
|
||||||
methods, the type of the object holding the virtual function table
|
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. */
|
object has its own virtual function table. */
|
||||||
|
|
||||||
extern debug_type debug_make_object_type
|
extern debug_type debug_make_object_type
|
||||||
(void *, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
|
(void *, bool, bfd_vma, debug_field *, debug_baseclass *,
|
||||||
debug_method *, debug_type, bfd_boolean);
|
debug_method *, debug_type, bool);
|
||||||
|
|
||||||
/* Make an enumeration type. The arguments are a null terminated
|
/* Make an enumeration type. The arguments are a null terminated
|
||||||
array of strings, and an array of corresponding values. */
|
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. */
|
are unknown. */
|
||||||
|
|
||||||
extern debug_type debug_make_function_type
|
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. */
|
/* 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
|
extern debug_type debug_make_array_type
|
||||||
(void *, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
|
(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
|
/* 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. */
|
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
|
/* 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
|
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. */
|
the argument types from the mangled name. */
|
||||||
|
|
||||||
extern debug_type debug_make_method_type
|
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. */
|
/* Make a const qualified version of a given type. */
|
||||||
|
|
||||||
@ -647,7 +644,7 @@ extern debug_type debug_make_undefined_tagged_type
|
|||||||
class. */
|
class. */
|
||||||
|
|
||||||
extern debug_baseclass debug_make_baseclass
|
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
|
/* 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
|
third argument is the type of the field. The fourth argument is
|
||||||
@ -685,16 +682,16 @@ extern debug_method debug_make_method
|
|||||||
function context. */
|
function context. */
|
||||||
|
|
||||||
extern debug_method_variant debug_make_method_variant
|
extern debug_method_variant debug_make_method_variant
|
||||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
(void *, const char *, debug_type, enum debug_visibility, bool,
|
||||||
bfd_boolean, bfd_vma, debug_type);
|
bool, bfd_vma, debug_type);
|
||||||
|
|
||||||
/* Make a static method argument. The arguments are the same as for
|
/* Make a static method argument. The arguments are the same as for
|
||||||
debug_make_method_variant, except that the last two are omitted
|
debug_make_method_variant, except that the last two are omitted
|
||||||
since a static method can not also be virtual. */
|
since a static method can not also be virtual. */
|
||||||
|
|
||||||
extern debug_method_variant debug_make_static_method_variant
|
extern debug_method_variant debug_make_static_method_variant
|
||||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
(void *, const char *, debug_type, enum debug_visibility, bool,
|
||||||
bfd_boolean);
|
bool);
|
||||||
|
|
||||||
/* Name a type. This returns a new type with an attached name. */
|
/* 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. */
|
/* 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. */
|
/* 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
|
method type (actually, parameter types are not currently stored for
|
||||||
function types). This may be used to determine whether a method
|
function types). This may be used to determine whether a method
|
||||||
type is a stub method or not. The last argument points to a
|
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. */
|
number of arguments. */
|
||||||
|
|
||||||
extern const debug_type *debug_get_parameter_types
|
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
|
/* Get the target type of a pointer or reference or const or volatile
|
||||||
type. */
|
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
|
first void * is the debugging handle. The second void * is a handle
|
||||||
which is passed to the functions. */
|
which is passed to the functions. */
|
||||||
|
|
||||||
extern bfd_boolean debug_write
|
extern bool debug_write
|
||||||
(void *, const struct debug_write_fns *, void *);
|
(void *, const struct debug_write_fns *, void *);
|
||||||
|
|
||||||
#endif /* DEBUG_H */
|
#endif /* DEBUG_H */
|
||||||
|
|||||||
@ -355,7 +355,7 @@ static char *exp_name;
|
|||||||
static char *imp_name;
|
static char *imp_name;
|
||||||
static char *delayimp_name;
|
static char *delayimp_name;
|
||||||
static char *identify_imp_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
|
/* Types used to implement a linked list of dllnames associated
|
||||||
with the specified import lib. Used by the identify_* code.
|
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. */
|
/* Types used to pass data to iterator functions. */
|
||||||
typedef struct symname_search_data_t
|
typedef struct symname_search_data_t
|
||||||
{
|
{
|
||||||
const char * symname;
|
const char *symname;
|
||||||
bfd_boolean found;
|
bool found;
|
||||||
} symname_search_data_type;
|
} symname_search_data_type;
|
||||||
|
|
||||||
typedef struct identify_data_t
|
typedef struct identify_data_t
|
||||||
{
|
{
|
||||||
dll_name_list_type * list;
|
dll_name_list_type *list;
|
||||||
bfd_boolean ms_style_implib;
|
bool ms_style_implib;
|
||||||
} identify_data_type;
|
} identify_data_type;
|
||||||
|
|
||||||
|
|
||||||
@ -403,23 +403,23 @@ static int dontdeltemps = 0;
|
|||||||
|
|
||||||
/* TRUE if we should export all symbols. Otherwise, we only export
|
/* TRUE if we should export all symbols. Otherwise, we only export
|
||||||
symbols listed in .drectve sections or in the def file. */
|
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
|
/* TRUE if we should exclude the symbols in DEFAULT_EXCLUDES when
|
||||||
exporting all symbols. */
|
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. */
|
/* Default symbols to exclude when exporting all the symbols. */
|
||||||
static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
|
static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
|
||||||
|
|
||||||
/* TRUE if we should add __imp_<SYMBOL> to import libraries for backward
|
/* TRUE if we should add __imp_<SYMBOL> to import libraries for backward
|
||||||
compatibility to old Cygwin releases. */
|
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. */
|
/* TRUE if we have to write PE+ import libraries. */
|
||||||
static bfd_boolean create_for_pep;
|
static bool create_for_pep;
|
||||||
|
|
||||||
static char *def_file;
|
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_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_roff2; /* Offset for the ind 32 reloc into idata 5. */
|
||||||
int how_dljtab_roff3; /* 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;
|
const char *trampoline;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -625,7 +625,7 @@ mtable[] =
|
|||||||
".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
|
".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
|
||||||
"pe-arm-little", bfd_arch_arm,
|
"pe-arm-little", bfd_arch_arm,
|
||||||
arm_jtab, sizeof (arm_jtab), 8,
|
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", "",
|
"jmp *", ".global", ".space", ".align\t2",".align\t4", "",
|
||||||
"pe-i386",bfd_arch_i386,
|
"pe-i386",bfd_arch_i386,
|
||||||
i386_jtab, sizeof (i386_jtab), 2,
|
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",
|
".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
|
||||||
"pe-arm-little", bfd_arch_arm,
|
"pe-arm-little", bfd_arch_arm,
|
||||||
thumb_jtab, sizeof (thumb_jtab), 12,
|
thumb_jtab, sizeof (thumb_jtab), 12,
|
||||||
0, 0, 0, 0, 0, FALSE, 0
|
0, 0, 0, 0, 0, false, 0
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
#define MARM_INTERWORK 3
|
#define MARM_INTERWORK 3
|
||||||
@ -654,7 +654,7 @@ mtable[] =
|
|||||||
".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
|
".global", ".space", ".align\t2",".align\t4", "-mthumb-interwork",
|
||||||
"pe-arm-little", bfd_arch_arm,
|
"pe-arm-little", bfd_arch_arm,
|
||||||
arm_interwork_jtab, sizeof (arm_interwork_jtab), 12,
|
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", "",
|
".global", ".space", ".align\t2",".align\t4", "",
|
||||||
"pe-mcore-big", bfd_arch_mcore,
|
"pe-mcore-big", bfd_arch_mcore,
|
||||||
mcore_be_jtab, sizeof (mcore_be_jtab), 8,
|
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",
|
".global", ".space", ".align\t2",".align\t4", "-EL",
|
||||||
"pe-mcore-little", bfd_arch_mcore,
|
"pe-mcore-little", bfd_arch_mcore,
|
||||||
mcore_le_jtab, sizeof (mcore_le_jtab), 8,
|
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", "",
|
".global", ".space", ".align\t2",".align\t4", "",
|
||||||
"elf32-mcore-big", bfd_arch_mcore,
|
"elf32-mcore-big", bfd_arch_mcore,
|
||||||
mcore_be_jtab, sizeof (mcore_be_jtab), 8,
|
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",
|
".global", ".space", ".align\t2",".align\t4", "-EL",
|
||||||
"elf32-mcore-little", bfd_arch_mcore,
|
"elf32-mcore-little", bfd_arch_mcore,
|
||||||
mcore_le_jtab, sizeof (mcore_le_jtab), 8,
|
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",
|
".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
|
||||||
"pe-arm-wince-little", bfd_arch_arm,
|
"pe-arm-wince-little", bfd_arch_arm,
|
||||||
arm_jtab, sizeof (arm_jtab), 8,
|
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", "",
|
"jmp *", ".global", ".space", ".align\t2",".align\t4", "",
|
||||||
"pe-x86-64",bfd_arch_i386,
|
"pe-x86-64",bfd_arch_i386,
|
||||||
i386_jtab, sizeof (i386_jtab), 2,
|
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 }
|
{ 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_drectve_symbols (bfd *);
|
||||||
static void scan_filtered_symbols (bfd *, void *, long, unsigned int);
|
static void scan_filtered_symbols (bfd *, void *, long, unsigned int);
|
||||||
static void add_excludes (const char *);
|
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 void set_default_excludes (void);
|
||||||
static long filter_symbols (bfd *, void *, long, unsigned int);
|
static long filter_symbols (bfd *, void *, long, unsigned int);
|
||||||
static void scan_all_symbols (bfd *);
|
static void scan_all_symbols (bfd *);
|
||||||
@ -793,7 +793,7 @@ static void identify_dll_for_implib (void);
|
|||||||
static void identify_search_archive
|
static void identify_search_archive
|
||||||
(bfd *, void (*) (bfd *, bfd *, void *), void *);
|
(bfd *, void (*) (bfd *, bfd *, void *), void *);
|
||||||
static void identify_search_member (bfd *, bfd *, 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_search_section (bfd *, asection *, void *);
|
||||||
static void identify_member_contains_symname (bfd *, bfd *, 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;
|
asymbol *sym;
|
||||||
const char *symbol_name;
|
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)
|
if (sym == NULL)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
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. */
|
/* See if STRING is on the list of symbols to exclude. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
match_exclude (const char *string)
|
match_exclude (const char *string)
|
||||||
{
|
{
|
||||||
struct string_list *excl_item;
|
struct string_list *excl_item;
|
||||||
|
|
||||||
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
|
for (excl_item = excludes; excl_item; excl_item = excl_item->next)
|
||||||
if (strcmp (string, excl_item->string) == 0)
|
if (strcmp (string, excl_item->string) == 0)
|
||||||
return TRUE;
|
return true;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the default list of symbols to exclude. */
|
/* 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;
|
int keep = 0;
|
||||||
asymbol *sym;
|
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)
|
if (sym == NULL)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
bfd_fatal (bfd_get_filename (abfd));
|
||||||
|
|
||||||
@ -1589,7 +1589,7 @@ scan_all_symbols (bfd *abfd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
symcount = bfd_read_minisymbols (abfd, FALSE, &minisyms, &size);
|
symcount = bfd_read_minisymbols (abfd, false, &minisyms, &size);
|
||||||
if (symcount < 0)
|
if (symcount < 0)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
bfd_fatal (bfd_get_filename (abfd));
|
||||||
|
|
||||||
@ -3195,7 +3195,7 @@ identify_member_contains_symname (bfd * abfd,
|
|||||||
search_data->symname,
|
search_data->symname,
|
||||||
strlen (search_data->symname)) == 0)
|
strlen (search_data->symname)) == 0)
|
||||||
{
|
{
|
||||||
search_data->found = TRUE;
|
search_data->found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3229,11 +3229,11 @@ identify_dll_for_implib (void)
|
|||||||
|
|
||||||
/* Initialize identify_data. */
|
/* Initialize identify_data. */
|
||||||
identify_data.list = dll_name_list_create ();
|
identify_data.list = dll_name_list_create ();
|
||||||
identify_data.ms_style_implib = FALSE;
|
identify_data.ms_style_implib = false;
|
||||||
|
|
||||||
/* Initialize search_data. */
|
/* Initialize search_data. */
|
||||||
search_data.symname = "__NULL_IMPORT_DESCRIPTOR";
|
search_data.symname = "__NULL_IMPORT_DESCRIPTOR";
|
||||||
search_data.found = FALSE;
|
search_data.found = false;
|
||||||
|
|
||||||
if (bfd_init () != BFD_INIT_MAGIC)
|
if (bfd_init () != BFD_INIT_MAGIC)
|
||||||
fatal (_("fatal error: libbfd ABI mismatch"));
|
fatal (_("fatal error: libbfd ABI mismatch"));
|
||||||
@ -3257,7 +3257,7 @@ identify_dll_for_implib (void)
|
|||||||
identify_member_contains_symname,
|
identify_member_contains_symname,
|
||||||
(void *)(& search_data));
|
(void *)(& search_data));
|
||||||
if (search_data.found)
|
if (search_data.found)
|
||||||
identify_data.ms_style_implib = TRUE;
|
identify_data.ms_style_implib = true;
|
||||||
|
|
||||||
/* Rewind the bfd. */
|
/* Rewind the bfd. */
|
||||||
if (! bfd_close (abfd))
|
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
|
By default, this is .idata$7 (.idata$6 if the import library is
|
||||||
ms-style). */
|
ms-style). */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
identify_process_section_p (asection * section, bfd_boolean ms_style_implib)
|
identify_process_section_p (asection * section, bool ms_style_implib)
|
||||||
{
|
{
|
||||||
static const char * SECTION_NAME = ".idata$7";
|
static const char * SECTION_NAME = ".idata$7";
|
||||||
static const char * MS_SECTION_NAME = ".idata$6";
|
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);
|
(ms_style_implib ? MS_SECTION_NAME : SECTION_NAME);
|
||||||
|
|
||||||
if (strcmp (section_name, section->name) == 0)
|
if (strcmp (section_name, section->name) == 0)
|
||||||
return TRUE;
|
return true;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If *section has contents and its name is .idata$7 (.idata$6 if
|
/* 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_byte *data = 0;
|
||||||
bfd_size_type datasize;
|
bfd_size_type datasize;
|
||||||
identify_data_type * identify_data = (identify_data_type *)obj;
|
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)
|
if ((section->flags & SEC_HAS_CONTENTS) == 0)
|
||||||
return;
|
return;
|
||||||
@ -3803,19 +3803,19 @@ main (int ac, char **av)
|
|||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case OPTION_EXPORT_ALL_SYMS:
|
case OPTION_EXPORT_ALL_SYMS:
|
||||||
export_all_symbols = TRUE;
|
export_all_symbols = true;
|
||||||
break;
|
break;
|
||||||
case OPTION_NO_EXPORT_ALL_SYMS:
|
case OPTION_NO_EXPORT_ALL_SYMS:
|
||||||
export_all_symbols = FALSE;
|
export_all_symbols = false;
|
||||||
break;
|
break;
|
||||||
case OPTION_EXCLUDE_SYMS:
|
case OPTION_EXCLUDE_SYMS:
|
||||||
add_excludes (optarg);
|
add_excludes (optarg);
|
||||||
break;
|
break;
|
||||||
case OPTION_NO_DEFAULT_EXCLUDES:
|
case OPTION_NO_DEFAULT_EXCLUDES:
|
||||||
do_default_excludes = FALSE;
|
do_default_excludes = false;
|
||||||
break;
|
break;
|
||||||
case OPTION_USE_NUL_PREFIXED_IMPORT_TABLES:
|
case OPTION_USE_NUL_PREFIXED_IMPORT_TABLES:
|
||||||
use_nul_prefixed_import_tables = TRUE;
|
use_nul_prefixed_import_tables = true;
|
||||||
break;
|
break;
|
||||||
case OPTION_ADD_STDCALL_UNDERSCORE:
|
case OPTION_ADD_STDCALL_UNDERSCORE:
|
||||||
add_stdcall_underscore = 1;
|
add_stdcall_underscore = 1;
|
||||||
@ -3980,7 +3980,7 @@ main (int ac, char **av)
|
|||||||
symbols in the .drectve section. The default excludes are meant
|
symbols in the .drectve section. The default excludes are meant
|
||||||
to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
|
to avoid exporting DLL entry point and Cygwin32 impure_ptr. */
|
||||||
if (! export_all_symbols)
|
if (! export_all_symbols)
|
||||||
do_default_excludes = FALSE;
|
do_default_excludes = false;
|
||||||
|
|
||||||
if (do_default_excludes)
|
if (do_default_excludes)
|
||||||
set_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;
|
struct dwo_info * next;
|
||||||
} dwo_info;
|
} dwo_info;
|
||||||
|
|
||||||
static dwo_info * first_dwo_info = NULL;
|
static dwo_info *first_dwo_info = NULL;
|
||||||
static bfd_boolean need_dwo_info;
|
static bool need_dwo_info;
|
||||||
|
|
||||||
separate_info * first_separate_info = NULL;
|
separate_info * first_separate_info = NULL;
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ int do_debug_cu_index;
|
|||||||
int do_wide;
|
int do_wide;
|
||||||
int do_debug_links;
|
int do_debug_links;
|
||||||
int do_follow_links = DEFAULT_FOR_FOLLOW_LINKS;
|
int do_follow_links = DEFAULT_FOR_FOLLOW_LINKS;
|
||||||
bfd_boolean do_checks;
|
bool do_checks;
|
||||||
|
|
||||||
int dwarf_cutoff_level = -1;
|
int dwarf_cutoff_level = -1;
|
||||||
unsigned long dwarf_start_die;
|
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 *cu_sets = NULL;
|
||||||
static struct cu_tu_set *tu_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
|
/* 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
|
the latest DW_AT_type seen for that level was a signed type or
|
||||||
an unsigned type. */
|
an unsigned type. */
|
||||||
#define MAX_CU_NESTING (1 << 8)
|
#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. */
|
/* Values for do_debug_lines. */
|
||||||
#define FLAG_DEBUG_LINES_RAW 1
|
#define FLAG_DEBUG_LINES_RAW 1
|
||||||
@ -341,7 +341,7 @@ dwarf_vmatoa64 (dwarf_vma hvalue, dwarf_vma lvalue, char *buf,
|
|||||||
dwarf_vma
|
dwarf_vma
|
||||||
read_leb128 (unsigned char *data,
|
read_leb128 (unsigned char *data,
|
||||||
const unsigned char *const end,
|
const unsigned char *const end,
|
||||||
bfd_boolean sign,
|
bool sign,
|
||||||
unsigned int *length_return,
|
unsigned int *length_return,
|
||||||
int *status_return)
|
int *status_return)
|
||||||
{
|
{
|
||||||
@ -737,7 +737,7 @@ fetch_indirect_line_string (dwarf_vma offset)
|
|||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
fetch_indexed_string (dwarf_vma idx, struct cu_tu_set *this_set,
|
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 str_sec_idx = dwo ? str_dwo : str;
|
||||||
enum dwarf_section_display_enum idx_sec_idx = dwo ? str_index_dwo : str_index;
|
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. */
|
found starting at DATA. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_type_signedness (abbrev_entry * entry,
|
get_type_signedness (abbrev_entry *entry,
|
||||||
const struct dwarf_section * section,
|
const struct dwarf_section *section,
|
||||||
unsigned char * data,
|
unsigned char *data,
|
||||||
unsigned const char * end,
|
unsigned const char *end,
|
||||||
dwarf_vma cu_offset,
|
dwarf_vma cu_offset,
|
||||||
dwarf_vma pointer_size,
|
dwarf_vma pointer_size,
|
||||||
dwarf_vma offset_size,
|
dwarf_vma offset_size,
|
||||||
int dwarf_version,
|
int dwarf_version,
|
||||||
bfd_boolean * is_signed,
|
bool *is_signed,
|
||||||
unsigned int nesting)
|
unsigned int nesting)
|
||||||
{
|
{
|
||||||
abbrev_attr * attr;
|
abbrev_attr * attr;
|
||||||
|
|
||||||
* is_signed = FALSE;
|
* is_signed = false;
|
||||||
|
|
||||||
#define MAX_NESTING 20
|
#define MAX_NESTING 20
|
||||||
if (nesting > MAX_NESTING)
|
if (nesting > MAX_NESTING)
|
||||||
@ -2295,7 +2295,7 @@ get_type_signedness (abbrev_entry * entry,
|
|||||||
case DW_ATE_unsigned:
|
case DW_ATE_unsigned:
|
||||||
case DW_ATE_unsigned_char:
|
case DW_ATE_unsigned_char:
|
||||||
case DW_ATE_unsigned_fixed:
|
case DW_ATE_unsigned_fixed:
|
||||||
* is_signed = FALSE;
|
* is_signed = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -2306,7 +2306,7 @@ get_type_signedness (abbrev_entry * entry,
|
|||||||
case DW_ATE_imaginary_float:
|
case DW_ATE_imaginary_float:
|
||||||
case DW_ATE_decimal_float:
|
case DW_ATE_decimal_float:
|
||||||
case DW_ATE_signed_fixed:
|
case DW_ATE_signed_fixed:
|
||||||
* is_signed = TRUE;
|
* is_signed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2315,10 +2315,10 @@ get_type_signedness (abbrev_entry * entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
read_and_print_leb128 (unsigned char * data,
|
read_and_print_leb128 (unsigned char *data,
|
||||||
unsigned int * bytes_read,
|
unsigned int *bytes_read,
|
||||||
unsigned const char * end,
|
unsigned const char *end,
|
||||||
bfd_boolean is_signed)
|
bool is_signed)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
dwarf_vma val = read_leb128 (data, end, is_signed, bytes_read, &status);
|
dwarf_vma val = read_leb128 (data, end, is_signed, bytes_read, &status);
|
||||||
@ -2363,9 +2363,9 @@ display_discr_list (unsigned long form,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_boolean is_signed =
|
bool is_signed =
|
||||||
(level > 0 && level <= MAX_CU_NESTING)
|
(level > 0 && level <= MAX_CU_NESTING)
|
||||||
? level_type_signed [level - 1] : FALSE;
|
? level_type_signed [level - 1] : false;
|
||||||
|
|
||||||
printf ("(");
|
printf ("(");
|
||||||
while (uvalue)
|
while (uvalue)
|
||||||
@ -2728,7 +2728,7 @@ read_and_display_attr_value (unsigned long attribute,
|
|||||||
if (!do_loc)
|
if (!do_loc)
|
||||||
{
|
{
|
||||||
const char *suffix = strrchr (section->name, '.');
|
const char *suffix = strrchr (section->name, '.');
|
||||||
bfd_boolean dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
bool dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||||
|
|
||||||
if (do_wide)
|
if (do_wide)
|
||||||
/* We have already displayed the form name. */
|
/* 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_strx2:
|
||||||
case DW_FORM_strx3:
|
case DW_FORM_strx3:
|
||||||
case DW_FORM_strx4:
|
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;
|
break;
|
||||||
case DW_FORM_string:
|
case DW_FORM_string:
|
||||||
add_dwo_name ((const char *) orig_data, cu_offset);
|
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_strx2:
|
||||||
case DW_FORM_strx3:
|
case DW_FORM_strx3:
|
||||||
case DW_FORM_strx4:
|
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;
|
break;
|
||||||
case DW_FORM_string:
|
case DW_FORM_string:
|
||||||
add_dwo_dir ((const char *) orig_data, cu_offset);
|
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
|
if (level >= 0 && level < MAX_CU_NESTING
|
||||||
&& uvalue < (size_t) (end - start))
|
&& uvalue < (size_t) (end - start))
|
||||||
{
|
{
|
||||||
bfd_boolean is_signed = FALSE;
|
bool is_signed = false;
|
||||||
abbrev_entry * type_abbrev;
|
abbrev_entry *type_abbrev;
|
||||||
unsigned char * type_data;
|
unsigned char *type_data;
|
||||||
unsigned long type_cu_offset;
|
unsigned long type_cu_offset;
|
||||||
|
|
||||||
type_abbrev = get_type_abbrev_from_form (form, uvalue, cu_offset,
|
type_abbrev = get_type_abbrev_from_form (form, uvalue, cu_offset,
|
||||||
section, NULL, & type_data, & type_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
|
following debug links, then attempt to load the requested section
|
||||||
from one of the separate debug info files. */
|
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,
|
load_debug_section_with_follow (enum dwarf_section_display_enum sec_enum,
|
||||||
void * handle)
|
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)
|
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
|
/* FIXME: We should check to see if any of the remaining debug info
|
||||||
files also contain this section, and, umm, do something about it. */
|
files also contain this section, and, umm, do something about it. */
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
introduce (struct dwarf_section * section, bfd_boolean raw)
|
introduce (struct dwarf_section * section, bool raw)
|
||||||
{
|
{
|
||||||
if (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
|
Returns TRUE upon success. Otherwise an error or warning message is
|
||||||
printed and FALSE is returned. */
|
printed and FALSE is returned. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
process_debug_info (struct dwarf_section * section,
|
process_debug_info (struct dwarf_section * section,
|
||||||
void * file,
|
void *file,
|
||||||
enum dwarf_section_display_enum abbrev_sec,
|
enum dwarf_section_display_enum abbrev_sec,
|
||||||
bfd_boolean do_loc,
|
bool do_loc,
|
||||||
bfd_boolean do_types)
|
bool do_types)
|
||||||
{
|
{
|
||||||
unsigned char *start = section->start;
|
unsigned char *start = section->start;
|
||||||
unsigned char *end = start + section->size;
|
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"),
|
warn (_("Reserved length value (0x%s) found in section %s\n"),
|
||||||
dwarf_vmatoa ("x", length), section->name);
|
dwarf_vmatoa ("x", length), section->name);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
section_begin += length + 4;
|
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"),
|
warn (_("Corrupt unit length (0x%s) found in section %s\n"),
|
||||||
dwarf_vmatoa ("x", length), section->name);
|
dwarf_vmatoa ("x", length), section->name);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_units == 0)
|
if (num_units == 0)
|
||||||
{
|
{
|
||||||
error (_("No comp units in %s section ?\n"), section->name);
|
error (_("No comp units in %s section ?\n"), section->name);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then allocate an array to hold the information. */
|
/* 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"),
|
error (_("Not enough memory for a debug info array of %u entries\n"),
|
||||||
num_units);
|
num_units);
|
||||||
alloc_num_debug_info_entries = num_debug_info_entries = 0;
|
alloc_num_debug_info_entries = num_debug_info_entries = 0;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PR 17531: file: 92ca3797.
|
/* PR 17531: file: 92ca3797.
|
||||||
@ -3590,11 +3590,11 @@ process_debug_info (struct dwarf_section * section,
|
|||||||
{
|
{
|
||||||
warn (_("Unable to locate %s section!\n"),
|
warn (_("Unable to locate %s section!\n"),
|
||||||
debug_displays [abbrev_sec].section.uncompressed_name);
|
debug_displays [abbrev_sec].section.uncompressed_name);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!do_loc && dwarf_start_die == 0)
|
if (!do_loc && dwarf_start_die == 0)
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
free_all_abbrevs ();
|
free_all_abbrevs ();
|
||||||
free (cu_abbrev_map);
|
free (cu_abbrev_map);
|
||||||
@ -3765,13 +3765,13 @@ process_debug_info (struct dwarf_section * section,
|
|||||||
if (compunit.cu_version < 5)
|
if (compunit.cu_version < 5)
|
||||||
SAFE_BYTE_GET_AND_INC (compunit.cu_pointer_size, hdrptr, 1, end);
|
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;
|
uint64_t dwo_id = 0;
|
||||||
if (compunit.cu_unit_type == DW_UT_split_compile
|
if (compunit.cu_unit_type == DW_UT_split_compile
|
||||||
|| compunit.cu_unit_type == DW_UT_skeleton)
|
|| compunit.cu_unit_type == DW_UT_skeleton)
|
||||||
{
|
{
|
||||||
SAFE_BYTE_GET_AND_INC (dwo_id, hdrptr, 8, end);
|
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. */
|
/* 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)
|
if (dwarf_start_die != 0 && level < saved_level)
|
||||||
return TRUE;
|
return true;
|
||||||
continue;
|
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"),
|
warn (_("DIE at offset 0x%lx refers to abbreviation number %lu which does not exist\n"),
|
||||||
die_offset, abbrev_number);
|
die_offset, abbrev_number);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!do_loc && do_printing)
|
if (!do_loc && do_printing)
|
||||||
@ -4127,7 +4127,7 @@ process_debug_info (struct dwarf_section * section,
|
|||||||
if (!do_loc)
|
if (!do_loc)
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Locate and scan the .debug_info section in the file and record the pointer
|
/* 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);
|
(void) load_cu_tu_indexes (file);
|
||||||
|
|
||||||
if (load_debug_section_with_follow (info, 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;
|
return num_debug_info_entries;
|
||||||
|
|
||||||
if (load_debug_section_with_follow (info_dwo, file)
|
if (load_debug_section_with_follow (info_dwo, file)
|
||||||
&& process_debug_info (&debug_displays [info_dwo].section, file,
|
&& process_debug_info (&debug_displays [info_dwo].section, file,
|
||||||
abbrev_dwo, TRUE, FALSE))
|
abbrev_dwo, true, false))
|
||||||
return num_debug_info_entries;
|
return num_debug_info_entries;
|
||||||
|
|
||||||
num_debug_info_entries = DEBUG_INFO_UNAVAILABLE;
|
num_debug_info_entries = DEBUG_INFO_UNAVAILABLE;
|
||||||
@ -4282,12 +4282,12 @@ read_debug_line_header (struct dwarf_section * section,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
display_formatted_table (unsigned char * data,
|
display_formatted_table (unsigned char *data,
|
||||||
unsigned char * start,
|
unsigned char *start,
|
||||||
unsigned char * end,
|
unsigned char *end,
|
||||||
const DWARF2_Internal_LineInfo * linfo,
|
const DWARF2_Internal_LineInfo *linfo,
|
||||||
struct dwarf_section * section,
|
struct dwarf_section *section,
|
||||||
bfd_boolean is_dir)
|
bool is_dir)
|
||||||
{
|
{
|
||||||
unsigned char *format_start, format_count, *format, formati;
|
unsigned char *format_start, format_count, *format, formati;
|
||||||
dwarf_vma data_count, datai;
|
dwarf_vma data_count, datai;
|
||||||
@ -4421,7 +4421,7 @@ display_debug_sup (struct dwarf_section * section,
|
|||||||
dwarf_vma checksum_len;
|
dwarf_vma checksum_len;
|
||||||
|
|
||||||
|
|
||||||
introduce (section, TRUE);
|
introduce (section, true);
|
||||||
if (section->size < 4)
|
if (section->size < 4)
|
||||||
{
|
{
|
||||||
error (_("corrupt .debug_sup section: size is too small\n"));
|
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;
|
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)
|
if (status)
|
||||||
{
|
{
|
||||||
error (_("corrupt .debug_sup section: bad LEB128 field for checksum length\n"));
|
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;
|
unsigned char *start = section->start;
|
||||||
int verbose_view = 0;
|
int verbose_view = 0;
|
||||||
|
|
||||||
introduce (section, TRUE);
|
introduce (section, true);
|
||||||
|
|
||||||
while (data < end)
|
while (data < end)
|
||||||
{
|
{
|
||||||
@ -4586,9 +4586,9 @@ display_debug_lines_raw (struct dwarf_section * section,
|
|||||||
load_debug_section_with_follow (line_str, file);
|
load_debug_section_with_follow (line_str, file);
|
||||||
|
|
||||||
data = display_formatted_table (data, start, end, &linfo, section,
|
data = display_formatted_table (data, start, end, &linfo, section,
|
||||||
TRUE);
|
true);
|
||||||
data = display_formatted_table (data, start, end, &linfo, section,
|
data = display_formatted_table (data, start, end, &linfo, section,
|
||||||
FALSE);
|
false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4910,7 +4910,7 @@ display_debug_lines_decoded (struct dwarf_section * section,
|
|||||||
{
|
{
|
||||||
static DWARF2_Internal_LineInfo saved_linfo;
|
static DWARF2_Internal_LineInfo saved_linfo;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (data < end)
|
while (data < end)
|
||||||
{
|
{
|
||||||
@ -5738,7 +5738,7 @@ display_debug_pubnames_worker (struct dwarf_section *section,
|
|||||||
we test for that later on. */
|
we test for that later on. */
|
||||||
load_debug_info (file);
|
load_debug_info (file);
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (start < end)
|
while (start < end)
|
||||||
{
|
{
|
||||||
@ -5883,7 +5883,7 @@ display_debug_macinfo (struct dwarf_section *section,
|
|||||||
unsigned char *curr = start;
|
unsigned char *curr = start;
|
||||||
enum dwarf_macinfo_record_type op;
|
enum dwarf_macinfo_record_type op;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (curr < end)
|
while (curr < end)
|
||||||
{
|
{
|
||||||
@ -6045,17 +6045,17 @@ display_debug_macro (struct dwarf_section *section,
|
|||||||
unsigned char *end = start + section->size;
|
unsigned char *end = start + section->size;
|
||||||
unsigned char *curr = start;
|
unsigned char *curr = start;
|
||||||
unsigned char *extended_op_buf[256];
|
unsigned char *extended_op_buf[256];
|
||||||
bfd_boolean is_dwo = FALSE;
|
bool is_dwo = false;
|
||||||
const char *suffix = strrchr (section->name, '.');
|
const char *suffix = strrchr (section->name, '.');
|
||||||
|
|
||||||
if (suffix && strcmp (suffix, ".dwo") == 0)
|
if (suffix && strcmp (suffix, ".dwo") == 0)
|
||||||
is_dwo = TRUE;
|
is_dwo = true;
|
||||||
|
|
||||||
load_debug_section_with_follow (str, file);
|
load_debug_section_with_follow (str, file);
|
||||||
load_debug_section_with_follow (line, file);
|
load_debug_section_with_follow (line, file);
|
||||||
load_debug_section_with_follow (str_index, file);
|
load_debug_section_with_follow (str_index, file);
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (curr < end)
|
while (curr < end)
|
||||||
{
|
{
|
||||||
@ -6257,7 +6257,7 @@ display_debug_macro (struct dwarf_section *section,
|
|||||||
READ_ULEB (lineno, curr, end);
|
READ_ULEB (lineno, curr, end);
|
||||||
READ_ULEB (offset, curr, end);
|
READ_ULEB (offset, curr, end);
|
||||||
string = (const unsigned char *)
|
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)
|
if (op == DW_MACRO_define_strx)
|
||||||
printf (" DW_MACRO_define_strx ");
|
printf (" DW_MACRO_define_strx ");
|
||||||
else
|
else
|
||||||
@ -6326,7 +6326,7 @@ display_debug_abbrev (struct dwarf_section *section,
|
|||||||
unsigned char *start = section->start;
|
unsigned char *start = section->start;
|
||||||
const unsigned char *end = start + section->size;
|
const unsigned char *end = start + section->size;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -6379,7 +6379,7 @@ display_debug_abbrev (struct dwarf_section *section,
|
|||||||
/* Return true when ADDR is the maximum address, when addresses are
|
/* Return true when ADDR is the maximum address, when addresses are
|
||||||
POINTER_SIZE bytes long. */
|
POINTER_SIZE bytes long. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
is_max_address (dwarf_vma addr, unsigned int pointer_size)
|
is_max_address (dwarf_vma addr, unsigned int pointer_size)
|
||||||
{
|
{
|
||||||
dwarf_vma mask = ~(~(dwarf_vma) 1 << (pointer_size * 8 - 1));
|
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 char *next = start, *vnext = vstart;
|
||||||
unsigned int *array = NULL;
|
unsigned int *array = NULL;
|
||||||
const char *suffix = strrchr (section->name, '.');
|
const char *suffix = strrchr (section->name, '.');
|
||||||
bfd_boolean is_dwo = FALSE;
|
bool is_dwo = false;
|
||||||
int is_loclists = strstr (section->name, "debug_loclists") != NULL;
|
int is_loclists = strstr (section->name, "debug_loclists") != NULL;
|
||||||
dwarf_vma expected_start = 0;
|
dwarf_vma expected_start = 0;
|
||||||
|
|
||||||
if (suffix && strcmp (suffix, ".dwo") == 0)
|
if (suffix && strcmp (suffix, ".dwo") == 0)
|
||||||
is_dwo = TRUE;
|
is_dwo = true;
|
||||||
|
|
||||||
bytes = section->size;
|
bytes = section->size;
|
||||||
|
|
||||||
@ -7066,7 +7066,7 @@ display_debug_loc (struct dwarf_section *section, void *file)
|
|||||||
if (!locs_sorted)
|
if (!locs_sorted)
|
||||||
array = (unsigned int *) xcmalloc (num_loc_list, sizeof (unsigned int));
|
array = (unsigned int *) xcmalloc (num_loc_list, sizeof (unsigned int));
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
if (reloc_at (section, 0))
|
if (reloc_at (section, 0))
|
||||||
printf (_(" Warning: This section has relocations - addresses seen here may not be accurate.\n\n"));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (bytes)
|
while (bytes)
|
||||||
{
|
{
|
||||||
@ -7259,19 +7259,19 @@ display_debug_str (struct dwarf_section *section,
|
|||||||
static int
|
static int
|
||||||
display_debug_info (struct dwarf_section *section, void *file)
|
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
|
static int
|
||||||
display_debug_types (struct dwarf_section *section, void *file)
|
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
|
static int
|
||||||
display_trace_info (struct dwarf_section *section, void *file)
|
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
|
static int
|
||||||
@ -7281,7 +7281,7 @@ display_debug_aranges (struct dwarf_section *section,
|
|||||||
unsigned char *start = section->start;
|
unsigned char *start = section->start;
|
||||||
unsigned char *end = start + section->size;
|
unsigned char *end = start + section->size;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
/* It does not matter if this load fails,
|
/* It does not matter if this load fails,
|
||||||
we test for that later on. */
|
we test for that later on. */
|
||||||
@ -7441,7 +7441,7 @@ display_debug_addr (struct dwarf_section *section,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
/* PR 17531: file: cf38d01b.
|
/* PR 17531: file: cf38d01b.
|
||||||
We use xcalloc because a corrupt file may not have initialised all of the
|
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;
|
unsigned char *curr = start;
|
||||||
|
|
||||||
const char *suffix = strrchr (section->name, '.');
|
const char *suffix = strrchr (section->name, '.');
|
||||||
bfd_boolean dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
bool dwo = suffix && strcmp (suffix, ".dwo") == 0;
|
||||||
|
|
||||||
if (dwo)
|
if (dwo)
|
||||||
load_debug_section_with_follow (str_dwo, file);
|
load_debug_section_with_follow (str_dwo, file);
|
||||||
else
|
else
|
||||||
load_debug_section_with_follow (str, file);
|
load_debug_section_with_follow (str, file);
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (curr < end)
|
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"),
|
warn (_("Range lists in %s section start at 0x%lx\n"),
|
||||||
section->name, (unsigned long) range_entries[0].ranges_offset);
|
section->name, (unsigned long) range_entries[0].ranges_offset);
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
printf (_(" Offset Begin End\n"));
|
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 *chunks = NULL, *forward_refs = NULL;
|
||||||
Frame_Chunk *remembered_state = NULL;
|
Frame_Chunk *remembered_state = NULL;
|
||||||
Frame_Chunk *rs;
|
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;
|
unsigned int max_regs = 0;
|
||||||
const char *bad_reg = _("bad register: ");
|
const char *bad_reg = _("bad register: ");
|
||||||
unsigned int saved_eh_addr_size = eh_addr_size;
|
unsigned int saved_eh_addr_size = eh_addr_size;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
while (start < end)
|
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 encoded_ptr_size = saved_eh_addr_size;
|
||||||
unsigned int offset_size;
|
unsigned int offset_size;
|
||||||
unsigned int initial_length_size;
|
unsigned int initial_length_size;
|
||||||
bfd_boolean all_nops;
|
bool all_nops;
|
||||||
static Frame_Chunk fde_fc;
|
static Frame_Chunk fde_fc;
|
||||||
|
|
||||||
saved_start = start;
|
saved_start = start;
|
||||||
@ -9117,7 +9117,7 @@ display_debug_frames (struct dwarf_section *section,
|
|||||||
start = tmp;
|
start = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
all_nops = TRUE;
|
all_nops = true;
|
||||||
|
|
||||||
/* Now we know what registers are used, make a second pass over
|
/* Now we know what registers are used, make a second pass over
|
||||||
the chunk, this time actually printing out the info. */
|
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. */
|
/* Make a note if something other than DW_CFA_nop happens. */
|
||||||
if (op != DW_CFA_nop)
|
if (op != DW_CFA_nop)
|
||||||
all_nops = FALSE;
|
all_nops = false;
|
||||||
|
|
||||||
/* Warning: if you add any more cases to this switch, be
|
/* Warning: if you add any more cases to this switch, be
|
||||||
sure to add them to the corresponding switch above. */
|
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;
|
const unsigned char *const section_end = section->start + section->size;
|
||||||
unsigned char *unit_end;
|
unsigned char *unit_end;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
load_debug_section_with_follow (str, file);
|
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;
|
uint32_t augmentation_string_size;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned long sec_off;
|
unsigned long sec_off;
|
||||||
bfd_boolean augmentation_printable;
|
bool augmentation_printable;
|
||||||
const char *augmentation_string;
|
const char *augmentation_string;
|
||||||
|
|
||||||
unit_start = hdrptr;
|
unit_start = hdrptr;
|
||||||
@ -9735,7 +9735,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
|||||||
|
|
||||||
printf (_("Augmentation string:"));
|
printf (_("Augmentation string:"));
|
||||||
|
|
||||||
augmentation_printable = TRUE;
|
augmentation_printable = true;
|
||||||
augmentation_string = (const char *) hdrptr;
|
augmentation_string = (const char *) hdrptr;
|
||||||
|
|
||||||
for (i = 0; i < augmentation_string_size; i++)
|
for (i = 0; i < augmentation_string_size; i++)
|
||||||
@ -9746,7 +9746,7 @@ display_debug_names (struct dwarf_section *section, void *file)
|
|||||||
printf (" %02x", uc);
|
printf (" %02x", uc);
|
||||||
|
|
||||||
if (uc != 0 && !ISPRINT (uc))
|
if (uc != 0 && !ISPRINT (uc))
|
||||||
augmentation_printable = FALSE;
|
augmentation_printable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (augmentation_printable)
|
if (augmentation_printable)
|
||||||
@ -10010,7 +10010,7 @@ display_debug_links (struct dwarf_section * section,
|
|||||||
const unsigned char * filename;
|
const unsigned char * filename;
|
||||||
unsigned int filelen;
|
unsigned int filelen;
|
||||||
|
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
/* The .gnu_debuglink section is formatted as:
|
/* The .gnu_debuglink section is formatted as:
|
||||||
(c-string) Filename.
|
(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. */
|
/* 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))
|
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)
|
if (do_display)
|
||||||
{
|
{
|
||||||
introduce (section, FALSE);
|
introduce (section, false);
|
||||||
|
|
||||||
printf (_(" Version: %u\n"), version);
|
printf (_(" Version: %u\n"), version);
|
||||||
if (version >= 2)
|
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 *poffsets = ppool + (size_t) ncols * 4;
|
||||||
unsigned char *psizes = poffsets + (size_t) nused * ncols * 4;
|
unsigned char *psizes = poffsets + (size_t) nused * ncols * 4;
|
||||||
unsigned char *pend = psizes + (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;
|
struct cu_tu_set *this_set = NULL;
|
||||||
unsigned int row;
|
unsigned int row;
|
||||||
unsigned char *prow;
|
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
|
section sets that we can use to associate a .debug_info.dwo section
|
||||||
with its associated .debug_abbrev.dwo section in a .dwp file. */
|
with its associated .debug_abbrev.dwo section in a .dwp file. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
load_cu_tu_indexes (void *file)
|
load_cu_tu_indexes (void *file)
|
||||||
{
|
{
|
||||||
/* If we have already loaded (or tried to load) the CU and TU indexes
|
/* If we have already loaded (or tried to load) the CU and TU indexes
|
||||||
then do not bother to repeat the task. */
|
then do not bother to repeat the task. */
|
||||||
if (cu_tu_indexes_read == -1)
|
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 (load_debug_section_with_follow (dwp_cu_index, file))
|
||||||
if (! process_cu_tu_index (&debug_displays [dwp_cu_index].section, 0))
|
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 (load_debug_section_with_follow (dwp_tu_index, file))
|
||||||
if (! process_cu_tu_index (&debug_displays [dwp_tu_index].section, 0))
|
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. */
|
/* Find the set of sections that includes section SHNDX. */
|
||||||
@ -10905,10 +10905,10 @@ calc_gnu_debuglink_crc32 (unsigned long crc,
|
|||||||
return ~crc & 0xffffffff;
|
return ~crc & 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef bfd_boolean (* check_func_type) (const char *, void *);
|
typedef bool (*check_func_type) (const char *, void *);
|
||||||
typedef const char * (* parse_func_type) (struct dwarf_section *, 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)
|
check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
||||||
{
|
{
|
||||||
static unsigned char buffer [8 * 1024];
|
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);
|
sep_data = open_debug_file (pathname);
|
||||||
if (sep_data == NULL)
|
if (sep_data == NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
/* Yes - we are opening the file twice... */
|
/* Yes - we are opening the file twice... */
|
||||||
f = fopen (pathname, "rb");
|
f = fopen (pathname, "rb");
|
||||||
@ -10928,7 +10928,7 @@ check_gnu_debuglink (const char * pathname, void * crc_pointer)
|
|||||||
/* Paranoia: This should never happen. */
|
/* Paranoia: This should never happen. */
|
||||||
close_debug_file (sep_data);
|
close_debug_file (sep_data);
|
||||||
warn (_("Unable to reopen separate debug info file: %s\n"), pathname);
|
warn (_("Unable to reopen separate debug info file: %s\n"), pathname);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((count = fread (buffer, 1, sizeof (buffer), f)) > 0)
|
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);
|
close_debug_file (sep_data);
|
||||||
warn (_("Separate debug info file %s found, but CRC does not match - ignoring\n"),
|
warn (_("Separate debug info file %s found, but CRC does not match - ignoring\n"),
|
||||||
pathname);
|
pathname);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
@ -10967,18 +10967,18 @@ parse_gnu_debuglink (struct dwarf_section * section, void * data)
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
check_gnu_debugaltlink (const char * filename, void * data ATTRIBUTE_UNUSED)
|
check_gnu_debugaltlink (const char * filename, void * data ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
void * sep_data = open_debug_file (filename);
|
void * sep_data = open_debug_file (filename);
|
||||||
|
|
||||||
if (sep_data == NULL)
|
if (sep_data == NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
/* FIXME: We should now extract the build-id in the separate file
|
/* FIXME: We should now extract the build-id in the separate file
|
||||||
and check it... */
|
and check it... */
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct build_id_data
|
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
|
file. If successful, store the path of the file in filename and
|
||||||
return TRUE, otherwise return FALSE. */
|
return TRUE, otherwise return FALSE. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
||||||
char ** filename,
|
char ** filename,
|
||||||
void * file)
|
void * file)
|
||||||
@ -11052,16 +11052,16 @@ debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
|||||||
filelen = strnlen ((const char *)section->start, section->size);
|
filelen = strnlen ((const char *)section->start, section->size);
|
||||||
if (filelen == section->size)
|
if (filelen == section->size)
|
||||||
/* Corrupt debugaltlink. */
|
/* Corrupt debugaltlink. */
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
build_id = section->start + filelen + 1;
|
build_id = section->start + filelen + 1;
|
||||||
build_id_len = section->size - (filelen + 1);
|
build_id_len = section->size - (filelen + 1);
|
||||||
|
|
||||||
if (build_id_len == 0)
|
if (build_id_len == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (build_id)
|
if (build_id)
|
||||||
{
|
{
|
||||||
@ -11070,7 +11070,7 @@ debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
|
|||||||
|
|
||||||
client = debuginfod_begin ();
|
client = debuginfod_begin ();
|
||||||
if (client == NULL)
|
if (client == NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
/* Query debuginfod servers for the target file. If found its path
|
/* Query debuginfod servers for the target file. If found its path
|
||||||
will be stored in filename. */
|
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
|
/* File successfully retrieved. Close fd since we want to
|
||||||
use open_debug_file () on filename instead. */
|
use open_debug_file () on filename instead. */
|
||||||
close (fd);
|
close (fd);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
If TRUE is returned then the linked list starting at first_separate_info
|
||||||
will be populated with open file handles. */
|
will be populated with open file handles. */
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
load_separate_debug_files (void * file, const char * filename)
|
load_separate_debug_files (void * file, const char * filename)
|
||||||
{
|
{
|
||||||
/* Skip this operation if we are not interested in debug links. */
|
/* Skip this operation if we are not interested in debug links. */
|
||||||
if (! do_follow_links && ! do_debug_links)
|
if (! do_follow_links && ! do_debug_links)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
/* See if there are any dwo links. */
|
/* See if there are any dwo links. */
|
||||||
if (load_debug_section (str, file)
|
if (load_debug_section (str, file)
|
||||||
@ -11451,13 +11451,13 @@ load_separate_debug_files (void * file, const char * filename)
|
|||||||
free_dwo_info ();
|
free_dwo_info ();
|
||||||
|
|
||||||
if (process_debug_info (& debug_displays[info].section, file, abbrev,
|
if (process_debug_info (& debug_displays[info].section, file, abbrev,
|
||||||
TRUE, FALSE))
|
true, false))
|
||||||
{
|
{
|
||||||
bfd_boolean introduced = FALSE;
|
bool introduced = false;
|
||||||
dwo_info * dwinfo;
|
dwo_info *dwinfo;
|
||||||
const char * dir = NULL;
|
const char *dir = NULL;
|
||||||
const char * id = NULL;
|
const char *id = NULL;
|
||||||
const char * name = NULL;
|
const char *name = NULL;
|
||||||
|
|
||||||
for (dwinfo = first_dwo_info; dwinfo != NULL; dwinfo = dwinfo->next)
|
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"),
|
printf (_("The %s section contains link(s) to dwo file(s):\n\n"),
|
||||||
debug_displays [info].section.uncompressed_name);
|
debug_displays [info].section.uncompressed_name);
|
||||||
introduced = TRUE;
|
introduced = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf (_(" Name: %s\n"), name);
|
printf (_(" Name: %s\n"), name);
|
||||||
@ -11524,7 +11524,7 @@ load_separate_debug_files (void * file, const char * filename)
|
|||||||
if (! do_follow_links)
|
if (! do_follow_links)
|
||||||
/* The other debug links will be displayed by display_debug_links()
|
/* The other debug links will be displayed by display_debug_links()
|
||||||
so we do not need to do any further processing here. */
|
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 both link sections in the same file. */
|
||||||
/* FIXME: We do not check for the presence of multiple, same-name debuglink sections. */
|
/* 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);
|
check_for_and_load_links (file, filename);
|
||||||
if (first_separate_info != NULL)
|
if (first_separate_info != NULL)
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
do_follow_links = 0;
|
do_follow_links = 0;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -11753,53 +11753,53 @@ dwarf_select_sections_all (void)
|
|||||||
|
|
||||||
struct dwarf_section_display debug_displays[] =
|
struct dwarf_section_display debug_displays[] =
|
||||||
{
|
{
|
||||||
{ { ".debug_abbrev", ".zdebug_abbrev", NO_ABBREVS }, display_debug_abbrev, &do_debug_abbrevs, 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_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_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_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_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_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 },
|
{ { ".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 },
|
{ { ".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_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_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_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_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_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_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_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_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_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_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_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_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_types", ".zdebug_types", ABBREV (abbrev) }, display_debug_types, &do_debug_info, true },
|
||||||
{ { ".debug_weaknames", ".zdebug_weaknames", NO_ABBREVS }, display_debug_not_supported, NULL, FALSE },
|
{ { ".debug_weaknames", ".zdebug_weaknames", NO_ABBREVS }, display_debug_not_supported, NULL, false },
|
||||||
{ { ".gdb_index", "", NO_ABBREVS }, display_gdb_index, &do_gdb_index, FALSE },
|
{ { ".gdb_index", "", NO_ABBREVS }, display_gdb_index, &do_gdb_index, false },
|
||||||
{ { ".debug_names", "", NO_ABBREVS }, display_debug_names, &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_info", "", ABBREV (trace_abbrev) }, display_trace_info, &do_trace_info, true },
|
||||||
{ { ".trace_abbrev", "", NO_ABBREVS }, display_debug_abbrev, &do_trace_abbrevs, FALSE },
|
{ { ".trace_abbrev", "", NO_ABBREVS }, display_debug_abbrev, &do_trace_abbrevs, false },
|
||||||
{ { ".trace_aranges", "", NO_ABBREVS }, display_debug_aranges, &do_trace_aranges, 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_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_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_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_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_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_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_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.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", ".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_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_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_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 },
|
{ { ".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_debuglink", "", NO_ABBREVS }, display_debug_links, &do_debug_links, false },
|
||||||
{ { ".gnu_debugaltlink", "", 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_sup", "", NO_ABBREVS }, display_debug_sup, &do_debug_links, false },
|
||||||
/* Separate debug info files can containt their own .debug_str section,
|
/* Separate debug info files can containt their own .debug_str section,
|
||||||
and this might be in *addition* to a .debug_str section already present
|
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. */
|
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. */
|
/* A static assertion. */
|
||||||
|
|||||||
@ -150,10 +150,10 @@ struct dwarf_section
|
|||||||
and a pointer to a function that can decode it. */
|
and a pointer to a function that can decode it. */
|
||||||
struct dwarf_section_display
|
struct dwarf_section_display
|
||||||
{
|
{
|
||||||
struct dwarf_section section;
|
struct dwarf_section section;
|
||||||
int (* display) (struct dwarf_section *, void *);
|
int (*display) (struct dwarf_section *, void *);
|
||||||
int * enabled;
|
int *enabled;
|
||||||
bfd_boolean relocate;
|
bool relocate;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct dwarf_section_display debug_displays [];
|
extern struct dwarf_section_display debug_displays [];
|
||||||
@ -221,7 +221,7 @@ extern int do_debug_cu_index;
|
|||||||
extern int do_wide;
|
extern int do_wide;
|
||||||
extern int do_debug_links;
|
extern int do_debug_links;
|
||||||
extern int do_follow_links;
|
extern int do_follow_links;
|
||||||
extern bfd_boolean do_checks;
|
extern bool do_checks;
|
||||||
|
|
||||||
extern int dwarf_cutoff_level;
|
extern int dwarf_cutoff_level;
|
||||||
extern unsigned long dwarf_start_die;
|
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,
|
extern void init_dwarf_regnames_by_bfd_arch_and_mach (enum bfd_architecture arch,
|
||||||
unsigned long mach);
|
unsigned long mach);
|
||||||
|
|
||||||
extern bfd_boolean load_debug_section (enum dwarf_section_display_enum, void *);
|
extern bool load_debug_section (enum dwarf_section_display_enum, void *);
|
||||||
extern void free_debug_section (enum dwarf_section_display_enum);
|
extern void free_debug_section (enum dwarf_section_display_enum);
|
||||||
extern bfd_boolean load_separate_debug_files (void *, const char *);
|
extern bool load_separate_debug_files (void *, const char *);
|
||||||
extern void close_debug_file (void *);
|
extern void close_debug_file (void *);
|
||||||
extern void * open_debug_file (const char *);
|
extern void *open_debug_file (const char *);
|
||||||
|
|
||||||
extern void free_debug_memory (void);
|
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
|
/* A callback into the client. Returns TRUE if there is a
|
||||||
relocation against the given debug section at the given
|
relocation against the given debug section at the given
|
||||||
offset. */
|
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,
|
extern dwarf_vma read_leb128 (unsigned char *, const unsigned char *const,
|
||||||
bfd_boolean, unsigned int *, int *);
|
bool, unsigned int *, int *);
|
||||||
|
|
||||||
#if HAVE_LIBDEBUGINFOD
|
#if HAVE_LIBDEBUGINFOD
|
||||||
extern unsigned char * get_build_id (void *);
|
extern unsigned char * get_build_id (void *);
|
||||||
@ -276,7 +276,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
|||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
unsigned int _len; \
|
unsigned int _len; \
|
||||||
read_leb128 (start, end, FALSE, &_len, NULL); \
|
read_leb128 (start, end, false, &_len, NULL); \
|
||||||
start += _len; \
|
start += _len; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
@ -285,7 +285,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
|||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
unsigned int _len; \
|
unsigned int _len; \
|
||||||
read_leb128 (start, end, TRUE, &_len, NULL); \
|
read_leb128 (start, end, true, &_len, NULL); \
|
||||||
start += _len; \
|
start += _len; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
@ -297,7 +297,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
|||||||
unsigned int _len; \
|
unsigned int _len; \
|
||||||
int _status; \
|
int _status; \
|
||||||
\
|
\
|
||||||
_val = read_leb128 (start, end, FALSE, &_len, &_status); \
|
_val = read_leb128 (start, end, false, &_len, &_status); \
|
||||||
start += _len; \
|
start += _len; \
|
||||||
(var) = _val; \
|
(var) = _val; \
|
||||||
if ((var) != _val) \
|
if ((var) != _val) \
|
||||||
@ -313,7 +313,7 @@ report_leb_status (int status, const char *file, unsigned long lnum)
|
|||||||
unsigned int _len; \
|
unsigned int _len; \
|
||||||
int _status; \
|
int _status; \
|
||||||
\
|
\
|
||||||
_val = read_leb128 (start, end, TRUE, &_len, &_status); \
|
_val = read_leb128 (start, end, true, &_len, &_status); \
|
||||||
start += _len; \
|
start += _len; \
|
||||||
(var) = _val; \
|
(var) = _val; \
|
||||||
if ((var) != _val) \
|
if ((var) != _val) \
|
||||||
|
|||||||
@ -540,7 +540,7 @@ process_object (const char *file_name, FILE *file)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
process_archive (const char * file_name, FILE * file,
|
process_archive (const char * file_name, FILE * file,
|
||||||
bfd_boolean is_thin_archive)
|
bool is_thin_archive)
|
||||||
{
|
{
|
||||||
struct archive_info arch;
|
struct archive_info arch;
|
||||||
struct archive_info nested_arch;
|
struct archive_info nested_arch;
|
||||||
@ -566,7 +566,7 @@ process_archive (const char * file_name, FILE * file,
|
|||||||
|
|
||||||
if (fstat (fileno (file), &statbuf) < 0
|
if (fstat (fileno (file), &statbuf) < 0
|
||||||
|| setup_archive (&arch, file_name, file, statbuf.st_size,
|
|| setup_archive (&arch, file_name, file, statbuf.st_size,
|
||||||
is_thin_archive, FALSE) != 0)
|
is_thin_archive, false) != 0)
|
||||||
{
|
{
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto out;
|
goto out;
|
||||||
@ -770,9 +770,9 @@ process_file (const char *file_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (memcmp (armag, ARMAG, SARMAG) == 0)
|
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)
|
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||||
ret = process_archive (file_name, file, TRUE);
|
ret = process_archive (file_name, file, true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rewind (file);
|
rewind (file);
|
||||||
|
|||||||
@ -28,13 +28,13 @@
|
|||||||
|
|
||||||
/* Default to <bigaf>. */
|
/* Default to <bigaf>. */
|
||||||
/* FIXME: write only variable. */
|
/* FIXME: write only variable. */
|
||||||
static bfd_boolean big_archive = TRUE;
|
static bool big_archive = true;
|
||||||
|
|
||||||
/* Whether to include 32 bit objects. */
|
/* Whether to include 32 bit objects. */
|
||||||
static bfd_boolean X32 = TRUE;
|
static bool X32 = true;
|
||||||
|
|
||||||
/* Whether to include 64 bit objects. */
|
/* Whether to include 64 bit objects. */
|
||||||
static bfd_boolean X64 = FALSE;
|
static bool X64 = false;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ar_emul_aix_usage (FILE *fp)
|
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"));
|
fprintf (fp, _(" [-X32_64] - accepts 32 and 64 bit objects\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
check_aix (bfd *try_bfd)
|
check_aix (bfd *try_bfd)
|
||||||
{
|
{
|
||||||
extern const bfd_target rs6000_xcoff_vec;
|
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 (bfd_check_format (try_bfd, bfd_object))
|
||||||
{
|
{
|
||||||
if (!X32 && try_bfd->xvec == &rs6000_xcoff_vec)
|
if (!X32 && try_bfd->xvec == &rs6000_xcoff_vec)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (!X64 && (try_bfd->xvec == &rs6000_xcoff64_vec
|
if (!X64 && (try_bfd->xvec == &rs6000_xcoff64_vec
|
||||||
|| try_bfd->xvec == &rs6000_xcoff64_aix_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,
|
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);
|
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,
|
ar_emul_aix_replace (bfd **after_bfd, bfd *new_bfd,
|
||||||
bfd_boolean verbose)
|
bool verbose)
|
||||||
{
|
{
|
||||||
if (!check_aix (new_bfd))
|
if (!check_aix (new_bfd))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, bfd_get_filename (new_bfd));
|
||||||
|
|
||||||
new_bfd->archive_next = *after_bfd;
|
new_bfd->archive_next = *after_bfd;
|
||||||
*after_bfd = new_bfd;
|
*after_bfd = new_bfd;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
ar_emul_aix_parse_arg (char *arg)
|
ar_emul_aix_parse_arg (char *arg)
|
||||||
{
|
{
|
||||||
if (startswith (arg, "-X32_64"))
|
if (startswith (arg, "-X32_64"))
|
||||||
{
|
{
|
||||||
big_archive = TRUE;
|
big_archive = true;
|
||||||
X32 = TRUE;
|
X32 = true;
|
||||||
X64 = TRUE;
|
X64 = true;
|
||||||
}
|
}
|
||||||
else if (startswith (arg, "-X32"))
|
else if (startswith (arg, "-X32"))
|
||||||
{
|
{
|
||||||
big_archive = TRUE;
|
big_archive = true;
|
||||||
X32 = TRUE;
|
X32 = true;
|
||||||
X64 = FALSE;
|
X64 = false;
|
||||||
}
|
}
|
||||||
else if (startswith (arg, "-X64"))
|
else if (startswith (arg, "-X64"))
|
||||||
{
|
{
|
||||||
big_archive = TRUE;
|
big_archive = true;
|
||||||
X32 = FALSE;
|
X32 = false;
|
||||||
X64 = TRUE;
|
X64 = true;
|
||||||
}
|
}
|
||||||
else if (startswith (arg, "-g"))
|
else if (startswith (arg, "-g"))
|
||||||
{
|
{
|
||||||
big_archive = FALSE;
|
big_archive = false;
|
||||||
X32 = TRUE;
|
X32 = true;
|
||||||
X64 = FALSE;
|
X64 = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bin_emulation_xfer_struct bin_aix_emulation =
|
struct bin_emulation_xfer_struct bin_aix_emulation =
|
||||||
|
|||||||
@ -34,9 +34,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
/* Exported globals. */
|
/* Exported globals. */
|
||||||
bfd_boolean mclex_want_nl = FALSE;
|
bool mclex_want_nl = false;
|
||||||
bfd_boolean mclex_want_line = FALSE;
|
bool mclex_want_line = false;
|
||||||
bfd_boolean mclex_want_filename = FALSE;
|
bool mclex_want_filename = false;
|
||||||
|
|
||||||
/* Local globals. */
|
/* Local globals. */
|
||||||
static unichar *input_stream = NULL;
|
static unichar *input_stream = NULL;
|
||||||
@ -365,7 +365,7 @@ yylex (void)
|
|||||||
&& (input_stream_pos[1] == '\n'
|
&& (input_stream_pos[1] == '\n'
|
||||||
|| (input_stream_pos[1] == '\r' && input_stream_pos[2] == '\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;
|
return skip_until_eol () ? MCENDLINE : -1;
|
||||||
}
|
}
|
||||||
if (!skip_until_eol ())
|
if (!skip_until_eol ())
|
||||||
@ -383,7 +383,7 @@ yylex (void)
|
|||||||
input_line += 1;
|
input_line += 1;
|
||||||
if (mclex_want_nl && ch == '\n')
|
if (mclex_want_nl && ch == '\n')
|
||||||
{
|
{
|
||||||
mclex_want_nl = FALSE;
|
mclex_want_nl = false;
|
||||||
return NL;
|
return NL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -391,7 +391,7 @@ yylex (void)
|
|||||||
++input_stream_pos;
|
++input_stream_pos;
|
||||||
if (mclex_want_filename)
|
if (mclex_want_filename)
|
||||||
{
|
{
|
||||||
mclex_want_filename = FALSE;
|
mclex_want_filename = false;
|
||||||
if (ch == '"')
|
if (ch == '"')
|
||||||
{
|
{
|
||||||
start_token++;
|
start_token++;
|
||||||
|
|||||||
@ -461,11 +461,11 @@ print_symname (const char *form, struct extended_symbol_info *info,
|
|||||||
if (info != NULL && info->elfinfo && with_symbol_versions)
|
if (info != NULL && info->elfinfo && with_symbol_versions)
|
||||||
{
|
{
|
||||||
const char *version_string;
|
const char *version_string;
|
||||||
bfd_boolean hidden;
|
bool hidden;
|
||||||
|
|
||||||
version_string
|
version_string
|
||||||
= bfd_get_symbol_version_string (abfd, &info->elfinfo->symbol,
|
= bfd_get_symbol_version_string (abfd, &info->elfinfo->symbol,
|
||||||
FALSE, &hidden);
|
false, &hidden);
|
||||||
if (version_string && version_string[0])
|
if (version_string && version_string[0])
|
||||||
{
|
{
|
||||||
const char *at = "@@";
|
const char *at = "@@";
|
||||||
@ -487,7 +487,7 @@ print_symdef_entry (bfd *abfd)
|
|||||||
{
|
{
|
||||||
symindex idx = BFD_NO_MORE_SYMBOLS;
|
symindex idx = BFD_NO_MORE_SYMBOLS;
|
||||||
carsym *thesym;
|
carsym *thesym;
|
||||||
bfd_boolean everprinted = FALSE;
|
bool everprinted = false;
|
||||||
|
|
||||||
for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
|
for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
|
||||||
idx != BFD_NO_MORE_SYMBOLS;
|
idx != BFD_NO_MORE_SYMBOLS;
|
||||||
@ -497,7 +497,7 @@ print_symdef_entry (bfd *abfd)
|
|||||||
if (!everprinted)
|
if (!everprinted)
|
||||||
{
|
{
|
||||||
printf (_("\nArchive index:\n"));
|
printf (_("\nArchive index:\n"));
|
||||||
everprinted = TRUE;
|
everprinted = true;
|
||||||
}
|
}
|
||||||
elt = bfd_get_elt_at_index (abfd, idx);
|
elt = bfd_get_elt_at_index (abfd, idx);
|
||||||
if (elt == NULL)
|
if (elt == NULL)
|
||||||
@ -512,14 +512,14 @@ print_symdef_entry (bfd *abfd)
|
|||||||
|
|
||||||
|
|
||||||
/* True when we can report missing plugin error. */
|
/* 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;
|
/* Choose which symbol entries to print;
|
||||||
compact them downward to get rid of the rest.
|
compact them downward to get rid of the rest.
|
||||||
Return the number of symbols to be printed. */
|
Return the number of symbols to be printed. */
|
||||||
|
|
||||||
static long
|
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)
|
long symcount, unsigned int size)
|
||||||
{
|
{
|
||||||
bfd_byte *from, *fromend, *to;
|
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
|
&& strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0
|
||||||
&& report_plugin_err)
|
&& report_plugin_err)
|
||||||
{
|
{
|
||||||
report_plugin_err = FALSE;
|
report_plugin_err = false;
|
||||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||||
bfd_get_filename (abfd));
|
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
|
/* These globals are used to pass information into the sorting
|
||||||
routines. */
|
routines. */
|
||||||
static bfd *sort_bfd;
|
static bfd *sort_bfd;
|
||||||
static bfd_boolean sort_dynamic;
|
static bool sort_dynamic;
|
||||||
static asymbol *sort_x;
|
static asymbol *sort_x;
|
||||||
static asymbol *sort_y;
|
static asymbol *sort_y;
|
||||||
|
|
||||||
@ -794,7 +794,7 @@ size_forward2 (const void *P_x, const void *P_y)
|
|||||||
size. */
|
size. */
|
||||||
|
|
||||||
static long
|
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,
|
long symcount, unsigned int size,
|
||||||
struct size_sym **symsizesp)
|
struct size_sym **symsizesp)
|
||||||
{
|
{
|
||||||
@ -1088,11 +1088,11 @@ print_symbol (bfd * abfd,
|
|||||||
/* Print the symbols when sorting by size. */
|
/* Print the symbols when sorting by size. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_size_symbols (bfd * abfd,
|
print_size_symbols (bfd *abfd,
|
||||||
bfd_boolean is_dynamic,
|
bool is_dynamic,
|
||||||
struct size_sym * symsizes,
|
struct size_sym *symsizes,
|
||||||
long symcount,
|
long symcount,
|
||||||
bfd * archive_bfd)
|
bfd *archive_bfd)
|
||||||
{
|
{
|
||||||
asymbol *store;
|
asymbol *store;
|
||||||
struct size_sym *from;
|
struct size_sym *from;
|
||||||
@ -1127,12 +1127,12 @@ print_size_symbols (bfd * abfd,
|
|||||||
SIZE is the size of a symbol in MINISYMS. */
|
SIZE is the size of a symbol in MINISYMS. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_symbols (bfd * abfd,
|
print_symbols (bfd *abfd,
|
||||||
bfd_boolean is_dynamic,
|
bool is_dynamic,
|
||||||
void * minisyms,
|
void *minisyms,
|
||||||
long symcount,
|
long symcount,
|
||||||
unsigned int size,
|
unsigned int size,
|
||||||
bfd * archive_bfd)
|
bfd *archive_bfd)
|
||||||
{
|
{
|
||||||
asymbol *store;
|
asymbol *store;
|
||||||
bfd_byte *from;
|
bfd_byte *from;
|
||||||
@ -1250,7 +1250,7 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
|||||||
LTO plugin. */
|
LTO plugin. */
|
||||||
if (abfd->lto_slim_object)
|
if (abfd->lto_slim_object)
|
||||||
{
|
{
|
||||||
report_plugin_err = FALSE;
|
report_plugin_err = false;
|
||||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||||
bfd_get_filename (abfd));
|
bfd_get_filename (abfd));
|
||||||
}
|
}
|
||||||
@ -1418,21 +1418,21 @@ display_archive (bfd *file)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
display_file (char *filename)
|
display_file (char *filename)
|
||||||
{
|
{
|
||||||
bfd_boolean retval = TRUE;
|
bool retval = true;
|
||||||
bfd *file;
|
bfd *file;
|
||||||
char **matching;
|
char **matching;
|
||||||
|
|
||||||
if (get_file_size (filename) < 1)
|
if (get_file_size (filename) < 1)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
file = bfd_openr (filename, target ? target : plugin_target);
|
file = bfd_openr (filename, target ? target : plugin_target);
|
||||||
if (file == NULL)
|
if (file == NULL)
|
||||||
{
|
{
|
||||||
bfd_nonfatal (filename);
|
bfd_nonfatal (filename);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If printing line numbers, decompress the debug sections. */
|
/* If printing line numbers, decompress the debug sections. */
|
||||||
@ -1457,7 +1457,7 @@ display_file (char *filename)
|
|||||||
list_matching_formats (matching);
|
list_matching_formats (matching);
|
||||||
free (matching);
|
free (matching);
|
||||||
}
|
}
|
||||||
retval = FALSE;
|
retval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bfd_close (file))
|
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
|
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_dysymtab_command *dysymtab = &cmd->command.dysymtab;
|
||||||
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
|
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,
|
load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
||||||
void (*dump)(bfd *abfd, unsigned char *buf, unsigned int len,
|
void (*dump)(bfd *abfd, unsigned char *buf, unsigned int len,
|
||||||
ufile_ptr off))
|
ufile_ptr off))
|
||||||
@ -664,7 +664,7 @@ load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
|||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
buf = xmalloc (len);
|
buf = xmalloc (len);
|
||||||
|
|
||||||
@ -672,10 +672,10 @@ load_and_dump (bfd *abfd, ufile_ptr off, unsigned int len,
|
|||||||
&& bfd_bread (buf, len, abfd) == len)
|
&& bfd_bread (buf, len, abfd) == len)
|
||||||
dump (abfd, buf, len, off);
|
dump (abfd, buf, len, off);
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
free (buf);
|
free (buf);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const bfd_mach_o_xlat_name bfd_mach_o_dyld_rebase_type_name[] =
|
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
|
static void
|
||||||
dump_dyld_info (bfd *abfd, bfd_mach_o_load_command *cmd,
|
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;
|
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
|
static void
|
||||||
dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
|
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);
|
bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd);
|
||||||
const char *cmd_name;
|
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++)
|
for (cmd = mdata->first_command, i = 0; cmd != NULL; cmd = cmd->next, i++)
|
||||||
{
|
{
|
||||||
if (cmd32 == 0)
|
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)
|
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 *coff_get_slot (struct coff_types *, long);
|
||||||
static debug_type parse_coff_type
|
static debug_type parse_coff_type
|
||||||
(bfd *, struct coff_symbols *, struct coff_types *, long, int,
|
(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
|
static debug_type parse_coff_base_type
|
||||||
(bfd *, struct coff_symbols *, struct coff_types *, long, int,
|
(bfd *, struct coff_symbols *, struct coff_types *, long, int,
|
||||||
union internal_auxent *, void *);
|
union internal_auxent *, void *);
|
||||||
@ -96,10 +96,10 @@ static debug_type parse_coff_struct_type
|
|||||||
static debug_type parse_coff_enum_type
|
static debug_type parse_coff_enum_type
|
||||||
(bfd *, struct coff_symbols *, struct coff_types *,
|
(bfd *, struct coff_symbols *, struct coff_types *,
|
||||||
union internal_auxent *, void *);
|
union internal_auxent *, void *);
|
||||||
static bfd_boolean parse_coff_symbol
|
static bool parse_coff_symbol
|
||||||
(bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
|
(bfd *, struct coff_types *, asymbol *, long, struct internal_syment *,
|
||||||
void *, debug_type, bfd_boolean);
|
void *, debug_type, bool);
|
||||||
static bfd_boolean external_coff_symbol_p (int sym_class);
|
static bool external_coff_symbol_p (int sym_class);
|
||||||
|
|
||||||
/* Return the slot for a type. */
|
/* Return the slot for a type. */
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ coff_get_slot (struct coff_types *types, long indx)
|
|||||||
static debug_type
|
static debug_type
|
||||||
parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
|
parse_coff_type (bfd *abfd, struct coff_symbols *symbols,
|
||||||
struct coff_types *types, long coff_symno, int ntype,
|
struct coff_types *types, long coff_symno, int ntype,
|
||||||
union internal_auxent *pauxent, bfd_boolean useaux,
|
union internal_auxent *pauxent, bool useaux,
|
||||||
void *dhandle)
|
void *dhandle)
|
||||||
{
|
{
|
||||||
debug_type type;
|
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,
|
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
|
||||||
pauxent, useaux, dhandle);
|
pauxent, useaux, dhandle);
|
||||||
type = debug_make_function_type (dhandle, type, (debug_type *) NULL,
|
type = debug_make_function_type (dhandle, type, (debug_type *) NULL,
|
||||||
FALSE);
|
false);
|
||||||
}
|
}
|
||||||
else if (ISARY (ntype))
|
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,
|
type = parse_coff_type (abfd, symbols, types, coff_symno, newtype,
|
||||||
pauxent, FALSE, dhandle);
|
pauxent, false, dhandle);
|
||||||
type = debug_make_array_type (dhandle, type,
|
type = debug_make_array_type (dhandle, type,
|
||||||
parse_coff_base_type (abfd, symbols,
|
parse_coff_base_type (abfd, symbols,
|
||||||
types,
|
types,
|
||||||
coff_symno,
|
coff_symno,
|
||||||
T_INT,
|
T_INT,
|
||||||
NULL, dhandle),
|
NULL, dhandle),
|
||||||
0, n - 1, FALSE);
|
0, n - 1, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -240,7 +240,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
union internal_auxent *pauxent, void *dhandle)
|
union internal_auxent *pauxent, void *dhandle)
|
||||||
{
|
{
|
||||||
debug_type ret;
|
debug_type ret;
|
||||||
bfd_boolean set_basic;
|
bool set_basic;
|
||||||
const char *name;
|
const char *name;
|
||||||
debug_type *slot;
|
debug_type *slot;
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
&& types->basic[ntype] != DEBUG_TYPE_NULL)
|
&& types->basic[ntype] != DEBUG_TYPE_NULL)
|
||||||
return types->basic[ntype];
|
return types->basic[ntype];
|
||||||
|
|
||||||
set_basic = TRUE;
|
set_basic = true;
|
||||||
name = NULL;
|
name = NULL;
|
||||||
|
|
||||||
switch (ntype)
|
switch (ntype)
|
||||||
@ -265,23 +265,23 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case T_CHAR:
|
case T_CHAR:
|
||||||
ret = debug_make_int_type (dhandle, 1, FALSE);
|
ret = debug_make_int_type (dhandle, 1, false);
|
||||||
name = "char";
|
name = "char";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_SHORT:
|
case T_SHORT:
|
||||||
ret = debug_make_int_type (dhandle, 2, FALSE);
|
ret = debug_make_int_type (dhandle, 2, false);
|
||||||
name = "short";
|
name = "short";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_INT:
|
case T_INT:
|
||||||
/* FIXME: Perhaps the size should depend upon the architecture. */
|
/* 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";
|
name = "int";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_LONG:
|
case T_LONG:
|
||||||
ret = debug_make_int_type (dhandle, 4, FALSE);
|
ret = debug_make_int_type (dhandle, 4, false);
|
||||||
name = "long";
|
name = "long";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -301,28 +301,28 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case T_UCHAR:
|
case T_UCHAR:
|
||||||
ret = debug_make_int_type (dhandle, 1, TRUE);
|
ret = debug_make_int_type (dhandle, 1, true);
|
||||||
name = "unsigned char";
|
name = "unsigned char";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_USHORT:
|
case T_USHORT:
|
||||||
ret = debug_make_int_type (dhandle, 2, TRUE);
|
ret = debug_make_int_type (dhandle, 2, true);
|
||||||
name = "unsigned short";
|
name = "unsigned short";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_UINT:
|
case T_UINT:
|
||||||
ret = debug_make_int_type (dhandle, 4, TRUE);
|
ret = debug_make_int_type (dhandle, 4, true);
|
||||||
name = "unsigned int";
|
name = "unsigned int";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_ULONG:
|
case T_ULONG:
|
||||||
ret = debug_make_int_type (dhandle, 4, TRUE);
|
ret = debug_make_int_type (dhandle, 4, true);
|
||||||
name = "unsigned long";
|
name = "unsigned long";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_STRUCT:
|
case T_STRUCT:
|
||||||
if (pauxent == NULL)
|
if (pauxent == NULL)
|
||||||
ret = debug_make_struct_type (dhandle, TRUE, 0,
|
ret = debug_make_struct_type (dhandle, true, 0,
|
||||||
(debug_field *) NULL);
|
(debug_field *) NULL);
|
||||||
else
|
else
|
||||||
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
|
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 = coff_get_slot (types, coff_symno);
|
||||||
*slot = ret;
|
*slot = ret;
|
||||||
|
|
||||||
set_basic = FALSE;
|
set_basic = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_UNION:
|
case T_UNION:
|
||||||
if (pauxent == NULL)
|
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
|
else
|
||||||
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
|
ret = parse_coff_struct_type (abfd, symbols, types, ntype, pauxent,
|
||||||
dhandle);
|
dhandle);
|
||||||
@ -344,7 +344,7 @@ parse_coff_base_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
slot = coff_get_slot (types, coff_symno);
|
slot = coff_get_slot (types, coff_symno);
|
||||||
*slot = ret;
|
*slot = ret;
|
||||||
|
|
||||||
set_basic = FALSE;
|
set_basic = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_ENUM:
|
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 = coff_get_slot (types, coff_symno);
|
||||||
*slot = ret;
|
*slot = ret;
|
||||||
|
|
||||||
set_basic = FALSE;
|
set_basic = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
int alloc;
|
int alloc;
|
||||||
debug_field *fields;
|
debug_field *fields;
|
||||||
int count;
|
int count;
|
||||||
bfd_boolean done;
|
bool done;
|
||||||
|
|
||||||
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
|
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);
|
fields = (debug_field *) xmalloc (alloc * sizeof *fields);
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
done = FALSE;
|
done = false;
|
||||||
while (! done
|
while (! done
|
||||||
&& symbols->coff_symno < symend
|
&& symbols->coff_symno < symend
|
||||||
&& symbols->symno < symbols->symcount)
|
&& symbols->symno < symbols->symcount)
|
||||||
@ -446,7 +446,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case C_EOS:
|
case C_EOS:
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,7 +456,7 @@ parse_coff_struct_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
debug_field f;
|
debug_field f;
|
||||||
|
|
||||||
ftype = parse_coff_type (abfd, symbols, types, this_coff_symno,
|
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,
|
f = debug_make_field (dhandle, bfd_asymbol_name (sym), ftype,
|
||||||
bitpos, bitsize, DEBUG_VISIBILITY_PUBLIC);
|
bitpos, bitsize, DEBUG_VISIBILITY_PUBLIC);
|
||||||
if (f == DEBUG_FIELD_NULL)
|
if (f == DEBUG_FIELD_NULL)
|
||||||
@ -493,7 +493,7 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
const char **names;
|
const char **names;
|
||||||
bfd_signed_vma *vals;
|
bfd_signed_vma *vals;
|
||||||
int count;
|
int count;
|
||||||
bfd_boolean done;
|
bool done;
|
||||||
|
|
||||||
symend = pauxent->x_sym.x_fcnary.x_fcn.x_endndx.l;
|
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);
|
vals = (bfd_signed_vma *) xmalloc (alloc * sizeof *vals);
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
done = FALSE;
|
done = false;
|
||||||
while (! done
|
while (! done
|
||||||
&& symbols->coff_symno < symend
|
&& symbols->coff_symno < symend
|
||||||
&& symbols->symno < symbols->symcount)
|
&& symbols->symno < symbols->symcount)
|
||||||
@ -542,7 +542,7 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case C_EOS:
|
case C_EOS:
|
||||||
done = TRUE;
|
done = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,11 +554,11 @@ parse_coff_enum_type (bfd *abfd, struct coff_symbols *symbols,
|
|||||||
|
|
||||||
/* Handle a single COFF symbol. */
|
/* Handle a single COFF symbol. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
||||||
asymbol *sym, long coff_symno,
|
asymbol *sym, long coff_symno,
|
||||||
struct internal_syment *psyment, void *dhandle,
|
struct internal_syment *psyment, void *dhandle,
|
||||||
debug_type type, bfd_boolean within_function)
|
debug_type type, bool within_function)
|
||||||
{
|
{
|
||||||
switch (psyment->n_sclass)
|
switch (psyment->n_sclass)
|
||||||
{
|
{
|
||||||
@ -568,14 +568,14 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
|||||||
case C_AUTO:
|
case C_AUTO:
|
||||||
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
||||||
DEBUG_LOCAL, bfd_asymbol_value (sym)))
|
DEBUG_LOCAL, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_WEAKEXT:
|
case C_WEAKEXT:
|
||||||
case C_EXT:
|
case C_EXT:
|
||||||
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
||||||
DEBUG_GLOBAL, bfd_asymbol_value (sym)))
|
DEBUG_GLOBAL, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_STAT:
|
case C_STAT:
|
||||||
@ -584,14 +584,14 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
|||||||
? DEBUG_LOCAL_STATIC
|
? DEBUG_LOCAL_STATIC
|
||||||
: DEBUG_STATIC),
|
: DEBUG_STATIC),
|
||||||
bfd_asymbol_value (sym)))
|
bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_REG:
|
case C_REG:
|
||||||
/* FIXME: We may need to convert the register number. */
|
/* FIXME: We may need to convert the register number. */
|
||||||
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type,
|
||||||
DEBUG_REGISTER, bfd_asymbol_value (sym)))
|
DEBUG_REGISTER, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_LABEL:
|
case C_LABEL:
|
||||||
@ -600,20 +600,20 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
|||||||
case C_ARG:
|
case C_ARG:
|
||||||
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
|
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
|
||||||
DEBUG_PARM_STACK, bfd_asymbol_value (sym)))
|
DEBUG_PARM_STACK, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_REGPARM:
|
case C_REGPARM:
|
||||||
/* FIXME: We may need to convert the register number. */
|
/* FIXME: We may need to convert the register number. */
|
||||||
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
|
if (! debug_record_parameter (dhandle, bfd_asymbol_name (sym), type,
|
||||||
DEBUG_PARM_REG, bfd_asymbol_value (sym)))
|
DEBUG_PARM_REG, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_TPDEF:
|
case C_TPDEF:
|
||||||
type = debug_name_type (dhandle, bfd_asymbol_name (sym), type);
|
type = debug_name_type (dhandle, bfd_asymbol_name (sym), type);
|
||||||
if (type == DEBUG_TYPE_NULL)
|
if (type == DEBUG_TYPE_NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_STRTAG:
|
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);
|
type = debug_tag_type (dhandle, bfd_asymbol_name (sym), type);
|
||||||
if (type == DEBUG_TYPE_NULL)
|
if (type == DEBUG_TYPE_NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
/* Store the named type into the slot, so that references get
|
/* Store the named type into the slot, so that references get
|
||||||
the name. */
|
the name. */
|
||||||
@ -637,29 +637,29 @@ parse_coff_symbol (bfd *abfd ATTRIBUTE_UNUSED, struct coff_types *types,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine if a symbol has external visibility. */
|
/* Determine if a symbol has external visibility. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
external_coff_symbol_p (int sym_class)
|
external_coff_symbol_p (int sym_class)
|
||||||
{
|
{
|
||||||
switch (sym_class)
|
switch (sym_class)
|
||||||
{
|
{
|
||||||
case C_EXT:
|
case C_EXT:
|
||||||
case C_WEAKEXT:
|
case C_WEAKEXT:
|
||||||
return TRUE;
|
return true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the main routine. It looks through all the symbols and
|
/* This is the main routine. It looks through all the symbols and
|
||||||
handles them. */
|
handles them. */
|
||||||
|
|
||||||
bfd_boolean
|
bool
|
||||||
parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
||||||
{
|
{
|
||||||
struct coff_symbols symbols;
|
struct coff_symbols symbols;
|
||||||
@ -671,7 +671,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
int fntype;
|
int fntype;
|
||||||
bfd_vma fnend;
|
bfd_vma fnend;
|
||||||
alent *linenos;
|
alent *linenos;
|
||||||
bfd_boolean within_function;
|
bool within_function;
|
||||||
long this_coff_symno;
|
long this_coff_symno;
|
||||||
|
|
||||||
symbols.syms = syms;
|
symbols.syms = syms;
|
||||||
@ -689,7 +689,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
fntype = 0;
|
fntype = 0;
|
||||||
fnend = 0;
|
fnend = 0;
|
||||||
linenos = NULL;
|
linenos = NULL;
|
||||||
within_function = FALSE;
|
within_function = false;
|
||||||
|
|
||||||
while (symbols.symno < symcount)
|
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"),
|
non_fatal (_("bfd_coff_get_syment failed: %s"),
|
||||||
bfd_errmsg (bfd_get_error ()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = bfd_asymbol_name (sym);
|
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"),
|
non_fatal (_("bfd_coff_get_auxent failed: %s"),
|
||||||
bfd_errmsg (bfd_get_error ()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
paux = &auxent;
|
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
|
/* The last C_FILE symbol points to the first external
|
||||||
symbol. */
|
symbol. */
|
||||||
if (! debug_set_filename (dhandle, "*globals*"))
|
if (! debug_set_filename (dhandle, "*globals*"))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (syment.n_sclass)
|
switch (syment.n_sclass)
|
||||||
@ -754,7 +754,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
case C_FILE:
|
case C_FILE:
|
||||||
next_c_file = syment.n_value;
|
next_c_file = syment.n_value;
|
||||||
if (! debug_set_filename (dhandle, name))
|
if (! debug_set_filename (dhandle, name))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_STAT:
|
case C_STAT:
|
||||||
@ -778,12 +778,12 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
|
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)
|
if (type == DEBUG_TYPE_NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
|
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
|
||||||
dhandle, type, within_function))
|
dhandle, type, within_function))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case C_FCN:
|
case C_FCN:
|
||||||
@ -793,18 +793,18 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
{
|
{
|
||||||
non_fatal (_("%ld: .bf without preceding function"),
|
non_fatal (_("%ld: .bf without preceding function"),
|
||||||
this_coff_symno);
|
this_coff_symno);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
|
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)
|
if (type == DEBUG_TYPE_NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (! debug_record_function (dhandle, fnname, type,
|
if (! debug_record_function (dhandle, fnname, type,
|
||||||
external_coff_symbol_p (fnclass),
|
external_coff_symbol_p (fnclass),
|
||||||
bfd_asymbol_value (sym)))
|
bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (linenos != NULL)
|
if (linenos != NULL)
|
||||||
{
|
{
|
||||||
@ -825,7 +825,7 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
if (! debug_record_line (dhandle,
|
if (! debug_record_line (dhandle,
|
||||||
linenos->line_number + base,
|
linenos->line_number + base,
|
||||||
linenos->u.offset + addr))
|
linenos->u.offset + addr))
|
||||||
return FALSE;
|
return false;
|
||||||
++linenos;
|
++linenos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -835,23 +835,23 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
fnclass = 0;
|
fnclass = 0;
|
||||||
fntype = 0;
|
fntype = 0;
|
||||||
|
|
||||||
within_function = TRUE;
|
within_function = true;
|
||||||
}
|
}
|
||||||
else if (strcmp (name, ".ef") == 0)
|
else if (strcmp (name, ".ef") == 0)
|
||||||
{
|
{
|
||||||
if (! within_function)
|
if (! within_function)
|
||||||
{
|
{
|
||||||
non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
|
non_fatal (_("%ld: unexpected .ef\n"), this_coff_symno);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bfd_asymbol_value (sym) > fnend)
|
if (bfd_asymbol_value (sym) > fnend)
|
||||||
fnend = bfd_asymbol_value (sym);
|
fnend = bfd_asymbol_value (sym);
|
||||||
if (! debug_end_function (dhandle, fnend))
|
if (! debug_end_function (dhandle, fnend))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
fnend = 0;
|
fnend = 0;
|
||||||
within_function = FALSE;
|
within_function = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -859,26 +859,26 @@ parse_coff (bfd *abfd, asymbol **syms, long symcount, void *dhandle)
|
|||||||
if (strcmp (name, ".bb") == 0)
|
if (strcmp (name, ".bb") == 0)
|
||||||
{
|
{
|
||||||
if (! debug_start_block (dhandle, bfd_asymbol_value (sym)))
|
if (! debug_start_block (dhandle, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else if (strcmp (name, ".eb") == 0)
|
else if (strcmp (name, ".eb") == 0)
|
||||||
{
|
{
|
||||||
if (! debug_end_block (dhandle, bfd_asymbol_value (sym)))
|
if (! debug_end_block (dhandle, bfd_asymbol_value (sym)))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
type = parse_coff_type (abfd, &symbols, &types, this_coff_symno,
|
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)
|
if (type == DEBUG_TYPE_NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
|
if (! parse_coff_symbol (abfd, &types, sym, this_coff_symno, &syment,
|
||||||
dhandle, type, within_function))
|
dhandle, type, within_function))
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,10 +31,10 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "budbg.h"
|
#include "budbg.h"
|
||||||
|
|
||||||
static bfd_boolean read_section_stabs_debugging_info
|
static bool read_section_stabs_debugging_info
|
||||||
(bfd *, asymbol **, long, void *, bfd_boolean *);
|
(bfd *, asymbol **, long, void *, bool *);
|
||||||
static bfd_boolean read_symbol_stabs_debugging_info
|
static bool read_symbol_stabs_debugging_info
|
||||||
(bfd *, asymbol **, long, void *, bfd_boolean *);
|
(bfd *, asymbol **, long, void *, bool *);
|
||||||
static void save_stab (int, int, bfd_vma, const char *);
|
static void save_stab (int, int, bfd_vma, const char *);
|
||||||
static void stab_context (void);
|
static void stab_context (void);
|
||||||
static void free_saved_stabs (void);
|
static void free_saved_stabs (void);
|
||||||
@ -44,10 +44,10 @@ static void free_saved_stabs (void);
|
|||||||
|
|
||||||
void *
|
void *
|
||||||
read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||||
bfd_boolean no_messages)
|
bool no_messages)
|
||||||
{
|
{
|
||||||
void *dhandle;
|
void *dhandle;
|
||||||
bfd_boolean found;
|
bool found;
|
||||||
|
|
||||||
dhandle = debug_init ();
|
dhandle = debug_init ();
|
||||||
if (dhandle == NULL)
|
if (dhandle == NULL)
|
||||||
@ -72,7 +72,7 @@ read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
{
|
{
|
||||||
if (! parse_coff (abfd, syms, symcount, dhandle))
|
if (! parse_coff (abfd, syms, symcount, dhandle))
|
||||||
goto err_exit;
|
goto err_exit;
|
||||||
found = TRUE;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! found)
|
if (! found)
|
||||||
@ -90,9 +90,9 @@ read_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
|
|
||||||
/* Read stabs in sections debugging information from a BFD. */
|
/* 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,
|
read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||||
void *dhandle, bfd_boolean *pfound)
|
void *dhandle, bool *pfound)
|
||||||
{
|
{
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
void *shandle;
|
void *shandle;
|
||||||
|
|
||||||
*pfound = FALSE;
|
*pfound = false;
|
||||||
shandle = NULL;
|
shandle = NULL;
|
||||||
|
|
||||||
for (i = 0; i < sizeof names / sizeof names[0]; i++)
|
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 ()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
free (shandle);
|
free (shandle);
|
||||||
free (stabs);
|
free (stabs);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
strsize = bfd_section_size (strsec);
|
strsize = bfd_section_size (strsec);
|
||||||
@ -146,22 +146,22 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
free (shandle);
|
free (shandle);
|
||||||
free (strings);
|
free (strings);
|
||||||
free (stabs);
|
free (stabs);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
/* Zero terminate the strings table, just in case. */
|
/* Zero terminate the strings table, just in case. */
|
||||||
strings [strsize] = 0;
|
strings [strsize] = 0;
|
||||||
if (shandle == NULL)
|
if (shandle == NULL)
|
||||||
{
|
{
|
||||||
shandle = start_stab (dhandle, abfd, TRUE, syms, symcount);
|
shandle = start_stab (dhandle, abfd, true, syms, symcount);
|
||||||
if (shandle == NULL)
|
if (shandle == NULL)
|
||||||
{
|
{
|
||||||
free (strings);
|
free (strings);
|
||||||
free (stabs);
|
free (stabs);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*pfound = TRUE;
|
*pfound = true;
|
||||||
|
|
||||||
stroff = 0;
|
stroff = 0;
|
||||||
next_stroff = 0;
|
next_stroff = 0;
|
||||||
@ -248,7 +248,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
free (shandle);
|
free (shandle);
|
||||||
free (stabs);
|
free (stabs);
|
||||||
free (strings);
|
free (strings);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't free f, since I think the stabs code
|
/* 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 (shandle != NULL)
|
||||||
{
|
{
|
||||||
if (! finish_stab (dhandle, shandle))
|
if (! finish_stab (dhandle, shandle))
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read stabs in the symbol table. */
|
/* Read stabs in the symbol table. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
||||||
void *dhandle, bfd_boolean *pfound)
|
void *dhandle, bool *pfound)
|
||||||
{
|
{
|
||||||
void *shandle;
|
void *shandle;
|
||||||
asymbol **ps, **symend;
|
asymbol **ps, **symend;
|
||||||
@ -299,16 +299,16 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
|
|
||||||
if (shandle == NULL)
|
if (shandle == NULL)
|
||||||
{
|
{
|
||||||
shandle = start_stab (dhandle, abfd, FALSE, syms, symcount);
|
shandle = start_stab (dhandle, abfd, false, syms, symcount);
|
||||||
if (shandle == NULL)
|
if (shandle == NULL)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pfound = TRUE;
|
*pfound = true;
|
||||||
|
|
||||||
s = i.name;
|
s = i.name;
|
||||||
if (s == NULL || strlen (s) < 1)
|
if (s == NULL || strlen (s) < 1)
|
||||||
return FALSE;
|
return false;
|
||||||
f = NULL;
|
f = NULL;
|
||||||
|
|
||||||
while (strlen (s) > 0
|
while (strlen (s) > 0
|
||||||
@ -334,7 +334,7 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
|
|||||||
{
|
{
|
||||||
stab_context ();
|
stab_context ();
|
||||||
free_saved_stabs ();
|
free_saved_stabs ();
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't free f, since I think the stabs code expects
|
/* 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 (shandle != NULL)
|
||||||
{
|
{
|
||||||
if (! finish_stab (dhandle, shandle))
|
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. */
|
/* 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
|
int
|
||||||
smart_rename (const char *from, const char *to, int fromfd,
|
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;
|
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;
|
static int string_min;
|
||||||
|
|
||||||
/* Whether or not we include all whitespace as a graphic char. */
|
/* 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. */
|
/* 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. */
|
/* 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. */
|
/* TRUE means for object files scan only the data section. */
|
||||||
static bfd_boolean datasection_only;
|
static bool datasection_only;
|
||||||
|
|
||||||
/* The BFD object file format. */
|
/* The BFD object file format. */
|
||||||
static char *target;
|
static char *target;
|
||||||
@ -134,7 +134,7 @@ static struct option long_options[] =
|
|||||||
{NULL, 0, NULL, 0}
|
{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 print_strings (const char *, FILE *, file_ptr, int, int, char *);
|
||||||
static void usage (FILE *, int) ATTRIBUTE_NORETURN;
|
static void usage (FILE *, int) ATTRIBUTE_NORETURN;
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int optc;
|
int optc;
|
||||||
int exit_status = 0;
|
int exit_status = 0;
|
||||||
bfd_boolean files_given = FALSE;
|
bool files_given = false;
|
||||||
char *s;
|
char *s;
|
||||||
int numeric_opt = 0;
|
int numeric_opt = 0;
|
||||||
|
|
||||||
@ -162,13 +162,13 @@ main (int argc, char **argv)
|
|||||||
expandargv (&argc, &argv);
|
expandargv (&argc, &argv);
|
||||||
|
|
||||||
string_min = 4;
|
string_min = 4;
|
||||||
include_all_whitespace = FALSE;
|
include_all_whitespace = false;
|
||||||
print_addresses = FALSE;
|
print_addresses = false;
|
||||||
print_filenames = FALSE;
|
print_filenames = false;
|
||||||
if (DEFAULT_STRINGS_ALL)
|
if (DEFAULT_STRINGS_ALL)
|
||||||
datasection_only = FALSE;
|
datasection_only = false;
|
||||||
else
|
else
|
||||||
datasection_only = TRUE;
|
datasection_only = true;
|
||||||
target = NULL;
|
target = NULL;
|
||||||
encoding = 's';
|
encoding = 's';
|
||||||
output_separator = NULL;
|
output_separator = NULL;
|
||||||
@ -179,15 +179,15 @@ main (int argc, char **argv)
|
|||||||
switch (optc)
|
switch (optc)
|
||||||
{
|
{
|
||||||
case 'a':
|
case 'a':
|
||||||
datasection_only = FALSE;
|
datasection_only = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
datasection_only = TRUE;
|
datasection_only = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
print_filenames = TRUE;
|
print_filenames = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'H':
|
case 'H':
|
||||||
@ -201,16 +201,16 @@ main (int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
include_all_whitespace = TRUE;
|
include_all_whitespace = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
print_addresses = TRUE;
|
print_addresses = true;
|
||||||
address_radix = 8;
|
address_radix = 8;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
print_addresses = TRUE;
|
print_addresses = true;
|
||||||
if (optarg[1] != '\0')
|
if (optarg[1] != '\0')
|
||||||
usage (stderr, 1);
|
usage (stderr, 1);
|
||||||
switch (optarg[0])
|
switch (optarg[0])
|
||||||
@ -293,20 +293,20 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
if (optind >= argc)
|
if (optind >= argc)
|
||||||
{
|
{
|
||||||
datasection_only = FALSE;
|
datasection_only = false;
|
||||||
SET_BINARY (fileno (stdin));
|
SET_BINARY (fileno (stdin));
|
||||||
print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL);
|
print_strings ("{standard input}", stdin, 0, 0, 0, (char *) NULL);
|
||||||
files_given = TRUE;
|
files_given = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (; optind < argc; ++optind)
|
for (; optind < argc; ++optind)
|
||||||
{
|
{
|
||||||
if (strcmp (argv[optind], "-") == 0)
|
if (strcmp (argv[optind], "-") == 0)
|
||||||
datasection_only = FALSE;
|
datasection_only = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
files_given = TRUE;
|
files_given = true;
|
||||||
exit_status |= !strings_file (argv[optind]);
|
exit_status |= !strings_file (argv[optind]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
||||||
bfd_boolean *got_a_section)
|
bool *got_a_section)
|
||||||
{
|
{
|
||||||
bfd_size_type sectsize;
|
bfd_size_type sectsize;
|
||||||
bfd_byte *mem;
|
bfd_byte *mem;
|
||||||
@ -343,7 +343,7 @@ strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*got_a_section = TRUE;
|
*got_a_section = true;
|
||||||
print_strings (filename, NULL, sect->filepos, 0, sectsize, (char *) mem);
|
print_strings (filename, NULL, sect->filepos, 0, sectsize, (char *) mem);
|
||||||
free (mem);
|
free (mem);
|
||||||
}
|
}
|
||||||
@ -354,18 +354,18 @@ strings_a_section (bfd *abfd, asection *sect, const char *filename,
|
|||||||
Return TRUE if successful,
|
Return TRUE if successful,
|
||||||
FALSE if not (such as if FILE is not an object file). */
|
FALSE if not (such as if FILE is not an object file). */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
strings_object_file (const char *file)
|
strings_object_file (const char *file)
|
||||||
{
|
{
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
asection *s;
|
asection *s;
|
||||||
bfd_boolean got_a_section;
|
bool got_a_section;
|
||||||
|
|
||||||
abfd = bfd_openr (file, target);
|
abfd = bfd_openr (file, target);
|
||||||
|
|
||||||
if (abfd == NULL)
|
if (abfd == NULL)
|
||||||
/* Treat the file as a non-object file. */
|
/* 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.
|
/* 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
|
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))
|
if (!bfd_check_format (abfd, bfd_object))
|
||||||
{
|
{
|
||||||
bfd_close (abfd);
|
bfd_close (abfd);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
got_a_section = FALSE;
|
got_a_section = false;
|
||||||
for (s = abfd->sections; s != NULL; s = s->next)
|
for (s = abfd->sections; s != NULL; s = s->next)
|
||||||
strings_a_section (abfd, s, file, &got_a_section);
|
strings_a_section (abfd, s, file, &got_a_section);
|
||||||
|
|
||||||
if (!bfd_close (abfd))
|
if (!bfd_close (abfd))
|
||||||
{
|
{
|
||||||
bfd_nonfatal (file);
|
bfd_nonfatal (file);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return got_a_section;
|
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. */
|
/* Print the strings in FILE. Return TRUE if ok, FALSE if an error occurs. */
|
||||||
|
|
||||||
static bfd_boolean
|
static bool
|
||||||
strings_file (char *file)
|
strings_file (char *file)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -405,12 +405,12 @@ strings_file (char *file)
|
|||||||
else
|
else
|
||||||
non_fatal (_("Warning: could not locate '%s'. reason: %s"),
|
non_fatal (_("Warning: could not locate '%s'. reason: %s"),
|
||||||
file, strerror (errno));
|
file, strerror (errno));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else if (S_ISDIR (st.st_mode))
|
else if (S_ISDIR (st.st_mode))
|
||||||
{
|
{
|
||||||
non_fatal (_("Warning: '%s' is a directory"), file);
|
non_fatal (_("Warning: '%s' is a directory"), file);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we weren't told to scan the whole file,
|
/* If we weren't told to scan the whole file,
|
||||||
@ -426,7 +426,7 @@ strings_file (char *file)
|
|||||||
{
|
{
|
||||||
fprintf (stderr, "%s: ", program_name);
|
fprintf (stderr, "%s: ", program_name);
|
||||||
perror (file);
|
perror (file);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_strings (file, stream, (file_ptr) 0, 0, 0, (char *) 0);
|
print_strings (file, stream, (file_ptr) 0, 0, 0, (char *) 0);
|
||||||
@ -435,11 +435,11 @@ strings_file (char *file)
|
|||||||
{
|
{
|
||||||
fprintf (stderr, "%s: ", program_name);
|
fprintf (stderr, "%s: ", program_name);
|
||||||
perror (file);
|
perror (file);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the next character, return EOF if none available.
|
/* 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
|
#define HOST_WIDEST_INT long
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define POISON_BFD_BOOLEAN 1
|
||||||
|
|
||||||
#endif /* _BIN_SYSDEP_H */
|
#endif /* _BIN_SYSDEP_H */
|
||||||
|
|||||||
@ -1063,7 +1063,7 @@ struct __attribute__ ((__packed__)) bin_toolbar
|
|||||||
};
|
};
|
||||||
#define BIN_TOOLBAR_SIZE 12
|
#define BIN_TOOLBAR_SIZE 12
|
||||||
|
|
||||||
extern bfd_boolean target_is_bigendian;
|
extern bool target_is_bigendian;
|
||||||
|
|
||||||
typedef struct windres_bfd
|
typedef struct windres_bfd
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,7 +50,7 @@ typedef struct mc_msg_item
|
|||||||
struct bin_messagetable_item *res;
|
struct bin_messagetable_item *res;
|
||||||
} mc_msg_item;
|
} mc_msg_item;
|
||||||
|
|
||||||
bfd_boolean target_is_bigendian = 0;
|
bool target_is_bigendian = 0;
|
||||||
const char *def_target_arch;
|
const char *def_target_arch;
|
||||||
|
|
||||||
/* Globals and static variable definitions. */
|
/* Globals and static variable definitions. */
|
||||||
|
|||||||
@ -89,9 +89,9 @@ void mc_set_inputfile (const char *);
|
|||||||
void mc_set_content (const unichar *);
|
void mc_set_content (const unichar *);
|
||||||
|
|
||||||
/* Lexer control variables. Used by mcparser.y file. */
|
/* Lexer control variables. Used by mcparser.y file. */
|
||||||
extern bfd_boolean mclex_want_nl;
|
extern bool mclex_want_nl;
|
||||||
extern bfd_boolean mclex_want_line;
|
extern bool mclex_want_line;
|
||||||
extern bfd_boolean mclex_want_filename;
|
extern bool mclex_want_filename;
|
||||||
|
|
||||||
void mc_fatal (const char *, ...);
|
void mc_fatal (const char *, ...);
|
||||||
void mc_warn (const char *, ...);
|
void mc_warn (const char *, ...);
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
|
|
||||||
bfd_boolean target_is_bigendian = 0;
|
bool target_is_bigendian = 0;
|
||||||
const char *def_target_arch;
|
const char *def_target_arch;
|
||||||
|
|
||||||
static void set_endianness (bfd *, const char *);
|
static void set_endianness (bfd *, const char *);
|
||||||
@ -713,12 +713,12 @@ quot (const char *string)
|
|||||||
#if defined (_WIN32) && !defined (__CYGWIN__)
|
#if defined (_WIN32) && !defined (__CYGWIN__)
|
||||||
/* For Windows shells, quote "like this". */
|
/* For Windows shells, quote "like this". */
|
||||||
{
|
{
|
||||||
bfd_boolean quoted = FALSE;
|
bool quoted = false;
|
||||||
|
|
||||||
dest = buf;
|
dest = buf;
|
||||||
if (strchr (string, ' '))
|
if (strchr (string, ' '))
|
||||||
{
|
{
|
||||||
quoted = TRUE;
|
quoted = true;
|
||||||
*dest++ = '"';
|
*dest++ = '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -832,7 +832,7 @@ wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_t
|
|||||||
{
|
{
|
||||||
rc_uint_type ret = 0;
|
rc_uint_type ret = 0;
|
||||||
#if defined (_WIN32) || defined (__CYGWIN__)
|
#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,
|
ret = (rc_uint_type) WideCharToMultiByte (cp, 0, u, -1, mb, mb_len,
|
||||||
NULL, & used_def);
|
NULL, & used_def);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user