aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2005-01-10 09:54:50 +0000
committerAndreas Schwab <schwab@linux-m68k.org>2005-01-10 09:54:50 +0000
commit0bcb06d2f206b920aed12619c82f6e311ecacce2 (patch)
treee319b5e58c99679665a31ca7441587e6417259fd /binutils/objdump.c
parentf33e9acf1b9d497a366d072caee34548fcfdf1cb (diff)
downloadgdb-0bcb06d2f206b920aed12619c82f6e311ecacce2.zip
gdb-0bcb06d2f206b920aed12619c82f6e311ecacce2.tar.gz
gdb-0bcb06d2f206b920aed12619c82f6e311ecacce2.tar.bz2
binutils/:
* configure.in: Don't define SKIP_ZEROES. * configure: Regenerate. * objdump.c (disassemble_data): Set skip_zeroes and skip_zeroes_at_end in disasm_info to defaults. (DEFAULT_SKIP_ZEROES): Rename from SKIP_ZEROES and always define. (DEFAULT_SKIP_ZEROES_AT_END): Rename from SKIP_ZEROES_AT_END and always define. (disassemble_bytes): Use skip_zeroes and skip_zeroes_at_end from objdump_disasm_info. include/: * dis-asm.h (struct disassemble_info): Add skip_zeroes and skip_zeroes_at_end. opcodes/: * disassemble.c (disassemble_init_for_target) <case bfd_arch_ia64>: Set skip_zeroes to 16. <case bfd_arch_tic4x>: Set skip_zeroes to 32.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index fa421ad..7249054 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1202,9 +1202,7 @@ process_section_p (asection * section)
/* The number of zeroes we want to see before we start skipping them.
The number is arbitrarily chosen. */
-#ifndef SKIP_ZEROES
-#define SKIP_ZEROES (8)
-#endif
+#define DEFAULT_SKIP_ZEROES 8
/* The number of zeroes to skip at the end of a section. If the
number of zeroes at the end is between SKIP_ZEROES_AT_END and
@@ -1213,9 +1211,7 @@ process_section_p (asection * section)
attempt to avoid disassembling zeroes inserted by section
alignment. */
-#ifndef SKIP_ZEROES_AT_END
-#define SKIP_ZEROES_AT_END (3)
-#endif
+#define DEFAULT_SKIP_ZEROES_AT_END 3
/* Disassemble some data in memory between given values. */
@@ -1236,7 +1232,9 @@ disassemble_bytes (struct disassemble_info * info,
bfd_boolean done_dot;
int skip_addr_chars;
bfd_vma addr_offset;
- int opb = info->octets_per_byte;
+ unsigned int opb = info->octets_per_byte;
+ unsigned int skip_zeroes = info->skip_zeroes;
+ unsigned int skip_zeroes_at_end = info->skip_zeroes_at_end;
SFILE sfile;
aux = (struct objdump_disasm_info *) info->application_data;
@@ -1292,9 +1290,9 @@ disassemble_bytes (struct disassemble_info * info,
if (! disassemble_zeroes
&& (info->insn_info_valid == 0
|| info->branch_delay_insns == 0)
- && (z - addr_offset * opb >= SKIP_ZEROES
+ && (z - addr_offset * opb >= skip_zeroes
|| (z == stop_offset * opb &&
- z - addr_offset * opb < SKIP_ZEROES_AT_END)))
+ z - addr_offset * opb < skip_zeroes_at_end)))
{
printf ("\t...\n");
@@ -1855,6 +1853,8 @@ disassemble_data (bfd *abfd)
disasm_info.mach = bfd_get_mach (abfd);
disasm_info.disassembler_options = disassembler_options;
disasm_info.octets_per_byte = bfd_octets_per_byte (abfd);
+ disasm_info.skip_zeroes = DEFAULT_SKIP_ZEROES;
+ disasm_info.skip_zeroes_at_end = DEFAULT_SKIP_ZEROES_AT_END;
if (bfd_big_endian (abfd))
disasm_info.display_endian = disasm_info.endian = BFD_ENDIAN_BIG;