* objdump disassemby
@ 2003-11-19 8:20 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2003-11-19 8:20 UTC (permalink / raw)
To: binutils
Nick's recent change to objdump.c:disassemble_section broke numerous
tests. At first, I thought the changed symbols were an intentional
improvement, but changed my mind after looking at more than just the
powerpc resuls. I'm fairly sure that changing the symbol lookup so that
insn operands must use a symbol from the section being disassembled was
an accidental change. ;) This restores the previous behaviour.
* objdump.c: Wrap long lines, init vars separately from decl.
(disassemble_section): Reset require_sec after call to
find_symbol_for_address.
I'm also committing some formatting fixes, which I stripped from the
following diff. If anyone wants to see them, they can get them with
cvs diff -r1.83 -r1.84 binutils/objdump.c
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.83
diff -u -p -r1.83 objdump.c
--- binutils/objdump.c 14 Nov 2003 15:12:42 -0000 1.83
+++ binutils/objdump.c 19 Nov 2003 07:58:49 -0000
@@ -1628,7 +1640,6 @@ disassemble_section (bfd *abfd, asection
bfd_get_section_contents (abfd, section, data, 0, datasize);
paux->sec = section;
- paux->require_sec = TRUE;
pinfo->buffer = data;
pinfo->buffer_vma = section->vma;
pinfo->buffer_length = datasize;
@@ -1661,7 +1672,9 @@ disassemble_section (bfd *abfd, asection
printf (_("Disassembly of section %s:\n"), section->name);
/* Find the nearest symbol forwards from our current position. */
+ paux->require_sec = TRUE;
sym = find_symbol_for_address (section->vma + addr_offset, info, &place);
+ paux->require_sec = FALSE;
/* Disassemble a block of instructions up to the address associated with
the symbol we have just found. Then print the symbol and find the
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-19 8:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-19 8:20 objdump disassemby Alan Modra
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).