binutils/:
authorAndreas Schwab <schwab@linux-m68k.org>
Mon, 10 Jan 2005 09:54:50 +0000 (09:54 +0000)
committerAndreas Schwab <schwab@linux-m68k.org>
Mon, 10 Jan 2005 09:54:50 +0000 (09:54 +0000)
* 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.

binutils/ChangeLog
binutils/configure
binutils/configure.in
binutils/objdump.c
include/ChangeLog
include/dis-asm.h
opcodes/ChangeLog
opcodes/disassemble.c

index 02ddaea2796fa9e7df6429088e50cc929cb5432f..44624e5767c2e95b81e71c209b12fc6607a57631 100644 (file)
@@ -1,3 +1,15 @@
+2005-01-10  Andreas Schwab  <schwab@suse.de>
+
+       * 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.
+
 2005-01-05  H.J. Lu  <hongjiu.lu@intel.com>
 
        * readelf.c (display_debug_loc): Display base address
index 59a1b591354cb40eacc517d1d90c4d51fc6ac049..dec5d8250f6eca6d780a3e518db33101b762cac5 100755 (executable)
@@ -5037,19 +5037,19 @@ EOF
 
 fi
 echo $ac_n "checking for stat64""... $ac_c" 1>&6
-echo "configure:5054: checking for stat64" >&5
+echo "configure:5041: checking for stat64" >&5
 if eval "test \"`echo '$''{'bu_cv_have_stat64'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5059 "configure"
+#line 5046 "configure"
 #include "confdefs.h"
 #include <sys/stat.h>
 int main() {
 struct stat64 st; stat64 ("/tmp/foo", &st);
 ; return 0; }
 EOF
-if { (eval echo configure:5066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bu_cv_have_stat64=yes
 else
@@ -5059,14 +5059,14 @@ else
   saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
  cat > conftest.$ac_ext <<EOF
-#line 5076 "configure"
+#line 5063 "configure"
 #include "confdefs.h"
 #include <sys/stat.h>
 int main() {
 struct stat64 st; stat64 ("/tmp/foo", &st);
 ; return 0; }
 EOF
-if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE"
 else
@@ -5100,14 +5100,14 @@ fi
 # Some systems have frexp only in -lm, not in -lc.
 
 echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:5050: checking for library containing frexp" >&5
+echo "configure:5104: checking for library containing frexp" >&5
 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_frexp="no"
 cat > conftest.$ac_ext <<EOF
-#line 5057 "configure"
+#line 5111 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5118,7 +5118,7 @@ int main() {
 frexp()
 ; return 0; }
 EOF
-if { (eval echo configure:5068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_frexp="none required"
 else
@@ -5129,7 +5129,7 @@ rm -f conftest*
 test "$ac_cv_search_frexp" = "no" && for i in m; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5079 "configure"
+#line 5133 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5140,7 +5140,7 @@ int main() {
 frexp()
 ; return 0; }
 EOF
-if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_frexp="-l$i"
 break
@@ -5162,19 +5162,19 @@ else :
 fi
 
 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:5112: checking for time_t in time.h" >&5
+echo "configure:5166: checking for time_t in time.h" >&5
 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5117 "configure"
+#line 5171 "configure"
 #include "confdefs.h"
 #include <time.h>
 int main() {
 time_t i;
 ; return 0; }
 EOF
-if { (eval echo configure:5124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_decl_time_t_time_h=yes
 else
@@ -5195,19 +5195,19 @@ EOF
 fi
 
 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5145: checking for time_t in sys/types.h" >&5
+echo "configure:5199: checking for time_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5150 "configure"
+#line 5204 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 int main() {
 time_t i;
 ; return 0; }
 EOF
-if { (eval echo configure:5157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_decl_time_t_types_h=yes
 else
@@ -5230,12 +5230,12 @@ fi
 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
 # by default.
 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
-echo "configure:5180: checking for utime.h" >&5
+echo "configure:5234: checking for utime.h" >&5
 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5185 "configure"
+#line 5239 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #ifdef HAVE_TIME_H
@@ -5246,7 +5246,7 @@ int main() {
 struct utimbuf s;
 ; return 0; }
 EOF
-if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bu_cv_header_utime_h=yes
 else
@@ -5267,12 +5267,12 @@ EOF
 fi
 
 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:5217: checking whether fprintf must be declared" >&5
+echo "configure:5271: checking whether fprintf must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5222 "configure"
+#line 5276 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -5293,7 +5293,7 @@ int main() {
 char *(*pfn) = (char *(*)) fprintf
 ; return 0; }
 EOF
-if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_fprintf=no
 else
@@ -5314,12 +5314,12 @@ EOF
 fi
 
 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5264: checking whether strstr must be declared" >&5
+echo "configure:5318: checking whether strstr must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5269 "configure"
+#line 5323 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -5340,7 +5340,7 @@ int main() {
 char *(*pfn) = (char *(*)) strstr
 ; return 0; }
 EOF
-if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_strstr=no
 else
@@ -5361,12 +5361,12 @@ EOF
 fi
 
 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:5311: checking whether sbrk must be declared" >&5
+echo "configure:5365: checking whether sbrk must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5316 "configure"
+#line 5370 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -5387,7 +5387,7 @@ int main() {
 char *(*pfn) = (char *(*)) sbrk
 ; return 0; }
 EOF
-if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_sbrk=no
 else
@@ -5408,12 +5408,12 @@ EOF
 fi
 
 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5358: checking whether getenv must be declared" >&5
+echo "configure:5412: checking whether getenv must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5363 "configure"
+#line 5417 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -5434,7 +5434,7 @@ int main() {
 char *(*pfn) = (char *(*)) getenv
 ; return 0; }
 EOF
-if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_getenv=no
 else
@@ -5455,12 +5455,12 @@ EOF
 fi
 
 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5405: checking whether environ must be declared" >&5
+echo "configure:5459: checking whether environ must be declared" >&5
 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5410 "configure"
+#line 5464 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -5481,7 +5481,7 @@ int main() {
 char *(*pfn) = (char *(*)) environ
 ; return 0; }
 EOF
