This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

small patch for objdump


I just found this change in my tree.  I made it some months ago to fix a 
problem with addresses above 0x80000000 being reported incorrectly when 
disassembling code.  Although I haven't tested versions later than the 2.9.1
release it looks like the problem is still there; would someone like to 
take a look?  Thanks.

p.

1998-10-27  Philip Blundell  <pb@nexus.co.uk>

	* objdump.c (disassemble_bytes): Make address variables unsigned
	to avoid problems when disassembling code at high-bit-set
	addresses.

diff -u --recursive --exclude CVS --new-file clean/binutils-2.9.1.0.15/binutils/objdump.c binutils/binutils/objdump.c
--- clean/binutils-2.9.1.0.15/binutils/objdump.c	Fri Apr 17 11:36:02 1998
+++ binutils/binutils/objdump.c	Mon Aug 17 11:28:40 1998
@@ -178,7 +178,7 @@
 
 static void
 disassemble_bytes PARAMS ((struct disassemble_info *, disassembler_ftype,
-			   boolean, bfd_byte *, long, long, arelent ***,
+			   boolean, bfd_byte *, unsigned long, unsigned long, arelent ***,
 			   arelent **));
 
 static void
@@ -1155,8 +1155,8 @@
      disassembler_ftype disassemble_fn;
      boolean insns;
      bfd_byte *data;
-     long start;
-     long stop;
+     unsigned long start;
+     unsigned long stop;
      arelent ***relppp;
      arelent **relppend;
 {
@@ -1165,7 +1165,7 @@
   int bytes_per_line;
   boolean done_dot;
   int skip_addr_chars;
-  long i;
+  unsigned long i;
 
   aux = (struct objdump_disasm_info *) info->application_data;
   section = aux->sec;
@@ -1202,7 +1202,7 @@
   i = start;
   while (i < stop)
     {
-      long z;
+      unsigned long z;
       int bytes;
       boolean need_nl = false;