This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: objdump : Odd formating if disassembly with --enable-64-bit-bfd
- To: Alan Modra <alan at linuxcare dot com dot au>
- Subject: Re: objdump : Odd formating if disassembly with --enable-64-bit-bfd
- From: Erik de Castro Lopo <nospam at mega-nerd dot com>
- Date: Sat, 13 Jan 2001 01:06:10 +0000
- CC: binutils at sourceware dot cygnus dot com
- Organization: Erik Conspiracy Secret Labs
- References: <Pine.LNX.4.21.0101121039340.10809-100000@front.linuxcare.com.au>
Alan Modra wrote:
>
> On Thu, 11 Jan 2001, Erik de Castro Lopo wrote:
>
> > No, I've got no complaints about that. The thing I think is odd is that
> > the movl does not line up with the call and push instructions. This makes
> > the aseembly listing much more difficult to read.
> >
> > 0x0000000008049325 68 b1 f0 04 08 push $0x804f0b1
> > 0x000000000804932a e8 75 fc ff ff call 0x0000000008048fa4
> > 0x000000000804932f c7 05 34 2c 05 08 00 00 00 00 movl $0x0,0x8052c34
>
> Hmm, that seems to be a side-effect of turning on prefix-intructions.
>
> objdump.c:disassemble_bytes around line 1410 has:
>
> /* If ! prefix_addresses and ! wide_output, we print
> octets_per_line octets per line. */
> pb = octets;
> if (pb > octets_per_line && ! prefix_addresses && ! wide_output)
> pb = octets_per_line;
>
> You could remove `&& ! prefix_addresses' here, but that results in output
> like the following
>
> 0x0000000008049347 c7 05 7c 47 05 08 00 movl $0x0,0x805477c
> 804934e: 00 00 00
>
> which is probably why the condition was added. Feel free to provide
> patches to fix the problem ;-)
OK, here it is. This is a patch agains the 010111 daily build.
I've tried it with and without the --enable-64-bit-bfd configure option
and it seems to fix the problem I was concerned with and not break
anything else.
------------------------------------------------------------------------------
diff -cr binutils-010111/opcodes/i386-dis.c
binutils-010111-mods/opcodes/i386-dis.c
*** binutils-010111/opcodes/i386-dis.c Fri Jan 12 06:51:14 2001
--- binutils-010111-mods/opcodes/i386-dis.c Sat Jan 13 11:41:17 2001
***************
*** 2991,2999 ****
abort ();
orig_sizeflag = sizeflag;
! /* The output looks better if we put 7 bytes on a line, since that
! puts most long word instructions on a single line. */
! info->bytes_per_line = 7;
info->private_data = (PTR) &priv;
priv.max_fetched = priv.the_buffer;
--- 2991,2999 ----
abort ();
orig_sizeflag = sizeflag;
! /* The output looks better if we put 10 bytes on a line, since that
! puts all long word instructions on a single line. */
! info->bytes_per_line = 10;
info->private_data = (PTR) &priv;
priv.max_fetched = priv.the_buffer;
------------------------------------------------------------------------------
Erik
--
+----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes its valid)
+----------------------------------------------------------+
"In my opinion, shareware tends to combine the worst of
commercial software (no sources) with the worst of free
software (no finishing touches). I simply do not believe
in the shareware market at all." -- Linus Torvalds