-if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_decl_needed_environ=no
 else
@@ -5625,12 +5625,6 @@ do
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
          ;;
-        c4x-*-* | tic4x-*-*)
-          OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
-          ;;
-       ia64-*-*)
-         OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
-         ;;
        esac
     fi
 done
index 3eaa8251649e9c5157c75e134272dfb9f2dfbf69..53e2db0bf38c36140edaf6ab2fe85cc1995b7984 100644 (file)
@@ -310,12 +310,6 @@ changequote([,])dnl
          BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
          DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
          ;;
-        c4x-*-* | tic4x-*-*)
-          OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=32"
-          ;;
-       ia64-*-*)
-         OBJDUMP_DEFS="$OBJDUMP_DEFS -DSKIP_ZEROES=16"
-         ;;
        esac
     fi
 done
index fa421ad7d5d274a428d95dcf5162c61d3b08651f..7249054214a9e8d5b4e6fc6bdf6c97e841ea8976 100644 (file)
@@ -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;
index 198570979d193e0f40e04aa8c838c973a7be1c3d..c4fab4bbf49a14f0e3db40400142a72e0db0bc52 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-10  Andreas Schwab  <schwab@suse.de>
+
+       * dis-asm.h (struct disassemble_info): Add skip_zeroes and
+       skip_zeroes_at_end.
+
 2004-12-11  Ben Elliston  <bje@au.ibm.com>
 
        * fibheap.h (struct fibnode): Only use unsigned long bitfields
index aa8e2b5084555fedc3aaee752ac23cf739970c87..be54263a756e590f58285a37985da34b83cab3d3 100644 (file)
@@ -159,6 +159,18 @@ typedef struct disassemble_info {
      Normally one, but some DSPs have byte sizes of 16 or 32 bits.  */
   unsigned int octets_per_byte;
 
+  /* The number of zeroes we want to see at the end of a section before we
+     start skipping them.  */
+  unsigned int skip_zeroes;
+
+  /* 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 SKIP_ZEROES,
+     they will be disassembled.  If there are fewer than
+     SKIP_ZEROES_AT_END, they will be skipped.  This is a heuristic
+     attempt to avoid disassembling zeroes inserted by section
+     alignment.  */
+  unsigned int skip_zeroes_at_end;
+
   /* Results from instruction decoders.  Not all decoders yet support
      this information.  This info is set each time an instruction is
      decoded, and is only valid for the last such instruction.
index 23821df87fc971145bc6cacbb8925fa5d008908c..2effaf30654e70f1e0ddb61ff05cd6927103d4f7 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-10  Andreas Schwab  <schwab@suse.de>
+
+       * disassemble.c (disassemble_init_for_target) <case
+       bfd_arch_ia64>: Set skip_zeroes to 16.
+       <case bfd_arch_tic4x>: Set skip_zeroes to 32.
+
 2004-12-23  Tomer Levi  <Tomer.Levi@nsc.com>
 
        * crx-opc.c: Mark 'bcop' instruction as RELAXABLE.
index 19de8f6f8411b7d0dfb0993cdd6366c0519c1f7f..7fda7d39b84bfc73a12d6f16f50b1ee0156d0866 100644 (file)
@@ -1,5 +1,5 @@
 /* Select disassembly routine for specified architecture.
-   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004
+   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
    Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -423,6 +423,15 @@ disassemble_init_for_target (struct disassemble_info * info)
     case bfd_arch_arm:
       info->symbol_is_valid = arm_symbol_is_valid;
       break;
+#endif
+#ifdef ARCH_ia64
+    case bfd_arch_ia64:
+      info->skip_zeroes = 16;
+      break;
+#endif
+#ifdef ARCH_tic4x
+    case bfd_arch_tic4x:
+      info->skip_zeroes = 32;
 #endif
     default:
       break;
This page took 0.043198 seconds and 4 git commands to generate.