aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
AgeCommit message (Collapse)AuthorFilesLines
2008-07-30Silence gcc printf warningsAlan Modra1-7/+9
2008-07-10bfd/Craig Silverstein1-16/+16
* Makefile.am (BFD32_LIBS): Add compress.lo. (BFD32_LIBS_CFILES): Add compress.c. (BFD_H_FILES): Likewise. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * config.in: Add HAVE_ZLIB_H * configure.in: Add test for libz and zlib.h * configure: Regenerate. * dwarf2.c (read_section): New function. (read_indirect_string): Call new function read_section. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Call new function read_section when just one .zdebug_info section is found, otherwise read and compress multiple sections. (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr. * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix. (special_sections_z): New struct. (special_sections): Refer to special_sections_z. * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize sections named .zdebug_*. (_bfd_mips_elf_fake_sections): Likewise. * compress.c: New file. (bfd_uncompress_section_contents): New function. bfd/doc/ * Makefile.am (BFD_H_DEP): Add ../compress.c. * Makefile.in: Regenerate. binutils/ * config.in: Add HAVE_ZLIB_H * configure.in: Add test for libz and zlib.h * configure: Regenerate. * dwarf.c (debug_displays): Add .zdebug_* strings. * dwarf.h (struct dwarf_section): Add fields uncompressed_namd and compressed_name. * objdump.c (load_debug_section): Call bfd_uncompress_section_contents when loading a compressed section. (dump_dwarf_section): Recognize compressed section name. (mach_o_dwarf_sections): Rename as mach_o_uncompressed_dwarf_sections. (mach_o_compressed_dwarf_sections): New variable. (generic_dwarf_section): Rename as generic_uncompressed_dwarf_sections. (generic_compressed_dwarf_sections): New variable. (check_mach_o_dwarf): Save and restore mach_o_compressed_dwarf_sections. * readelf.c: Add #include for config.h and zlib.h (process_section_headers): Recognize compressed section name. (uncompress_section_contents): New function. (load_debug_section): Call uncompress_section_contents when loading a compressed section. (display_debug_section): Recognize compressed section name. binutils/testsuite: * binutils-all/objdump.exp: Add test for objdump -s on a file with a compressed debug section. Add test for objdump -W on a file that contains a compressed debug section. * binutils-all/readelf.exp: Call readelf_compressed_wa_test. (readelf_compressed_wa_test): New function. * binutils-all/dw2-compressed.S: New file. * binutils-all/objdump.W: New file. * binutils-all/objdump.s: New file. * binutils-all/readelf.wa: New file.
2008-04-11 * dwarf.c (display_debug_lines): Rename toNick Clifton1-12/+444
display_debug_lines_raw. (display_debug_lines_decoded): New function. Displays the interpreted contents of a .debug_line section. (display_debug_lines): New function: Selects either a raw dump or a decoded dump (or both) as requested by the user. * dwarf.h (do_debug_lines_decoded): New extern. * readelf.c: Add support for -wL or --debug-dump=decodedline option to display the decoded contents of a .debug_line section. * doc/binutils.texi: Document the new option. * NEWS: Mention the new feature.
2008-04-08 * dwarf.c: Remove trailing whitespace throughout file.Alan Modra1-19/+19
2008-04-03binutils/H.J. Lu1-2/+10
2008-04-03 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c (dwarf_regnames_i386): Add AVX registers. (dwarf_regnames_x86_64): Likewise. gas/ 2008-04-03 H.J. Lu <hongjiu.lu@intel.com> * NEWS: Mention AES, CLMUL, AVX/FMA and -msse2avx. * doc/c-i386.texi: Add avx, aes, clmul and fma to -march=. Document -msse2avx, .avx, .aes, .clmul and .fma. * config/tc-i386.c (YMMWORD_MNEM_SUFFIX): New. (vex_prefix): Likewise. (sse2avx): Likewise. (CPU_FLAGS_ARCH_MATCH): Likewise. (CPU_FLAGS_64BIT_MATCH): Likewise. (CPU_FLAGS_32BIT_MATCH): Likewise. (CPU_FLAGS_PERFECT_MATCH): Likewise. (regymm): Likewise. (vex_imm4): Likewise. (fits_in_imm4): Likewise. (build_vex_prefix): Likewise. (VEX_check_operands): Likewise. (bad_implicit_operand): Likewise. (OPTION_MSSE2AVX): Likewise. (T_YMMWORD): Likewise. (_i386_insn): Add vex. (cpu_arch): Add .avx, .aes, .clmul and .fma. (cpu_flags_match): Changed to take a pointer to const template. Enable encoding SSE instructions with VEX prefix for -msse2avx. (match_mem_size): Also check ymmword. (operand_type_match): Clear ymmword. (md_begin): Allow '_' in mnemonic. (type_names): Add OPERAND_TYPE_VEX_IMM4. (process_immext): Update assert. (md_assemble): Don't call process_immext if sse2avx and immext are true. Call build_vex_prefix if vex is true. (parse_insn): Updated for cpu_flags_match. (swap_operands): Handle 5 operands. (match_template): Handle 5 operands. Updated for cpu_flags_match. Check regymm. Call VEX_check_operands. Handle YMMWORD_MNEM_SUFFIX. (process_suffix): Handle YMMWORD_MNEM_SUFFIX. (check_byte_reg): Check regymm. (process_operands): Duplicate the destination register for -msse2avx if needed. (build_modrm_byte): Updated for instructions with VEX encoding. (output_insn): Output VEX prefix if needed. (md_longopts): Add msse2avx. (md_parse_option): Handle OPTION_MSSE2AVX. (md_show_usage): Add avx, aes, clmul, fma and -msse2avx. (intel_e09): Support YMMWORD. (intel_e11): Likewise. (intel_get_token): Likewise. gas/testsuite/ 2008-04-03 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run aes, aes-intel, x86-64-aes, x86-64-aes-intel, avx, avx-intel, inval-avx, x86-64-avx, x86-64-avx-intel and x86-64-inval-avx. * gas/cfi/cfi-i386.s: Add tests for AVX register maps. * gas/cfi/cfi-x86_64.s: Likewise. * gas/i386/aes.d: New. * gas/i386/aes.s: Likewise. * gas/i386/aes-intel.d: Likewise. * gas/i386/avx.d: Likewise. * gas/i386/avx.s: Likewise. * gas/i386/avx-intel.d: Likewise. * gas/i386/clmul.d: Likewise. * gas/i386/clmul-intel.d: Likewise. * gas/i386/clmul.s: Likewise. * gas/i386/i386.exp: Likewise. * gas/i386/inval-avx.l: Likewise. * gas/i386/inval-avx.s: Likewise. * gas/i386/sse2avx.d: Likewise. * gas/i386/sse2avx.s: Likewise. * gas/i386/x86-64-aes.d: Likewise. * gas/i386/x86-64-aes.s: Likewise. * gas/i386/x86-64-aes-intel.d: Likewise. * gas/i386/x86-64-avx.d: Likewise. * gas/i386/x86-64-avx.s: Likewise. * gas/i386/x86-64-avx-intel.d: Likewise. * gas/i386/x86-64-clmul.d: Likewise. * gas/i386/x86-64-clmul-intel.d: Likewise. * gas/i386/x86-64-clmul.s: Likewise. * gas/i386/x86-64-inval-avx.l: Likewise. * gas/i386/x86-64-inval-avx.s: Likewise. * gas/i386/x86-64-sse2avx.d: Likewise. * gas/i386/x86-64-sse2avx.s: Likewise. * gas/i386/arch-10.s: Add tests for AVX, AES, CLMUL and FMA. * gas/i386/x86-64-arch-2.s: Likewise. * gas/i386/rexw.s: Add AVX tests. * gas/i386/x86-64-opcode-inval.s: Remove lds/les test. * gas/cfi/cfi-i386.d: Updated. * gas/cfi/cfi-x86_64.d: Likewise. * gas/i386/arch-10.d: Likewise. * gas/i386/arch-10-1.l: Likewise. * gas/i386/arch-10-2.l: Likewise. * gas/i386/arch-10-3.l: Likewise. * gas/i386/arch-10-4.l: Likewise. * gas/i386/rexw.d: Likewise. * gas/i386/x86-64-arch-2.d: Likewise. * gas/i386/x86-64-opcode-inval.d: Likewise. * gas/i386/x86-64-opcode-inval-intel.d: Likewise. include/opcode/ 2008-04-03 H.J. Lu <hongjiu.lu@intel.com> * i386.h (MAX_OPERANDS): Set to 5. (MAX_MNEM_SIZE): Changed to 20. opcodes/ 2008-04-03 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (OP_E_register): New. (OP_E_memory): Likewise. (OP_VEX): Likewise. (OP_EX_Vex): Likewise. (OP_EX_VexW): Likewise. (OP_XMM_Vex): Likewise. (OP_XMM_VexW): Likewise. (OP_REG_VexI4): Likewise. (PCLMUL_Fixup): Likewise. (VEXI4_Fixup): Likewise. (VZERO_Fixup): Likewise. (VCMP_Fixup): Likewise. (VPERMIL2_Fixup): Likewise. (rex_original): Likewise. (rex_ignored): Likewise. (Mxmm): Likewise. (XMM): Likewise. (EXxmm): Likewise. (EXxmmq): Likewise. (EXymmq): Likewise. (Vex): Likewise. (Vex128): Likewise. (Vex256): Likewise. (VexI4): Likewise. (EXdVex): Likewise. (EXqVex): Likewise. (EXVexW): Likewise. (EXdVexW): Likewise. (EXqVexW): Likewise. (XMVex): Likewise. (XMVexW): Likewise. (XMVexI4): Likewise. (PCLMUL): Likewise. (VZERO): Likewise. (VCMP): Likewise. (VPERMIL2): Likewise. (xmm_mode): Likewise. (xmmq_mode): Likewise. (ymmq_mode): Likewise. (vex_mode): Likewise. (vex128_mode): Likewise. (vex256_mode): Likewise. (USE_VEX_C4_TABLE): Likewise. (USE_VEX_C5_TABLE): Likewise. (USE_VEX_LEN_TABLE): Likewise. (VEX_C4_TABLE): Likewise. (VEX_C5_TABLE): Likewise. (VEX_LEN_TABLE): Likewise. (REG_VEX_XX): Likewise. (MOD_VEX_XXX): Likewise. (PREFIX_0F38DB..PREFIX_0F38DF): Likewise. (PREFIX_0F3A44): Likewise. (PREFIX_0F3ADF): Likewise. (PREFIX_VEX_XXX): Likewise. (VEX_OF): Likewise. (VEX_OF38): Likewise. (VEX_OF3A): Likewise. (VEX_LEN_XXX): Likewise. (vex): Likewise. (need_vex): Likewise. (need_vex_reg): Likewise. (vex_i4_done): Likewise. (vex_table): Likewise. (vex_len_table): Likewise. (OP_REG_VexI4): Likewise. (vex_cmp_op): Likewise. (pclmul_op): Likewise. (vpermil2_op): Likewise. (m_mode): Updated. (es_reg): Likewise. (PREFIX_0F38F0): Likewise. (PREFIX_0F3A60): Likewise. (reg_table): Add REG_VEX_71...REG_VEX_73 and REG_VEX_AE. (prefix_table): Add PREFIX_0F38DB..PREFIX_0F38DF, PREFIX_0F3ADF and PREFIX_VEX_XXX entries. (x86_64_table): Use VEX_C4_TABLE and VEX_C5_TABLE. (three_byte_table): Use PREFIX_0F38DB..PREFIX_0F38DF and PREFIX_0F3ADF. (mod_table): Use VEX_C4_TABLE, VEX_C5_TABLE and VEX_LEN_TABLE. Add MOD_VEX_XXX entries. (ckprefix): Initialize rex_original and rex_ignored. Store the REX byte in rex_original. (get_valid_dis386): Handle the implicit prefix in VEX prefix bytes and USE_VEX_LEN_TABLE/USE_VEX_C4_TABLE/USE_VEX_C5_TABLE. (print_insn): Set need_vex/need_vex_reg/vex_i4_done to 0 before calling get_valid_dis386. Use rex_original and rex_ignored when printing out REX. (putop): Handle "XY". (intel_operand_size): Handle VEX, xmm_mode, xmmq_mode and ymmq_mode. (OP_E_extended): Updated to use OP_E_register and OP_E_memory. (OP_XMM): Handle VEX. (OP_EX): Likewise. (XMM_Fixup): Likewise. (CMP_Fixup): Use ARRAY_SIZE. * i386-gen.c (cpu_flag_init): Add CpuAES, CPU_CLMUL_FLAGS, CPU_FMA_FLAGS and CPU_AVX_FLAGS. (operand_type_init): Add OPERAND_TYPE_REGYMM and OPERAND_TYPE_VEX_IMM4. (cpu_flags): Add CpuAVX, CpuAES, CpuCLMUL and CpuFMA. (opcode_modifiers): Add Implicit1stXmm0, Vex, Vex256, VexNDD, VexNDS, VexW0, VexW1, Vex0F, Vex0F38, Vex0F3A, Vex3Sources, VexImmExt and SSE2AVX. (operand_types): Add RegYMM, Ymmword and Vex_Imm4. * i386-opc.h (CpuAVX): New. (CpuAES): Likewise. (CpuCLMUL): Likewise. (CpuFMA): Likewise. (Vex): Likewise. (Vex256): Likewise. (VexNDS): Likewise. (VexNDD): Likewise. (VexW0): Likewise. (VexW1): Likewise. (Vex0F): Likewise. (Vex0F38): Likewise. (Vex0F3A): Likewise. (Vex3Sources): Likewise. (VexImmExt): Likewise. (SSE2AVX): Likewise. (RegYMM): Likewise. (Ymmword): Likewise. (Vex_Imm4): Likewise. (Implicit1stXmm0): Likewise. (CpuXsave): Updated. (CpuLM): Likewise. (ByteOkIntel): Likewise. (OldGcc): Likewise. (Control): Likewise. (Unspecified): Likewise. (OTMax): Likewise. (i386_cpu_flags): Add cpuavx, cpuaes, cpuclmul and cpufma. (i386_opcode_modifier): Add implicit1stxmm0, vex, vex256, vexnds, vexndd, vexw0, vexw1, vex0f, vex0f38, vex0f3a, vex3sources, veximmext and sse2avx. (i386_operand_type): Add regymm, ymmword and vex_imm4. * i386-opc.tbl: Add AES, CLMUL, AVX and FMA new instructions. * i386-reg.tbl: Add AVX registers, ymm0..ymm15. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
2008-03-03* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP,Nick Clifton1-0/+9
DW_OP_PGI_omp_thread_num. * dwarf.c (decode_location_expression): Handle DW_OP_PGI_omp_thread_num.
2008-01-29* dwarf.c (print_dwarf_vma): Use mingw field type specified if necessary.Nick Clifton1-0/+4
2008-01-29* dwarf.c (print_dwarf_vma): New function. Display the value of aNick Clifton1-34/+66
dwarf_vma type at a specified precision. (display_debug_loc): Use dwarf_vma type for begin and end values. Use print_dwarf_vma to display their values. Use byte_get_signed in order to correctly detect the -1 escape value. (display_debug_aranges): Likewise. (display_debug_ranges): Likewise.
2008-01-29update copyright dateAlan Modra1-1/+1
2008-01-29 * dwarf.c (display_debug_loc): Correct test for base addressAlan Modra1-1/+5
entry when 64-bit host dumping 32-bit object.
2008-01-28binutils/H.J. Lu1-33/+126
2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c: Include "elf/common.h". (eh_addr_size): Changed to int. (dwarf_regnames_i386): New. (dwarf_regnames_x86_64): Likewise. (dwarf_regnames): Likewise. (dwarf_regnames_count): Likewise. (init_dwarf_regnames): Likewise. (regname): Likewise. (frame_display_row): Properly support different address size. Call regname to get register name. (display_debug_frames): Call regname to get register name. Display DW_CFA_def_cfa_register as DW_CFA_def_cfa_register instead of DW_CFA_def_cfa_reg. * dwarf.h (init_dwarf_regnames): New. * objdump.c: Include "elf-bfd.h". (dump_dwarf): Call init_dwarf_regnames on ELF input. * readelf.c (guess_is_rela): Change argument to int. (parse_args): Remove the undocumented upper case options for -wX. (process_file_header): Call init_dwarf_regnames if do_dwarf_register is true. gas/testsuite/ 2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * gas/cfi/cfi-alpha-1.d: Replace DW_CFA_def_cfa_reg with DW_CFA_def_cfa_register. * gas/cfi/cfi-alpha-3.d: Likewise. * gas/cfi/cfi-hppa-1.d: Likewise. * gas/cfi/cfi-i386.d: Likewise. * gas/cfi/cfi-m68k.d: Likewise. * gas/cfi/cfi-mips-1.d: Likewise. * gas/cfi/cfi-sh-1.d: Likewise. * gas/cfi/cfi-sparc-1.d: Likewise. * gas/cfi/cfi-sparc64-1.d: Likewise. * gas/cfi/cfi-x86_64.d: Likewise. * gas/cfi/cfi-common-1.d: Updated for i386/x86-64 register names. * gas/cfi/cfi-common-2.d: Likewise. * gas/cfi/cfi-common-5.d: Likewise. * gas/cfi/cfi-i386.d: Likewise. * gas/cfi/cfi-x86_64.d: Likewise. ld/testsuite/ 2008-01-28 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/eh1.d: Replace DW_CFA_def_cfa_reg with DW_CFA_def_cfa_register. Updated for i386/x86-64 register names. * ld-elf/eh2.d: Likewise. * ld-elf/eh3.d: Likewise. * ld-elf/eh4.d: Likewise. * ld-elf/eh5.d: Likewise.
2008-01-25Add mingw I64 support for printing long and long long valuesNick Clifton1-35/+80
2008-01-14 (DEBUG_INFO_UNAVAILABLE): Value stored in num_debug_info_entriesNick Clifton1-16/+23
when the .debug_info section could not be loaded/parsed. (process_debug_info): Display the length of the compilation unit in hex, so that it corresponds with the offsets that will follow. Tell the user if the length was 32-bit or 64-bit. If a DIE abbreviation could not be found, tell the user the offset of the DIE. (free_debug_memory): Do not attempt to free any entries in the debug_information array if num_debug_info_entries is set to DEBUG_INFO_UNAVAILABLE.
2008-01-14 * dwarf.c (process_debug_info): Include the CU offset and corruptNick Clifton1-6/+28
version value when reporting unrecognised DWARF version numbers. (load_debug_info): Remember a failed attempt to load and parse the .debug_info section and do not repeat such attempts. (display_debug_lines): Check the return value from load_debug_info and return whilst displaying a warning message if the load failed. (display_debug_loc): Likewise. (display_debug_ranges): Likewise.
2008-01-04 * dwarf.c (read_and_display_attr_value): Prefix values that areNick Clifton1-37/+81
displayed in hexadecimal with 0x. For the DW_AT_import attribute display the abbreviation number and tag of the imported DIE. (process_debug_info): Warn about lengths that reserved by the DWARF3 specification. Provide more information when corrupted DIEs are detected. Warn if DIE corruption makes the sibling level negative.
2007-11-21 * dwarf.c (display_debug_loc): Cast section_end - start to longHans-Peter Nilsson1-1/+1
for output format.
2007-11-21* dwarf.c (display_debug_loc): Issue a warning if there are bytes at the endNick Clifton1-0/+4
of the .debug_loc section which are not referenced by any attribute in the .debug_info section.
2007-11-16* dwarf2.h: Mention the location of the DWARF3 spec on the web.Nick Clifton1-29/+170
(DW_AT_stride_size): Rename to DW_AT_bit_stride. (DW_AT_stride): Rename to DW_AT_byte_stride. * dwarf.c (process_extended_line_op): Add cases for HP extensions to the line ops. Mention if an unknown op code is in the user defined range. (decode_location_expression): Add cases for HP extensions, the DW_OP_GNU_uninit extension and the DW_OP_call_frame_cfa and DW_OP_bit_piece DWARF3 operators. (read_and_display_attr): Correct list of attributes which can reference a location list. (read_and_display_attr_value): Add cases for DWARF3 values and HP extensions. Correct list of attributes which can reference a location list. (get_AT_name): Add cases for DWARF3 values and HP and PGI extensions.
2007-10-31* dwarf.c (is_relocatable): Remove definition.Nick Clifton1-8/+2
(display_debug_frames): Remove check in is_relocatable. * dwarf.h (is_relocatable): Remove declaration. * objdump.c (is_relocatable): New static definition. * readelf.c (dump_relocations): Make the function void. (is_32bit_abs_reloc): Add support for x86, Arc, Arm, D10V, Dlx, OR32 and Score. (is_32bit_pcrel_reloc): Add support for x86 and Arm. (is_16bit_abs_reloc): Add support for D10V. (debug_apply_rela_addends): Rename to debug_apply_relocations. Add code to support rel relocations. (load_debug_section): Fix call to debug_apply_relocations. (get_file_header): Remove setting of is_relocatable. * gas/cfi/cfi-common-6.d: Allow for possible relocation of the .debug.eh_frame section.
2007-10-28* dwarf.c (process_debug_info): Check for corrupt lengths.Nick Clifton1-0/+9
* readelf.c (get_reloc_type): New function. Returns the reloc number extracted from the info field of a reloc. (get_reloc_symindex): New function. Returns the symbol index (extracted from the info field of a reloc. (dump_relocations): Use the new functions. (slurp_ia64_unwind_table): Use the new functions. (slurp_hppa_unwind_table): Use the new functions. (dump_section_as_bytes): Use the new functions. (get_reloc_size): Delete function. (is_32bit_abs_reloc): New function. Determines if a given reloc type is a 32-bit absolute relocation. (is_32bit_pcrel_reloc): New function. Like is_32bit_abs_reloc but for pc-relative relocations. (is_64bit_abs_reloc): New function. Like is_32bit_abs_reloc but for 64-bit absolute relocations. (is_16bit_abs_reloc): New function. Like is_32bit_abs_reloc but for 32-bit absolute relocations. (debug_apply_rela_addends): Use the new functions. Skip and warn about any unrecognised relocations.
2007-10-10* dwarf.c (process_debug_info): Line up section offsets ofJim Blandy1-2/+2
attribute values with those of dies. (read_and_display_attr): Reduce spacing here.
2007-10-10* dwarf.c (display_debug_lines): Print the offset of each lineJim Blandy1-0/+3
number program header.
2007-07-05Change sources over to using GPLv3Nick Clifton1-1/+1
2007-06-11 * dwarf.c (decode_location_expression): Add DW_OP_form_tls_address.Nathan Sidwell1-0/+3
2007-04-26bfd/Alan Modra1-5/+5
Many files: Include sysdep.h before bfd.h. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. binutils/ * bucumm.h: Split off host dependencies to.. * sysdep.h: ..here. Many files: Include sysdep.h. Remove duplicate headers and reorder. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. ld/ Many files: Include sysdep.h first. Remove duplicate headers. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. opcodes/ * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * ns32k-dis.c: Include sysdep.h first.
2007-04-09 * dwarf.c (process_debug_info): Do not require DW_AT_frame_base forDaniel Jacobowitz1-1/+0
DW_TAG_inlined_subroutine.
2007-02-06Add missing cast to (unsigned long)Nick Clifton1-1/+1
2007-02-06PR gas/3800Nick Clifton1-22/+45
* readelf.c: Include elf/h8.h twice. The first time in order to get the reloc numbers, the second time in order to get the reloc decoder function. (dump_section): Tell the user if the section being displayed has unprocessed relocs associated with it. (get_reloc_size): New function - returns the size of a reloc. (debug_apply_rela_addends): Use get_reloc_size(). * dwarf.c (read_and_display_attr_value): Extend number of languages known for the DW_AT_language attribute. (process_debug_info): Display the attribute offset before decoding the attribute, in case there are problems.
2007-01-31 * dwarf.c (process_debug_info): Protect against bogus length andNathan Sidwell1-8/+19
abbrev offsets.
2006-10-10 * dwarf.c (display_debug_loc): Don't dereference loc_offsets whenAndreas Schwab1-2/+4
there are no location lists. (display_debug_ranges): Similar for range_lists.
2006-08-08PR binutils/2768Nick Clifton1-2/+8
* dwarf.c (display_debug_aranges): When the address size is greater than 4 display addresses and lengths as 16 hex digits, otherwise use 8 hex digits.
2006-06-30* dwarf.c (display_debug_frames): Catch a corrupt length field generating anNick Clifton1-11/+32
end of block address that is beyond the end of the section. When encountering a corrupt CIE pointer do not reset the start pointer as more data still has to be read. Do not warn about user defined call frame instructions.
2006-05-152006-05-15 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-1/+1
* dwarf.c (display_debug_frames): Don't return on ZERO terminator.
2006-03-10 * dwarf.c (process_extended_line_op): Remove pointer_size param.Alan Modra1-72/+8
Use length instead to determine address size. (get_pointer_size_and_offset_of_comp_unit): Delete. (display_debug_lines): Adjust for above. (display_debug_aranges): Don't stop on finding two zeros. (display_debug_frames): For warning, print offset not pointer.
2006-03-03 * dwarf.c (frame_display_row, display_debug_frames): HandleJakub Jelinek1-1/+44
DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.
2005-09-302005-09-30 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-6/+13
* dwarf.c (fetch_indirect_string): Adjust for section address. (process_debug_info): Likewise. (display_debug_loc): Likewise. (display_debug_ranges): Likewise. * objdump.c (mach_o_dwarf_sections): New. (generic_dwarf_sections): Likewise. (check_mach_o_dwarf): Likewise. (dump_dwarf): Call check_mach_o_dwarf.
2005-09-302005-09-30 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-0/+3746
* Makefile.am (CFILES): Add dwarf.c. (readelf_SOURCES): Likewise. * Makefile.in: Regenerated. * dwarf.c: New file. * dwarf.h. Likewise. * readelf.c: Include "dwarf.h" instead of "bfd.h". (do_debug_info): Remove the static definition. (do_debug_abbrevs): Likewise. (do_debug_lines): Likewise. (do_debug_pubnames): Likewise. (do_debug_aranges): Likewise. (do_debug_ranges): Likewise. (do_debug_frames): Likewise. (do_debug_frames_interp): Likewise. (do_debug_macinfo): Likewise. (do_debug_str): Likewise. (do_debug_loc): Likewise. (is_relocatable): Likewise. (have_frame_base): Likewise. (need_base_address): Likewise. (eh_addr_size): Likewise. (error): Likewise. (warn): Likewise. (cmalloc): Likewise. (xcmalloc): Likewise. (xcrealloc): Likewise. (dwarf_section): Removed. (byte_get_little_endian): Likewise. (byte_get_signed): Likewise. (byte_get_big_endian): Likewise. (read_leb128): Likewise. (State_Machine_Registers): Likewise. (state_machine_regs): Likewise. (reset_state_machine): Likewise. (process_extended_line_op): Likewise. (debug_str_section): Likewise. (fetch_indirect_string): Likewise. (debug_abbrev_section): Likewise. (abbrev_attr): Likewise. (first_abbrev): Likewise. (last_abbrev): Likewise. (free_abbrevs): Likewise. (add_abbrev_attr): Likewise. (process_abbrev_section): Likewise. (get_TAG_name): Likewise. (get_FORM_name): Likewise. (display_block): Likewise. (decode_location_expression): Likewise. (debug_info): Likewise. (debug_information): Likewise. (num_debug_info_entries): Likewise. (last_pointer_size): Likewise. (warned_about_missing_comp_units): Likewise. (read_and_display_attr_value): Likewise. (get_AT_name): Likewise. (read_and_display_attr): Likewise. (process_debug_info): Likewise. (get_pointer_size_and_offset_of_comp_unit): Likewise. (get_debug_info): Likewise. (display_debug_lines): Likewise. (display_debug_pubnames): Likewise. (display_debug_macinfo): Likewise. (display_debug_abbrev): Likewise. (display_debug_loc): Likewise. (display_debug_str): Likewise. (display_debug_aranges): Likewise. (display_debug_ranges): Likewise. (Frame_Chunk): Likewise. (DW_CFA_unreferenced): Likewise. (frame_need_space): Likewise. (frame_display_row): Likewise. (size_of_encoded_value): Likewise. (get_encoded_value): Likewise. (GET): Likewise. (LEB): Likewise. (SLEB): Likewise. (display_debug_frames): Likewise. (display_debug_not_supported): Likewise. (debug_displays): Likewise. (load_debug_section): Updated. (free_debug_section): Likewise. (display_debug_section): Likewise. (process_object): Call free_debug_memory to free debug memory.