summaryrefslogtreecommitdiff
path: root/binutils/prdbg.c
Commit message (Collapse)AuthorAgeFilesLines
* objdump print_debugging_info memory leaksAlan Modra2023-04-061-148/+172
| | | | | | | | | | | | | | | Fix memory leaks and do a general tidy of the code for printing coff and stabs debug. * prdbg.c: Delete unnneeded forward function declarations. Delete unnecessary casts throughout. Free all strings returned from pop_type throughout file. (struct pr_stack): Delete "num_parents". Replace tests for "num_parents" non-zero with tests of "parents" non-NULL throughout. Free "parents" before assigning, and set to NULL after freeing. Remove const from "method". Always strdup strings assigned to method, and free before assigning. (print_debugging_info): Free info.stack and info.filename.
* Update year range in copyright notice of binutils filesAlan Modra2023-01-011-1/+1
| | | | | | The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
* PR29262, memory leak in pr_function_typeAlan Modra2022-06-201-5/+2
| | | | | PR 29262 * prdbg.c (pr_function_type): Free "s" on failure path.
* Remove use of bfd_uint64_t and similarAlan Modra2022-05-271-34/+5
| | | | | | | Requiring C99 means that uses of bfd_uint64_t can be replaced with uint64_t, and similarly for bfd_int64_t, BFD_HOST_U_64_BIT, and BFD_HOST_64_BIT. This patch does that, removes #ifdef BFD_HOST_* and tidies a few places that print 64-bit values.
* Update year range in copyright notice of binutils filesAlan Modra2022-01-021-1/+1
| | | | | | | | | | The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
* Use bool in binutilsAlan Modra2021-03-311-430/+423
| | | | | | | | | | | | | * sysdep.h (POISON_BFD_BOOLEAN): Define. * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c, * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c, * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h, * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c, * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c, * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h, * windmc.c, * windmc.h, * windres.c, * winduni.c, * wrstabs.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout.
* Include string.h in bfd.h and delete LITMEMCPY, LITSTRCPYAlan Modra2021-03-311-1/+1
| | | | | | | | | | | | | | This fixes the issue that startswith depends on strncpy being declared, and not all projects using bfd.h include string.h before bfd.h. I've also deleted some macros that don't find much use anywhere. bfd/ * bfd-in.h: Include string.h. (LITMEMCPY, LITSTRCPY): Delete. * bfd-in2.h: Regenerate. binutils/ * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
* Add startswith function and use it instead of CONST_STRNEQ.Martin Liska2021-03-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ChangeLog: * bfd-in.h (startswith): Add startswith function. (CONST_STRNEQ): Remove. * bfd-in2.h (startswith): Regenerate with make headers. * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith. (_bfd_slurp_extended_name_table): Likewise. * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise. * bfd.c (bfd_get_sign_extend_vma): Likewise. (bfd_convert_section_size): Likewise. (bfd_convert_section_contents): Likewise. * coff-stgo32.c (go32exe_create_stub): Likewise. (go32exe_check_format): Likewise. * coffcode.h (styp_to_sec_flags): Likewise. (GNU_DEBUGALTLINK): Likewise. * coffgen.c (_bfd_coff_section_already_linked): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. * cofflink.c (coff_link_add_symbols): Likewise. (process_embedded_commands): Likewise. * compress.c (bfd_is_section_compressed_with_header): Likewise. (bfd_init_section_decompress_status): Likewise. * dwarf2.c (find_debug_info): Likewise. (place_sections): Likewise. * ecoff.c (_bfd_ecoff_slurp_armap): Likewise. * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. (assign_section_numbers): Likewise. (elfcore_grok_win32pstatus): Likewise. * elf32-arm.c (cmse_scan): Likewise. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (is_arm_elf_unwind_section_name): Likewise. * elf32-bfin.c (bfin_size_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise. (elf32_tic6x_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise. (xtensa_is_insntable_section): Likewise. (xtensa_is_littable_section): Likewise. (xtensa_is_proptable_section): Likewise. (xtensa_property_section_name): Likewise. (xtensa_callback_required_dependence): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ia64-vms.c (is_unwind_section_name): Likewise. (get_reloc_section): Likewise. (elf64_ia64_size_dynamic_sections): Likewise. (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elflink.c (elf_link_add_object_symbols): Likewise. (_bfd_elf_gc_mark_extra_sections): Likewise. (bfd_elf_parse_eh_frame_entries): Likewise. (_bfd_elf_section_already_linked): Likewise. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise. * elfnn-ia64.c (is_unwind_section_name): Likewise. (elfNN_ia64_size_dynamic_sections): Likewise. (elfNN_ia64_object_p): Likewise. * elfxx-mips.c (FN_STUB_P): Likewise. (CALL_STUB_P): Likewise. (CALL_FP_STUB_P): Likewise. (_bfd_mips_elf_section_from_shdr): Likewise. (_bfd_mips_elf_fake_sections): Likewise. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_final_write_processing): Likewise. (_bfd_mips_elf_final_link): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise. * elfxx-x86.c (elf_i386_is_reloc_section): Likewise. (elf_x86_64_is_reloc_section): Likewise. * hpux-core.c (thread_section_p): Likewise. * libcoff.h (bfd_pei_p): Likewise. * linker.c (REAL): Likewise. (unwrap_hash_lookup): Likewise. (_bfd_generic_link_add_one_symbol): Likewise. * mmo.c (mmo_internal_write_section): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pef.c (bfd_pef_print_symbol): Likewise. * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise. * som.c (som_slurp_symbol_table): Likewise. (som_slurp_armap): Likewise. * wasm-module.c (wasm_compute_custom_section_file_position): Likewise. binutils/ChangeLog: * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ with startswith. * emul_aix.c (ar_emul_aix_parse_arg): Likewise. * objcopy.c (is_mergeable_note_section): Likewise. * objdump.c (dump_dwarf_section): Likewise. * prdbg.c (pr_method_type): Likewise. (pr_class_baseclass): Likewise. (tg_class_baseclass): Likewise. * readelf.c (process_lto_symbol_tables): Likewise. * stabs.c (ULLHIGH): Likewise. (parse_stab_argtypes): Likewise. (stab_demangle_function_name): Likewise. gas/ChangeLog: * config/tc-i386.c (md_parse_option): Replace usage of CONST_STRNEQ with startswith. (x86_64_section_word): Likewise. * config/tc-sparc.c (md_parse_option): Likewise. gdb/ChangeLog: * arm-tdep.c (show_disassembly_style_sfunc): Replace usage of CONST_STRNEQ with startswith. (_initialize_arm_tdep): Likewise. ld/ChangeLog: * emultempl/aix.em: Replace usage of CONST_STRNEQ with startswith. * emultempl/beos.em: Likewise. * emultempl/elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/xtensaelf.em: Likewise. * ldctor.c (ctor_prio): Likewise. * ldelf.c (ldelf_try_needed): Likewise. (ldelf_parse_ld_so_conf): Likewise. (ldelf_after_open): Likewise. (output_rel_find): Likewise. (ldelf_place_orphan): Likewise. * ldfile.c (ldfile_add_library_path): Likewise. * ldlang.c (lang_add_input_file): Likewise. * ldmain.c (get_sysroot): Likewise. (get_emulation): Likewise. (add_archive_element): Likewise. * ldwrite.c (unsplittable_name): Likewise. (clone_section): Likewise. * lexsup.c (parse_args): Likewise. * pe-dll.c (is_import): Likewise. (pe_implied_import_dll): Likewise. opcodes/ChangeLog: * aarch64-dis.c (parse_aarch64_dis_option): Replace usage of CONST_STRNEQ with startswith. * arc-dis.c (parse_option): Likewise. * arm-dis.c (parse_arm_disassembler_options): Likewise. * cris-dis.c (print_with_operands): Likewise. * h8300-dis.c (bfd_h8_disassemble): Likewise. * i386-dis.c (print_insn): Likewise. * ia64-gen.c (fetch_insn_class): Likewise. (parse_resource_users): Likewise. (in_iclass): Likewise. (lookup_specifier): Likewise. (insert_opcode_dependencies): Likewise. * mips-dis.c (parse_mips_ase_option): Likewise. (parse_mips_dis_option): Likewise. * s390-dis.c (disassemble_init_s390): Likewise. * wasm32-dis.c (parse_wasm32_disassembler_options): Likewise.
* Update year range in copyright notice of binutils filesAlan Modra2021-01-011-1/+1
|
* Remove a call to abort which can be triggered by running objdump on a ↵Nick Clifton2020-03-031-1/+1
| | | | | | | corrupt input file. PR 25625 * prdbg.c (pr_tag_type): Remove call to abort.
* Update year range in copyright notice of binutils filesAlan Modra2020-01-011-1/+1
|
* PR25198, use of out of date pointerAlan Modra2019-11-181-2/+1
| | | | | PR 25198 * prdbg.c (tg_start_class_type): Correct scope of idbuf.
* bfd_section_* macrosAlan Modra2019-09-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This large patch removes the unnecessary bfd parameter from various bfd section macros and functions. The bfd is hardly ever used and if needed for the bfd_set_section_* or bfd_rename_section functions can be found via section->owner except for the com, und, abs, and ind std_section special sections. Those sections shouldn't be modified anyway. The patch also removes various bfd_get_section_<field> macros, replacing their use with bfd_section_<field>, and adds bfd_set_section_lma. I've also fixed a minor bug in gas where compressed section renaming was done directly rather than calling bfd_rename_section. This would have broken bfd_get_section_by_name and similar functions, but that hardly mattered at such a late stage in gas processing. bfd/ * bfd-in.h (bfd_get_section_name, bfd_get_section_vma), (bfd_get_section_lma, bfd_get_section_alignment), (bfd_get_section_size, bfd_get_section_flags), (bfd_get_section_userdata): Delete. (bfd_section_name, bfd_section_size, bfd_section_vma), (bfd_section_lma, bfd_section_alignment): Lose bfd parameter. (bfd_section_flags, bfd_section_userdata): New. (bfd_is_com_section): Rename parameter. * section.c (bfd_set_section_userdata, bfd_set_section_vma), (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section), (bfd_set_section_size): Delete bfd parameter, rename section parameter. (bfd_set_section_lma): New. * bfd-in2.h: Regenerate. * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param, update callers. * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c, * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c, * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c, * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c, * xcofflink.c: Update throughout for bfd section macro and function changes. binutils/ * addr2line.c, * bucomm.c, * coffgrok.c, * dlltool.c, * nm.c, * objcopy.c, * objdump.c, * od-elf32_avr.c, * od-macho.c, * od-xcoff.c, * prdbg.c, * rdcoff.c, * rddbg.c, * rescoff.c, * resres.c, * size.c, * srconv.c, * strings.c, * windmc.c: Update throughout for bfd section macro and function changes. gas/ * as.c, * as.h, * dw2gencfi.c, * dwarf2dbg.c, * ecoff.c, * read.c, * stabs.c, * subsegs.c, * subsegs.h, * write.c, * config/obj-coff-seh.c, * config/obj-coff.c, * config/obj-ecoff.c, * config/obj-elf.c, * config/obj-macho.c, * config/obj-som.c, * config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c, * config/tc-arm.c, * config/tc-avr.c, * config/tc-bfin.c, * config/tc-bpf.c, * config/tc-d10v.c, * config/tc-d30v.c, * config/tc-epiphany.c, * config/tc-fr30.c, * config/tc-frv.c, * config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386.c, * config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-lm32.c, * config/tc-m32c.c, * config/tc-m32r.c, * config/tc-m68hc11.c, * config/tc-mep.c, * config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c, * config/tc-msp430.c, * config/tc-mt.c, * config/tc-nds32.c, * config/tc-or1k.c, * config/tc-ppc.c, * config/tc-pru.c, * config/tc-rl78.c, * config/tc-rx.c, * config/tc-s12z.c, * config/tc-s390.c, * config/tc-score.c, * config/tc-score7.c, * config/tc-sh.c, * config/tc-sparc.c, * config/tc-spu.c, * config/tc-tic4x.c, * config/tc-tic54x.c, * config/tc-tic6x.c, * config/tc-tilegx.c, * config/tc-tilepro.c, * config/tc-v850.c, * config/tc-visium.c, * config/tc-wasm32.c, * config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c, * config/tc-xtensa.c, * config/tc-z8k.c: Update throughout for bfd section macro and function changes. * write.c (compress_debug): Use bfd_rename_section. gdb/ * aarch64-linux-tdep.c, * arm-tdep.c, * auto-load.c, * coff-pe-read.c, * coffread.c, * corelow.c, * dbxread.c, * dicos-tdep.c, * dwarf2-frame.c, * dwarf2read.c, * elfread.c, * exec.c, * fbsd-tdep.c, * gcore.c, * gdb_bfd.c, * gdb_bfd.h, * hppa-tdep.c, * i386-cygwin-tdep.c, * i386-fbsd-tdep.c, * i386-linux-tdep.c, * jit.c, * linux-tdep.c, * machoread.c, * maint.c, * mdebugread.c, * minidebug.c, * mips-linux-tdep.c, * mips-sde-tdep.c, * mips-tdep.c, * mipsread.c, * nto-tdep.c, * objfiles.c, * objfiles.h, * osabi.c, * ppc-linux-tdep.c, * ppc64-tdep.c, * record-btrace.c, * record-full.c, * remote.c, * rs6000-aix-tdep.c, * rs6000-tdep.c, * s390-linux-tdep.c, * s390-tdep.c, * solib-aix.c, * solib-dsbt.c, * solib-frv.c, * solib-spu.c, * solib-svr4.c, * solib-target.c, * spu-linux-nat.c, * spu-tdep.c, * symfile-mem.c, * symfile.c, * symmisc.c, * symtab.c, * target.c, * windows-nat.c, * xcoffread.c, * cli/cli-dump.c, * compile/compile-object-load.c, * mi/mi-interp.c: Update throughout for bfd section macro and function changes. * gcore (gcore_create_callback): Use bfd_set_section_lma. * spu-tdep.c (spu_overlay_new_objfile): Likewise. gprof/ * corefile.c, * symtab.c: Update throughout for bfd section macro and function changes. ld/ * ldcref.c, * ldctor.c, * ldelf.c, * ldlang.c, * pe-dll.c, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/cr16elf.em, * emultempl/cskyelf.em, * emultempl/m68hc1xelf.em, * emultempl/m68kelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc64elf.em, * emultempl/xtensaelf.em: Update throughout for bfd section macro and function changes. libctf/ * ctf-open-bfd.c: Update throughout for bfd section macro changes. opcodes/ * arc-ext.c: Update throughout for bfd section macro changes. sim/ * common/sim-load.c, * common/sim-utils.c, * cris/sim-if.c, * erc32/func.c, * lm32/sim-if.c, * m32c/load.c, * m32c/trace.c, * m68hc11/interp.c, * ppc/hw_htab.c, * ppc/hw_init.c, * rl78/load.c, * rl78/trace.c, * rx/gdb-if.c, * rx/load.c, * rx/trace.c: Update throughout for bfd section macro changes.
* Update year range in copyright notice of binutils filesAlan Modra2019-01-011-1/+1
|
* Synchronize libiberty with gcc and add --no-recruse-limit option to tools ↵Nick Clifton2018-12-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that support name demangling. This patch addresses the multitude of bug reports about resource exhaustion in libiberty's name demangling code. It adds a limit to the amount of recursion that is allowed, before an error is triggered. It also adds a new demangling option to disable this limit. (The limit is enabled by default). PR 87681 PR 87675 PR 87636 PR 87335 libiberty * cp-demangle.h (struct d_info): Add recursion_limit field. * cp-demangle.c (d_function_type): If the recursion limit is enabled and reached, return with a failure result. (d_demangle_callback): If the recursion limit is enabled, check for a mangled string that is so long that there is not enough stack space for the local arrays. * cplus-dem.c (struct work): Add recursion_level field. (demangle_nested_args): If the recursion limit is enabled and reached, return with a failure result. include * demangle.h (DMGL_RECURSE_LIMIT): Define. (DEMANGLE_RECURSION_LIMIT): Prototype. binutuils * addr2line.c (demangle_flags): New static variable. (long_options): Add --recurse-limit and --no-recurse-limit. (translate_address): Pass demangle_flags to bfd_demangle. (main): Handle --recurse-limit and --no-recurse-limit options. * cxxfilt.c (flags): Add DMGL_RECURSE_LIMIT. (long_options): Add --recurse-limit and --no-recurse-limit. (main): Handle new options. * dlltool.c (gen_def_file): Include DMGL_RECURSE_LIMIT in flags passed to cplus_demangle. * nm.c (demangle_flags): New static variable. (long_options): Add --recurse-limit and --no-recurse-limit. (main): Handle new options. * objdump.c (demangle_flags): New static variable. (usage): Add --recurse-limit and --no-recurse-limit. (long_options): Likewise. (objdump_print_symname): Pass demangle_flags to bfd_demangle. (disassemble_section): Likewise. (dump_dymbols): Likewise. (main): Handle new options. * prdbg.c (demangle_flags): New static variable. (tg_variable): Pass demangle_flags to demangler. (tg_start_function): Likewise. * stabs.c (demangle_flags): New static variable. (stab_demangle_template): Pass demangle_flags to demangler. (stab_demangle_v3_argtypes): Likewise. (stab_demangle_v3_arg): Likewise. * doc/binutuls.texi: Document new command line options. * NEWS: Mention the new feature. * testsuite/config/default.exp (CXXFILT): Define if not already defined. (CXXFILTFLAGS): Likewise. * testsuite/binutils-all/cxxfilt.exp: New file. Runs a few simple tests of the cxxfilt program.
* Update year range in copyright notice of binutils filesAlan Modra2018-01-031-1/+1
|
* Fix address violation bugs when writing beyond the end of a local string buffer.Nick Clifton2017-08-081-3/+3
| | | | | | | PR 21909 * prdbg.c (pr_int_type): Increase size of local string buffer. (pr_float_type): Likewise. (pr_bool_type): Likewise.
* Update year range in copyright notice of all files.Alan Modra2017-01-021-1/+1
|
* Fix potential buffer overflows with sprintf and very large integer values.Nick Clifton2016-07-011-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | binutuils* prdbg.c (pr_enum_type): Use a buffer big enough to hold an extremely large decimal value. (pr_range_type): Likewise. (pr_array_type): Likewise. (pr_struct_field): Likewise. (pr_class_baseclass): Likewise. (pr_class_method_variant): Likewise. (pr_tag_type): Likewise. (pr_int_constant): Likewise. (pr_typed_constant): Likewise. (pr_variable): Likewise. (pr_function_parameter): Likewise. (pr_start_block): Likewise. (pr_lineno): Likewise. (pr_end_block): Likewise. (tg_enum_type): Likewise. (tg_int_constant): Likewise. (tg_typed_constant): Likewise. (tg_start_block): Likewise. gas * macro.c (macro_expand_body): Use a buffer big enough to hold an extremely large integer.
* Copyright update for binutilsAlan Modra2016-01-011-1/+1
|
* Assorted compiler warning fixesAlan Modra2015-01-121-2/+3
| | | | | | | | | | | | The C standard doesn't guarantee a function pointer can be cast to void* and vice versa. binutils/ * prdbg.c (print_debugging_info): Don't use void* for function pointer param. * budbg.h (print_debugging_info): Update prototype. gas/ * read.c (s_altmacro, s_reloc): Make definition static.
* ChangeLog rotatation and copyright year updateAlan Modra2015-01-021-1/+1
|
* Update copyright yearsAlan Modra2014-03-051-2/+1
|
* * prdbg.c (pr_function_type): Close memory leaks.Nick Clifton2011-03-251-16/+66
| | | | | | | (pr_method_type): Likewise. (tg_class_static_member): Likewise. (tg_class_method_variant): Likewise. (tg_class_static_method_variant): Likewise.
* Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton2009-12-111-5/+5
| | | | Fix up all warnings generated by the addition of this switch.
* PR binutils/10793Alan Modra2009-10-181-2/+1
| | | | * prdbg.c (tg_end_struct_type): Warning fix.
* Updated soruces in binutils/* to compile cleanly with -Wc++-compat.Nick Clifton2009-09-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * binutils/addr2line.c (slurp_symtab): Fix casts. Introduce variable minisyms to avoid aliasing varning. * binutils/ar.c: Add casts. (normalize): Use name del instead of delete. (display_target_list,display_info_table): Change loop counter variable a to int. * binutils/bucomm.c: Add casts. * binutils/debug.c: Update function to use new names. (struct debug_baseclass): Rename member from virtual to is_virtual. (struct debug_type_s,struct debug_field_s,struct debug_baseclass_s,struct debug_method_s,struct debug_method_variant_s,struct debug_type_s): Rename struct from avoid name collision. * /binutils/debug.h: Use new struct names. * binutils/dwarf.c: Add casts. (free_debug_memory): Change loop counter variable a to int. * binutils/ieee.c: Add casts. (enum ieee_var_kind): Move to top level. (ieee_class_baseclass): Rename parameter virtual to is_virtual. (ieee_class_method_var): Rename variable virtual to is_virtual. * binutils/nm.c: Add casts. * binutils/objcopy.c: Add casts. (copy_archive): Rename variable delete to del. * binutils/objdump.c: Add casts. (dump_dwarf_section): Change loop counter variable i to int. * binutils/prdbg.c: Add casts. (pr_class_baseclass,tg_class_baseclass): Rename parameters virtual to is_virtual. * binutils/readelf.c: Add casts. (struct ia64_unw_table_entry,struct hppa_unw_table_entry): Move to top level. * binutils/size.c: Add casts. * binutils/stabs.c (parse_stab_type, parse_stab_range_type) (parse_stab_cpp_abbrev): Rename parameter from typename to type_name. (parse_stab_baseclasses): Rename variable virtual to is_virtual. * binutils/strings.c: Add casts. * binutils/wrstabs.c (stab_class_baseclass): Rename parameter virtual to is_virtual.
* update copyright datesAlan Modra2009-09-021-1/+1
|
* Add mingw I64 support for printing long and long long valuesNick Clifton2008-01-251-2/+9
|
* * prdbg.c (print_vma): Print as long long, if host supports it.Greg McGary2008-01-071-1/+12
|
* Change sources over to using GPLv3Nick Clifton2007-07-051-1/+1
|
* * prdbg.c (tg_variable): Adjust for changed demangler.Alan Modra2007-04-281-37/+17
| | | | (tg_start_function): Likewise.
* bfd/Alan Modra2007-04-261-3/+1
| | | | | | | | | | | | | | | | | | | | 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.
* * budemang.c: Delete.Alan Modra2007-04-191-4/+5
| | | | | | | | | | | | | | * budemang.h: Delete. * addr2line.c (translate_addresses): Call bfd_demangle rather than demangle. * nm.c (print_symname): Likewise. * objdump.c (objdump_print_symname, dump_symbols): Likewise. (dump_bfd): Likewise. * prdbg.c (struct pr_handle <demangler>): Add int param. (tg_variable, tg_start_function): Adjust demangler calls. * Makefile.am: Remove mention of budemang.[ch]. Run "make dep-am". * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate.
* * bfd-in.h (CONST_STRNCPY) : Delete.Nick Clifton2006-09-281-6/+4
| | | | | | | | | | (LITSTRCPY) : New. (LITMEMCPY) : New. * bfd-in2.h : Regenerate. * elflink.c (bfd_elf_gc_sections) : Use LITMEMCPY. Don't manually calculate string lengths. * nlmcode.h (nlm_swap_auxiliary_headers_in) : Use LITMEMCPY. * nlmconv.c (main) : Use LITMEMCPY. * prdbg.c (tg_class_static_member) : Use LITSTRCPY.
* * bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as itsNick Clifton2006-09-161-7/+6
| | | | | | | | | | | argument and emits the string followed by a comma and then the length of the string. (CONST_STRNEQ): New macro. Checks to see if a variable string has a constant string as its initial characters. (CONST_STRNCPY): New macro. Copies a constant string to the start of a variable string. * bfd-in2.h: Regenerate. * <remainign files>: Make use of the new macros.
* Update FSF addressNick Clifton2005-05-081-2/+2
|
* update copyright datesAlan Modra2005-03-031-1/+2
|
* * objcopy.c (copy_section): Use bfd_get_section_size instead ofAlan Modra2004-06-151-2/+2
| | | | | | | | | | | | | | | | _raw_size or bfd_get_section_size_before_reloc. Don't set reloc_done. (compare_section_lma): Likewise. * addr2line.c (find_address_in_section): Likewise. * coffgrok.c (do_sections_p1): Likewise. * dlltool.c (scan_drectve_symbols): Likewise. * nlmconv.c (main): Likewise. (copy_sections): Likewise. (powerpc_mangle_relocs): Likewise. * objdump.c (disassemble_section): Likewise. * prdbg.c (find_address_in_section): Likewise. * size.c (berkeley_sum): Likewise. * srconv.c (wr_ob): Likewise. * strings.c (strings_a_section): Likewise.
* * ChangeLog-9197: Fix comment typos.Kazu Hirata2003-12-061-1/+1
| | | | | | | | | | * coffgrok.c: Likewise. * filemode.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * prdbg.c: Likewise. * stabs.c: Likewise. * unwind-ia64.c: Likewise.
* * ChangeLog: Fix typos.Kazu Hirata2003-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | * ChangeLog-9197: Likewise. * ChangeLog-9899: Likewise. * NEWS: Likewise. * ar.c: Fix comment typos. * arsup.c: Likewise. * coffgrok.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * dlltool.c: Likewise. * ieee.c: Likewise. * nm.c: Likewise. * objdump.c: Likewise. * prdbg.c: Likewise. * readelf.c: Likewise. * resrc.c: Likewise. * sysinfo.y: Likewise. * windres.c: Likewise.
* * addr2line.c: Convert to ISO C90 prototypes, change PTR, removeAndreas Jaeger2003-09-141-319/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unneeded (void *) casts. * ar.c: Likewise. * arlex.l: Likewise. * arparse.y: Likewise. * arsup.c: Likewise. * binemul.c: Likewise. * binemul.h: Likewise. * bucomm.c: Likewise. * bucomm.h: Likewise. * budbg.h: Likewise. * budemang.c: Likewise. * budemang.h: Likewise. * coffdump.c: Likewise. * coffgrok.c: Likewise. * cxxfilt.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * deflex.l: Likewise. * dlltool.c: Likewise. * dlltool.h: Likewise. * dllwrap.c: Likewise. * emul_aix.c: Likewise. * filemode.c: Likewise. * ieee.c: Likewise. * nlmconv.c: Likewise. * nlmconv.h: Likewise. * nlmheader.y: Likewise. * nm.c: Likewise. * prdbg.c: Likewise. * rclex.l: Likewise. * rcparse.y: Likewise. * rdcoff.c: Likewise. * rddbg.c: Likewise. * rename.c: Likewise. * resbin.c: Likewise. * rescoff.c: Likewise. * resrc.c: Likewise. * size.c: Likewise. * srconv.c: Likewise. * stabs.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * sysinfo.y: Likewise. * syslex.l: Likewise. * unwind-ia64.c: Likewise. * unwind-ia64.h: Likewise. * version.c: Likewise. * windres.c: Likewise. * windres.h: Likewise. * winduni.c: Likewise. * wrstabs.c: Likewise.
* * objdump.c: New command line option --debugging-tags.Nick Clifton2003-07-221-4/+1058
| | | | | | | * doc/binutils.texi: Document new command line option. * prdbg.c: Code to print the debug info as tags compatible with ctags. * budbg.h: Adjust prototype. * NEWS: Mention new switch
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-283/+323
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * prdbg.c (pr_fix_visibility): Remove assert.Alan Modra2002-08-051-2/+0
|
* * arsup.c: Remove ARGSUSED.Kazu Hirata2002-05-261-4/+0
| | | | | | | | | * debug.c: Likewise. * ieee.c: Likewise. * nlmconv.c: Likewise. * prdbg.c: Likewise. * stabs.c: Likewise. * wrstabs.c: Likewise.
* Fix typos in ChangeLogs and update copyright noticesNick Clifton2001-03-131-1/+1
|
* * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1999-07-111-4/+4
| | | | | | | | as appropriate. Add variable initializations. Add casts. * objdump.c (disassemble_bytes): Change j to bfd_vma. * readelf.c (process_syminfo): Change i to unsigned int. (display_debug_info): Change abbrev_number to unsigned long. (process_mips_specific): Change fcnt to size_t.
* 19990502 sourceware importbinu_ss_19990502Richard Henderson1999-05-031-0/+1862