{"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'},
#ifdef ENABLE_LIBCTF
- {"ctf", required_argument, NULL, OPTION_CTF},
+ {"ctf", optional_argument, NULL, OPTION_CTF},
{"ctf-parent", required_argument, NULL, OPTION_CTF_PARENT},
#endif
{"debugging", no_argument, NULL, 'g'},
Returns the number of characters added to OUT.
Returns the number of bytes consumed from IN in CONSUMED.
Always consumes at least one byte and displays at least one character. */
-
+
static unsigned int
display_utf8 (const unsigned char * in, char * out, unsigned int * consumed)
{
out += sprintf (out, "%02x", in [j]);
out += sprintf (out, "%c", unicode_display == unicode_hex ? '>' : '}');
break;
-
+
case unicode_highlight:
if (isatty (1))
out += sprintf (out, "\x1B[31;47m"); /* Red. */
{
case 2:
out += sprintf (out, "\\u%02x%02x",
- ((in[0] & 0x1c) >> 2),
+ ((in[0] & 0x1c) >> 2),
((in[0] & 0x03) << 6) | (in[1] & 0x3f));
break;
if (wide_output)
bfd_map_over_sections (abfd, find_longest_section_name,
- &max_section_name_length);
+ &max_section_name_length);
printf (_("Idx %-*s Size %-*s%-*sFile off Algn"),
max_section_name_length, "Name",
printf ("\n");
bfd_map_over_sections (abfd, dump_section_header,
- &max_section_name_length);
+ &max_section_name_length);
}
\f
static asymbol **
if (want_section)
{
/* NB: An object file can have different sections with the same
- section name. Compare compare section pointers if they have
+ section name. Compare compare section pointers if they have
the same owner. */
if (sorted_syms[place]->section->owner == sec->owner
&& sorted_syms[place]->section != sec)
&& vma >= bfd_section_vma (sec)
&& vma < (bfd_section_vma (sec)
+ bfd_section_size (sec) / opb)));
-
+
if (! sym_ok (want_section, abfd, thisplace, sec, inf))
{
long i;
if (rel->address == vma)
{
/* Absolute relocations do not provide a more helpful
- symbolic address. Find a non-absolute relocation
+ symbolic address. Find a non-absolute relocation
with the same address. */
arelent **rel_vma = rel_mid;
for (rel_mid--;
{
/* Demangle the name. */
demangle_alloc = bfd_demangle (abfd, functionname,
- demangle_flags);
+ demangle_flags);
}
/* Demangling adds trailing parens, so don't print those. */
inf->bytes_per_line = 0;
inf->bytes_per_chunk = 0;
inf->flags = ((disassemble_all ? DISASSEMBLE_DATA : 0)
- | (wide_output ? WIDE_OUTPUT : 0));
+ | (wide_output ? WIDE_OUTPUT : 0));
if (machine)
inf->flags |= USER_SPECIFIED_MACHINE_TYPE;
/* Find the nearest symbol forwards from our current position. */
paux->require_sec = true;
sym = (asymbol *) find_symbol_for_address (section->vma + addr_offset,
- (struct disassemble_info *) inf,
- &place);
+ (struct disassemble_info *) inf,
+ &place);
paux->require_sec = false;
/* PR 9774: If the target used signed addresses then we must make
because that will screw up the relocs. */
sorted_symcount = symcount ? symcount : dynsymcount;
sorted_syms = (asymbol **) xmalloc ((sorted_symcount + synthcount)
- * sizeof (asymbol *));
+ * sizeof (asymbol *));
if (sorted_symcount != 0)
{
memcpy (sorted_syms, symcount ? syms : dynsyms,
if (! bfd_check_format (data, bfd_object))
return NULL;
-
+
return data;
}
else
sec->name = sec->xcoff_name;
if (load_specific_debug_section ((enum dwarf_section_display_enum) i,
- section, abfd))
+ section, abfd))
{
debug_displays [i].display (sec, abfd);
e = strchr (b, ',');
if (e)
- *e = 0;
+ *e = 0;
for (opt = (*desc)->options; opt->name; opt++)
- if (strcmp (opt->name, b) == 0)
- {
- opt->selected = true;
- break;
- }
+ if (strcmp (opt->name, b) == 0)
+ {
+ opt->selected = true;
+ break;
+ }
if (opt->name == NULL)
- non_fatal (_("target specific dump '%s' not supported"), b);
+ non_fatal (_("target specific dump '%s' not supported"), b);
if (e)
- {
- *e = ',';
- b = e + 1;
- }
+ {
+ *e = ',';
+ b = e + 1;
+ }
}
while (e != NULL);
if (with_line_numbers
&& sec != NULL
&& bfd_find_nearest_line_discriminator (abfd, sec, syms, q->address,
- &filename, &functionname,
- &linenumber, &discriminator))
+ &filename, &functionname,
+ &linenumber, &discriminator))
{
if (functionname != NULL
&& (last_functionname == NULL
|| (filename != NULL
&& last_filename != NULL
&& filename_cmp (filename, last_filename) != 0)
- || (discriminator != last_discriminator)))
+ || (discriminator != last_discriminator)))
{
- if (discriminator > 0)
- printf ("%s:%u\n", filename == NULL ? "???" :
+ if (discriminator > 0)
+ printf ("%s:%u\n", filename == NULL ? "???" :
sanitize_string (filename), linenumber);
- else
- printf ("%s:%u (discriminator %u)\n",
+ else
+ printf ("%s:%u (discriminator %u)\n",
filename == NULL ? "???" : sanitize_string (filename),
- linenumber, discriminator);
+ linenumber, discriminator);
last_line = linenumber;
last_discriminator = discriminator;
if (last_filename != NULL)
displaying information about the main file. Any memory allocated by
load_separate_debug_files will be released when we call
free_debug_memory below.
-
+
The test on is_mainfile is there because the chain of separate debug
info files is a global variable shared by all invocations of dump_bfd. */
if (byte_get != NULL && is_mainfile)
{
asymbol ** extra_syms;
long old_symcount = symcount;
-
+
extra_syms = slurp_symtab (i->handle);
if (extra_syms)
bfd *last_arfile = NULL;
if (level == 0)
- printf (_("In archive %s:\n"), sanitize_string (bfd_get_filename (file)));
+ printf (_("In archive %s:\n"), sanitize_string (bfd_get_filename (file)));
else if (level > 100)
{
/* Prevent corrupted files from spinning us into an
return;
}
else
- printf (_("In nested archive %s:\n"),
+ printf (_("In nested archive %s:\n"),
sanitize_string (bfd_get_filename (file)));
for (;;)