public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* small patch for objdump
@ 1998-10-27  8:47 Philip Blundell
  0 siblings, 0 replies; 2+ messages in thread
From: Philip Blundell @ 1998-10-27  8:47 UTC (permalink / raw)
  To: gas2

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;
 



^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: small patch for objdump
@ 1998-10-27 14:42 Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 1998-10-27 14:42 UTC (permalink / raw)
  To: pb; +Cc: gas2

: Date: Tue, 27 Oct 1998 16:46:12 +0100
: From: Philip Blundell <pb@nexus.co.uk>
: 
: 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.

I checked, and you are right, the code was still using signed
addresses.  (Of course some processors do have signed address spaces,
but they are in the minority).  So, I have applied your patch.

Cheers
	Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-10-27 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-27  8:47 small patch for objdump Philip Blundell
1998-10-27 14:42 Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).