Catch and warn about attempts to display debug information for version 1 aranges.
authorNick Clifton <nickc@redhat.com>
Thu, 17 Aug 2000 23:00:38 +0000 (23:00 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 17 Aug 2000 23:00:38 +0000 (23:00 +0000)
binutils/ChangeLog
binutils/readelf.c

index f257f8debe6dd3fe0f77dd2731fb3811b97ccb30..998851a30dee2c9aa9bc1d1c5856252ca1a2233a 100644 (file)
@@ -1,3 +1,9 @@
+2000-08-17  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (display_debug_pubnames): Only issue warning
+       message once.  Terminate message with a new line.
+       (display_debug_aranges): Only display version 2 debug info.
+
 2000-08-14  Todd Vierling <tv@wasabisystems.com>
 
        * objcopy.c (strip_main): Silently accept -d as an alias for -g
index c211d1e872ba38d9ade0b31573bf4d250c100680..4bb4cbd43605c2b5b0bf136db11a02ceb570301f 100644 (file)
@@ -5225,7 +5225,14 @@ display_debug_pubnames (section, start, file)
 
       if (pubnames.pn_version != 2)
        {
-         warn (_("Only DWARF 2 pubnames are currently supported"));
+         static int warned = 0;
+
+         if (! warned)
+           {
+             warn (_("Only DWARF 2 pubnames are currently supported\n"));
+             warned = 1;
+           }
+         
          continue;
        }
 
@@ -6397,6 +6404,12 @@ display_debug_aranges (section, start, file)
       arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
       arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
 
+      if (arange.ar_version != 2)
+       {
+         warn (_("Only DWARF 2 aranges are currently supported.\n"));
+         break;
+       }
+
       printf (_("  Length:                   %ld\n"), arange.ar_length);
       printf (_("  Version:                  %d\n"), arange.ar_version);
       printf (_("  Offset into .debug_info:  %lx\n"), arange.ar_info_offset);