aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-04mmo tdata leakAlan Modra2-1/+5
malloc'd tdata isn't freed. * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
2020-01-04ubsan: m32r: left shift of negative valueAlan Modra4-6/+15
cpu/ * m32r.cpu (f-disp8): Avoid left shift of negative values. (f-disp16, f-disp24): Likewise. opcodes/ * m32r-ibld.c: Regenerate.
2020-01-04ubsan: cr16: left shift cannot be represented in type 'int'Alan Modra2-2/+5
* cr16-dis.c (cr16_match_opcode): Avoid shift left of signed value.
2020-01-04ubsan: crx: left shift cannot be represented in type 'int'Alan Modra2-1/+5
* crx-dis.c (match_opcode): Avoid shift left of signed value.
2020-01-04ubsan: d30v: left shift cannot be represented in type 'int'Alan Modra2-12/+10
* d30v-dis.c (print_insn): Avoid signed overflow in left shift.
2020-01-04coff: free malloc'd memory on successful target match tooAlan Modra2-0/+8
object_p functions cannot allocate memory by malloc and not free it before returning. Even a successful target match may not be the best match. If a match isn't used then those malloc'd blocks won't be freed. * coffgen.c (coff_real_object_p): Free malloc'd memory on target match too.
2020-01-04Automatic date update in version.inGDB Administrator1-1/+1
2020-01-03Ensure GDB warnings are styled.Philippe Waroquiers6-9/+35
While handling the comments of Tom related to [RFC] Have an option to tell GDB to detect and possibly handle mismatched exec-files. https://sourceware.org/ml/gdb-patches/2019-12/msg00621.html I saw that GDB warnings are produced ignoring the given styles. This patch: * ensures that style markups are properly handled by "warning". * changes 'set/show data-directory' so that file style is used in warnings and in 'show message' * changes all other messages in top.c to use file style when appropriate. * Uses the above data-directory changes in gdb.base/style.exp 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be> * ui-file.c (stdio_file::can_emit_style_escape) (tee_file::can_emit_style_escape): Ensure style is used also on gdb_stderr when gdb_stderr is a tty supporting styling, similarly to gdb_stdout. * main.c (set_gdb_data_directory): Use file style to output the warning that the given pathname is not a directory. * top.c (show_history_filename, gdb_safe_append_history) (show_gdb_datadir): Use file style. 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be> * gdb.base/style.exp: Test that warnings are styled.
2020-01-03solib_target_free_so memory leakHannes Domani2-5/+11
gdb/ChangeLog: 2020-01-03 Hannes Domani <ssbssa@yahoo.de> * solib-target.c (struct lm_info_target): Change offsets to be a unique_xmalloc_ptr. (solib_target_relocate_section_addresses): Update.
2020-01-03windows_clear_solib memory leakHannes Domani2-1/+12
gdb/ChangeLog: 2020-01-03 Hannes Domani <ssbssa@yahoo.de> * windows-nat.c (windows_clear_solib): Free so_list linked list.
2020-01-03Allow individual targets to decide if string escapes should be allowed. ↵Sergey Belyashov7-9/+22
Disable for PPC and Z80. PR 25311 * as.h (TC_STRING_ESCAPES): Provide a default definition. * app.c (do_scrub_chars): Use TC_STRING_ESCAPES instead of NO_STRING_ESCAPES. * read.c (next_char_of_string): Likewise. * config/tc-ppc.h (TC_STRING_ESCAPES): Define. * config/tc-z80.h (TC_STRING_ESCAPES): Define.
2020-01-03Fix potential illegal memory access when parsing a corrupt PEF format file.Nick Clifton2-1/+8
PR 25307 (bfd_pef_parse_function_stubs): Correct the test that ensures that there is enough data remaining in the code buffer before attempting to read a function stub.
2020-01-03Fix potential illegal memory access failures in the BFD library by ensuring ↵Nick Clifton5-5/+42
that the return value from bfd_malloc() is checked before it is used. PR 25308 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the return value from bfd_malloc. * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. (elf32_arm_filter_cmse_symbols): Likewise. (elf32_arm_write_section): Likewise. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. (bfd_mach_o_follow_dsym): Likewise. * pef.c (bfd_pef_print_loader_section): Likewise. (bfd_pef_scan_start_address): Likewise. (bfd_pef_parse_function_stubs): Likewise. (bfd_pef_parse_symbols): Likewise.
2020-01-03Updated Swedish translation for the GAS subdirectory.Nick Clifton2-408/+185
2020-01-03For PE format files, the base relocation table is necessary if the image is ↵Hannes Domani8-24/+52
loaded at a different image base than specified in the PE header. This patch provides a new option --enable-reloc-section to force the generation of this section. * emultempl/pe.em: Add new option --enable-reloc-section. * emultempl/pep.em: Likewise. * ld.texi: Document --enable-reloc-section. * pe-dll.c (pe_dll_build_sections): Use pe_dll_enable_reloc_section. (pe_dll_fill_sections): Simplify by calling pe_exe_fill_sections. * pe-dll.h: Add extern declaration of option flag. * pep-dll.c (pe_dll_enable_reloc_section): Add alias define for pep_dll_enable_reloc_section. * pep-dll.h: Add extern declaration of option flag.
2020-01-03Fix ld/PR25316 for the ia64 target by refusing to support binary merging.Sergei Trofimovich2-4/+13
ld/PR25316 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail on binary inputs ld/PR25316. (is_ia64_elf): new helper to filter on ia64 objects.
2020-01-03Arm64: correct address index operands for LD1RO{H,W,D}Jan Beulich5-31/+41
Just like their LD1RQ{H,W,D} counterparts, as per the specification the index registers get scaled by element size.
2020-01-03Arm64: correct {su,us}dot SIMD encodingsJan Beulich5-15/+42
According to the specification these permit the Q bit to control the vector length operated on, and hence this bit should not already be set in the opcode table entries (it rather needs setting dynamically). Note how the test case output did also not match its input. Besides correcting the test case also extend it to cover both forms.
2020-01-03Arm64: correct uzp{1,2} mnemonicsJan Beulich6-12/+23
According to the specification, and in line with the pre-existing predicate forms, the mnemonics do not include an 'i'.
2020-01-03Arm64: correct 64-bit element fmmla encodingJan Beulich6-49/+60
There's just one bit of difference to the 32-bit element form, as per the documentation.
2020-01-03Mach-O: misc build adjustmentsJan Beulich3-20/+26
Oldish gcc warns about local variables shadowing outer scope ones. Additionally %lx is not (always) suitable to print the result of bfd_get_32().
2020-01-03Add myself to gdb/MAINTAINERSBernd Edlinger2-0/+5
2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de> * MAINTAINERS (Write After Approval): Add myself.
2020-01-02Remove stale references to Cell BELuis Machado3-9/+11
While reading some code i noticed we're still referencing Cell BE in a couple parts. This patch removes those. v2: Update comment in gdb/target.h. gdb/ChangeLog: 2020-01-02 Luis Machado <luis.machado@linaro.org> * proc-service.c (get_ps_regcache): Remove reference to obsolete Cell BE architecture. * target.h (struct target_ops) <thread_architecture>: Likewise. Change-Id: I7a9ccc603b00db22a6275bc5ab69e1417148cb72
2020-01-03Automatic date update in version.inGDB Administrator1-1/+1
2020-01-02Add support for the GBZ80, Z180, and eZ80 variants of the Z80 architecure. ↵Sergey Belyashov132-11328/+24328
Add an ELF based target for these as well. PR 25224 bfd * Makefile.am: Add z80-elf target support. * configure.ac: Likewise. * targets.c: Likewise. * config.bfd: Add z80-elf target support and new arches: ez80 and z180. * elf32-z80.c: New file. * archures.c: Add new z80 architectures: eZ80 and Z180. * coffcode.h: Likewise. * cpu-z80.c: Likewise. * bfd-in2.h: Likewise plus additional Z80 relocations. * coff-z80.c: Add new relocations for Z80 target and local label check. gas * config/tc-z80.c: Add new architectures: Z180 and eZ80. Add support for assembler code generated by SDCC. Add new relocation types. Add z80-elf target support. * config/tc-z80.h: Add z80-elf target support. Enable dollar local labels. Local labels starts from ".L". * testsuite/gas/all/fwdexp.d: Fix failure due to symbol conflict. * testsuite/gas/all/fwdexp.s: Likewise. * testsuite/gas/z80/suffix.d: Fix failure on ELF target. * testsuite/gas/z80/z80.exp: Add new tests * testsuite/gas/z80/dollar.d: New file. * testsuite/gas/z80/dollar.s: New file. * testsuite/gas/z80/ez80_adl_all.d: New file. * testsuite/gas/z80/ez80_adl_all.s: New file. * testsuite/gas/z80/ez80_adl_suf.d: New file. * testsuite/gas/z80/ez80_isuf.s: New file. * testsuite/gas/z80/ez80_z80_all.d: New file. * testsuite/gas/z80/ez80_z80_all.s: New file. * testsuite/gas/z80/ez80_z80_suf.d: New file. * testsuite/gas/z80/r800_extra.d: New file. * testsuite/gas/z80/r800_extra.s: New file. * testsuite/gas/z80/r800_ii8.d: New file. * testsuite/gas/z80/r800_z80_doc.d: New file. * testsuite/gas/z80/z180.d: New file. * testsuite/gas/z80/z180.s: New file. * testsuite/gas/z80/z180_z80_doc.d: New file. * testsuite/gas/z80/z80_doc.d: New file. * testsuite/gas/z80/z80_doc.s: New file. * testsuite/gas/z80/z80_ii8.d: New file. * testsuite/gas/z80/z80_ii8.s: New file. * testsuite/gas/z80/z80_in_f_c.d: New file. * testsuite/gas/z80/z80_in_f_c.s: New file. * testsuite/gas/z80/z80_op_ii_ld.d: New file. * testsuite/gas/z80/z80_op_ii_ld.s: New file. * testsuite/gas/z80/z80_out_c_0.d: New file. * testsuite/gas/z80/z80_out_c_0.s: New file. * testsuite/gas/z80/z80_reloc.d: New file. * testsuite/gas/z80/z80_reloc.s: New file. * testsuite/gas/z80/z80_sli.d: New file. * testsuite/gas/z80/z80_sli.s: New file. ld * Makefile.am: Add new target z80-elf * configure.tgt: Likewise. * emultempl/z80.em: Add support for eZ80 and Z180 architectures. * emulparams/elf32z80.sh: New file. * emultempl/z80elf.em: Likewise. * testsuite/ld-z80/arch_ez80_adl.d: Likewise. * testsuite/ld-z80/arch_ez80_z80.d: Likewise. * testsuite/ld-z80/arch_r800.d: Likewise. * testsuite/ld-z80/arch_z180.d: Likewise. * testsuite/ld-z80/arch_z80.d: Likewise. * testsuite/ld-z80/comb_arch_ez80_z80.d: Likewise. * testsuite/ld-z80/comb_arch_z180.d: Likewise. * testsuite/ld-z80/labels.s: Likewise. * testsuite/ld-z80/relocs.s: Likewise. * testsuite/ld-z80/relocs_b_ez80.d: Likewise. * testsuite/ld-z80/relocs_b_z80.d: Likewise. * testsuite/ld-z80/relocs_f_z80.d: Likewise. * testsuite/ld-z80/z80.exp: Likewise. opcodes * z80-dis.c: Add support for eZ80 and Z80 instructions.
2020-01-02AArch64: Set the correct ELF class for AArch64 stubs (PR/25210)Tamar Christina6-1/+75
This fixes PR 25210 by specifying the the correct ELF class for AArch64 stubs. After doing this the stub section starts behaving like a normal object file loaded from disk. That is SEC_LINKER_CREATED causes us to have to write the section manually. This flag was added as a fix for PR 24753. I believe that fix to still be correct as linker created sections don't have a size on disk and it fixes the Arm bootstrap regression. But in this case specifying the correct section class also makes the stub section not be considered by compress.c. So I'm partially revert this change so that we don't have to manage the section manually as implied by SEC_LINKER_CREATED. bfd/ChangeLog: PR 25210 PR 24753 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. ld/ChangeLog: PR 25210 PR 24753 * emultempl/aarch64elf.em (elf${ELFSIZE}_aarch64_add_stub_section): Remove SEC_LINKER_CREATED. * testsuite/ld-aarch64/aarch64-elf.exp: Add erratum835769-843419. * testsuite/ld-aarch64/erratum835769-843419.d: New test.
2020-01-02[ARM][gas] fix build breakage with gcc-10 by using correct enum typeSzabolcs Nagy2-1/+6
Fixes ../../gas/config/tc-arm.c: In function 'parse_reg_list': ../../gas/config/tc-arm.c:1946:35: error: implicit conversion from 'enum reg_list_els' to 'enum arm_reg_type' [-Werror=enum-conversion] 1946 | reg = arm_reg_parse (&str, REGLIST_RN); | ^~~~~~~~~~ gas/ChangeLog: * config/tc-arm.c (parse_reg_list): Use REG_TYPE_RN instead of REGLIST_RN.
2020-01-02Enable building the s12z target on Solaris hosts where REG_Y is defined in ↵Nick Clifton2-10/+18
system header files. * opcode/s12z.h: Undef REG_Y.
2020-01-02Automatic date update in version.inGDB Administrator1-1/+1
2020-01-01Fix install-strip for cross-compilationHannes Domani4-4/+12
The variable INSTALL_PROGRAM_ENV sets up STRIPPROG for the cross-compiler. If this is not done, the host 'strip' is used, and fails: /bin/sh /c/src/repos/binutils-gdb.git/install-sh -c -s gdb.exe \ /gdb/gdb64-git/bin/$transformed_name.exe strip.exe:C:/gdb/gdb64-git/bin/_inst.33599_: file format not recognized With this change, it's fine: STRIPPROG='x86_64-w64-mingw32-strip' \ /bin/sh /c/src/repos/binutils-gdb.git/install-sh -c -s gdb.exe \ /gdb/gdb64-git/bin/$transformed_name.exe gdb/ChangeLog: 2020-01-01 Hannes Domani <ssbssa@yahoo.de> * Makefile.in: Use INSTALL_PROGRAM_ENV. gdb/gdbserver/ChangeLog: 2020-01-01 Hannes Domani <ssbssa@yahoo.de> * Makefile.in: Use INSTALL_PROGRAM_ENV.
2020-01-01Add myself to gdb/MAINTAINERSHannes Domani2-0/+5
gdb/ChangeLog: 2020-01-01 Hannes Domani <ssbssa@yahoo.de> * MAINTAINERS (Write After Approval): Add myself.
2020-01-01Re: Update year range in copyright notice of binutils filesAlan Modra10-0/+40
Add the ChangeLog entry.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra2586-2668/+2668
2020-01-01ChangeLog rotationAlan Modra18-16070/+16196
2020-01-01Update copyright year in gdbarch.sh doc/gdb.texinfo and doc/refcard.texJoel Brobecker5-5/+13
These are files that need to be updated by hand, because the copyright.py script isn't able to handle them automatically. gdb/ChangeLog: * gdbarch.sh: Update copyright year range of generated files. gdb/doc/ChangeLog: * gdb.texinfo, refcard.tex: Update copyright year range.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker5957-5956/+5960
gdb/ChangeLog: Update copyright year range in all GDB files.
2020-01-01gdb/copyright.py: Convert to Python 3Joel Brobecker2-16/+24
gdb/ChangeLog: * copyright.py: Convert to Python 3.
2020-01-01gdb/copyright.py: Adapt after move of gnulib from gdb to toplevelJoel Brobecker2-7/+13
gdb/ChangeLog: * copyright.py: Adapt after move of gnulib directory from gdb directory to toplevel directory.
2020-01-01gdb/copyright.py: Exit if run from the wrong directoryJoel Brobecker2-0/+7
We printed an error, but kept going anyway... ;-) gdb/ChangeLog: * copyright.py (main): Exit if run from the wrong directory.
2020-01-01update copyright year in version output of gdb, gdbserver and gdbreplayJoel Brobecker5-3/+12
gdb/ChangeLog: * top.c (print_gdb_version): Change copyright year to 2020. gdb/gdbserver/ChangeLog: * server.c (gdbserver_version): Change copyright year to 2020. * gdbreplay.c (gdbreplay_version): Likewise.
2020-01-01Rotate gdb/ChangeLog (start of New Year procedure)Joel Brobecker3-17386/+17400
gdb/ChangeLog: * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019
2020-01-01Automatic date update in version.inGDB Administrator1-1/+1
2019-12-31asan: alpha-vms: Heap-buffer-overflowAlan Modra2-51/+53
This fixes yet more errors in the alpha-vms buffer size checks. * vms-alpha.c (_bfd_vms_slurp_eisd): Don't overflow when checking offset. Don't overflow when checking rec_size, and do allow rec_size to the end of the buffer. Ensure eisd->type can be accessed, not just the first 32 bytes. Don't call _bfd_vms_save_counted_string with zero length remaining. Fail on empty string section name. (_bfd_vms_slurp_egsd): Formatting. Catch more reads past end of record size. Correct remaining length calculation. Fail on empty string section name. Consolidate error paths.
2019-12-31Automatic date update in version.inGDB Administrator1-1/+1
2019-12-30Make some TUI globals "static"Tom Tromey2-10/+20
This changes a few TUI globals to be "static". Tested by rebuilding. gdb/ChangeLog 2019-12-30 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_border_mode_translate) (tui_border_kind_translate_vline, tui_border_kind_translate_hline) (tui_border_kind_translate_ulcorner) (tui_border_kind_translate_urcorner) (tui_border_kind_translate_llcorner) (tui_border_kind_translate_lrcorner, tui_active_border_mode) (tui_border_mode, tui_border_kind): Now static. Change-Id: Ibb49a0df195dfe780a5ba1f90e9125ab5f6b7ce1
2019-12-30Use "bool" in more spots in TUITom Tromey7-23/+33
This changes a few spots in the TUI to use "bool" rather than "int". Tested on x86-64 Fedora 28. gdb/ChangeLog 2019-12-30 Tom Tromey <tom@tromey.com> * tui/tui-interp.c (tui_start_enabled): Now bool. (_initialize_tui_interp): Update. * tui/tui-hooks.c (tui_refreshing_registers): Now bool. (tui_register_changed) (tui_refresh_frame_and_register_information): Update. * tui/tui-win.c (tui_update_variables): Return bool. * tui/tui-win.h (tui_update_variables): Return bool. * tui/tui.c (tui_get_command_dimension): Return bool. * tui/tui.h (tui_get_command_dimension): Return bool. Change-Id: I55b7f2d62d2ef88da3587dc914ada9f463ad8d2b
2019-12-30vms-alpha.c object_p memory leaksAlan Modra2-12/+28
* vms-alpha.c (alpha_vms_free_private): New function, extracted.. (vms_close_and_cleanup): ..from here. (alpha_vms_object_p): Call alpha_vms_free_private on failure.
2019-12-30coff object_p memory leaksAlan Modra2-0/+7
* coffgen.c (coff_real_object_p): Free malloc'd memory on failure.
2019-12-30archive.c bfd_zallocAlan Modra2-25/+32
Quite a few bfd_zalloc calls are wasting time clearing memory, and should be bfd_alloc instead. * archive.c (do_slurp_bsd_armap): Use bfd_alloc rather than bfd_zalloc when memory is all written after the call. (do_slurp_coff_armap): Likewise. Set bfd_error on ridiculously large allocations that overflow bfd_size_type. Use just one bfd_release on error exit. (_bfd_slurp_extended_name_table): Use bfd_alloc for extended_names, clear last byte rather than the entire array. Use bfd_alloc for string table. Rearrange and simplify code copying file names.
2019-12-30Automatic date update in version.inGDB Administrator1-1/+1