gdb/testsuite/
[deliverable/binutils-gdb.git] / binutils / objdump.c
index 59289e0552513ddd7da19a66ebaa62db5c5f069b..b346aa7a52a40a818d716415a50d31c9a98356f4 100644 (file)
@@ -1525,7 +1525,9 @@ disassemble_bytes (struct disassemble_info * info,
              info->stream = &sfile;
              info->bytes_per_line = 0;
              info->bytes_per_chunk = 0;
-             info->flags = 0;
+             info->flags = disassemble_all ? DISASSEMBLE_DATA : 0;
+             if (machine)
+               info->flags |= USER_SPECIFIED_MACHINE_TYPE;
 
              if (info->disassembler_needs_relocs
                  && (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0
@@ -1554,7 +1556,7 @@ disassemble_bytes (struct disassemble_info * info,
                      || (distance_to_rel > 0
                          && distance_to_rel < (bfd_signed_vma) (previous_octets/ opb)))
                    {
-                     info->flags = INSN_HAS_RELOC;
+                     info->flags |= INSN_HAS_RELOC;
                      aux->reloc = **relppp;
                    }
                  else
@@ -1961,7 +1963,8 @@ disassemble_section (bfd *abfd, asection *section, void *info)
       else
        nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
 
-      if (nextstop_offset > stop_offset)
+      if (nextstop_offset > stop_offset
+         || nextstop_offset <= addr_offset)
        nextstop_offset = stop_offset;
 
       /* If a symbol is explicitly marked as being an object
@@ -1984,7 +1987,7 @@ disassemble_section (bfd *abfd, asection *section, void *info)
       disassemble_bytes (pinfo, paux->disassemble_fn, insns, data,
                         addr_offset, nextstop_offset,
                         rel_offset, &rel_pp, rel_ppend);
-
+      
       addr_offset = nextstop_offset;
       sym = nextsym;
     }
@@ -2233,21 +2236,18 @@ dump_dwarf_section (bfd *abfd, asection *section,
        && debug_displays [i].enabled != NULL
        && *debug_displays [i].enabled)
       {
-       if (!debug_displays [i].eh_frame)
-         {
-           struct dwarf_section *sec = &debug_displays [i].section;
-
-           if (strcmp (sec->uncompressed_name, match) == 0)
-             sec->name = sec->uncompressed_name;
-           else
-             sec->name = sec->compressed_name;
-           if (load_specific_debug_section (i, section, abfd))
-             {
-               debug_displays [i].display (sec, abfd);
+       struct dwarf_section *sec = &debug_displays [i].section;
 
-               if (i != info && i != abbrev)
-                 free_debug_section (i);
-             }
+       if (strcmp (sec->uncompressed_name, match) == 0)
+         sec->name = sec->uncompressed_name;
+       else
+         sec->name = sec->compressed_name;
+       if (load_specific_debug_section (i, section, abfd))
+         {
+           debug_displays [i].display (sec, abfd);
+           
+           if (i != info && i != abbrev)
+             free_debug_section (i);
          }
        break;
       }
This page took 0.024239 seconds and 4 git commands to generate.