aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-27S/390: z13 use GNU attribute to indicate vector ABIAndreas Krebbel10-3/+180
bfd/ * elf-s390-common.c (elf_s390_merge_obj_attributes): New function. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call elf_s390_merge_obj_attributes. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function. binutils/ * readelf.c (display_s390_gnu_attribute): New function. (process_s390_specific): New function. (process_arch_specific): Call process_s390_specific. gas/ * doc/as.texinfo: Document Tag_GNU_S390_ABI_Vector. include/elf/ * s390.h: Define Tag_GNU_S390_ABI_Vector.
2015-04-27S/390: Fixes for z13 instructions.Andreas Krebbel6-11/+25
opcodes/ * s390-opc.c: New instruction type VV0UU2. * s390-opc.txt: Fix instruction types for VFCE, VLDE, VFSQ, WFK, and WFC. gas/testsuite/ * gas/s390/zarch-z13.d: Fix tests for VFCE, VLDE, VFSQ, WFK, and WFC. * gas/s390/zarch-z13.s: Likewise.
2015-04-27S/390: Fix gotreloc_31-1 testcase.Andreas Krebbel2-3/+6
Since we changed the default arch for objdump to zarch the following testcase needs to check for the real instruction mnemonics instead of just bytes. This fixes the following testsuite fail on s390x: FAIL: GOT: symbol address load from got to larl
2015-04-27Automatic date update in version.inGDB Administrator1-1/+1
2015-04-26Clear variable "coredump_var_addr" before using it on ↵Sergio Durigan Junior2-0/+6
gdb.base/coredump-filter.exp This commit is a continuation of the fix committed on: commit 8cd8f2f8ac49276437b7da37f275706ea1c1c925 Author: Sergio Durigan Junior <sergiodj@redhat.com> Date: Mon Apr 13 02:40:08 2015 -0400 Rename variable "addr" to "coredump_var_addr" in gdb.base/coredump-filter.exp Pedro pointed out that this fix was not complete, because the testsuite could be run several times in a row (for example), which means that it is not enough to just make the variable name unique: it also needs to be cleared out if it is global. This commit does that. It is actually just a commit made to make things totally correct; this specific test does not fail if you run it several times in a row. gdb/testsuite/ChangeLog: 2015-04-26 Sergio Durigan Junior <sergiodj@redhat.com> * gdb.base/coredump-filter.exp: Clear variable "coredump_var_addr" before using it.
2015-04-26Automatic date update in version.inGDB Administrator1-1/+1
2015-04-25Automatic date update in version.inGDB Administrator1-1/+1
2015-04-25Non-alloc sections don't belong in PT_LOAD segmentsAlan Modra6-8/+32
Taking them out showed a bug in the powerpc64 backend with .branch_lt being removed from output_bfd but not from previously set up segment section maps. Removing the bfd sections meant their sh_flags (and practically everything else) remaining zero, ie. not SHF_ALLOC, triggering complaints about "`.branch_lt' can't be allocated in segment". include/elf/ * internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and similar segments only contain alloc sections. ld/ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out. ld/testsuite/ * ld-powerpc/tocnovar.d: Revert last change.
2015-04-24[AArch64] PR18270, fix handling of GOT entry for local symbolJiong Wang2-9/+66
2015-04-24 Jiong. Wang <jiong.wang@arm.com> bfd/ PR ld/18270 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for GOT_NORMAL for both sgot/srelgot section. (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address and generate necessary runtime relocation for GOT entry.
2015-04-24Copy is_linker_input to archive memberH.J. Lu2-0/+8
We must copy is_linker_input to archive member. PR binutils/18209 * archive.c (_bfd_get_elt_at_filepos): Also copy is_linker_input.
2015-04-24gdb: Add internationalization support to a few strings.Andrew Burgess2-5/+14
Spotted a few strings that were missing internationalization support. gdb/ChangeLog: * cli/cli-dump.c (srec_dump_command): Add internationalization mark ups. (ihex_dump_command): Likewise. (tekhex_dump_command): Likewise. (binary_dump_command): Likewise. (binary_append_command): Likewise.
2015-04-24gdb: Add support for dumping to verilog hex format.Andrew Burgess7-7/+85
Extend the gdb 'dump' command to allow creating output in verilog hex format. Add some tests to cover new functionality. As bfd does not currently support reading in verilog hex formats the tests only cover the 'dump' command, not the 'restore' command. gdb/ChangeLog: * cli/cli-dump.c (verilog_cmdlist): New variable. (dump_verilog_memory): New function. (dump_verilog_value): New function. (verilog_dump_command): New function. (_initialize_cli_dump): Add new commands to support verilog dump format. * NEWS: Add entry for "dump verilog". gdb/doc/ChangeLog: * gdb.texinfo (Dump/Restore Files): Add detail about verilog dump format. gdb/testsuite/ChangeLog: * gdb.base/dump.exp: Add *.verilog files to all_files list. Add new tests for verilog output.
2015-04-24[AArch64] Improve PC-relative relocation check for shared libraryJiong Wang6-7/+68
2015-04-24 Jiong. Wang <jiong.wang@arm.com> bfd/ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject PC-relative relocation for external symbol. ld/testsuite/ * ld-aarch64/pcrel.s: New testcase. * ld-aarch64/pcrel_pic_defiend_local.d: New expect file. * ld-aarch64/pcrel_pic_undefined.d: Ditto. * ld-aarch64/aarch64-elf.exp: Run them.
2015-04-24Fix typoDJ Delorie1-1/+1
2015-04-24Change msp430 emulation to msp430elfDJ Delorie6-9/+19
* Makefile.am (msp430): Rename primary emulation to msp430elf. (emsp430.c): Rename to emsp430elf.c, update dependencies (emsp430X.c): Update dependencies. * Makefile.in: Likewise. * configure.tgt (msp430-*-*): Rename primary emulation to msp430elf. * emulparame/msp430.sh: Rename to msp430elf.sh. * emulparams/msp430X.sh: Update.
2015-04-24gas thunderx supportJim Wilson2-2/+9
gas/ * config/tc-aarch64.c (aarch64_cpus): Add CRC and CRYPTO features for thunderx.
2015-04-24* python.texi (Xmethods In Python): Fix name of method to call the xmethod.Doug Evans2-1/+6
gdb/doc/ChangeLog: * python.texi (Xmethods In Python): Fix name of method to call the xmethod.
2015-04-24Fix compile time warning messages about variables being used before they are ↵Nick Clifton5-7/+26
initialised. PR 18313 bin * ieee.c (ieee_read_cxx_class): Initialise the varargs variable. * readelf.c (uncompress_section_contents): Zero initialise the zstream structure. bfd * compress.c (decompress_contents): Zero initialse the z_stream structure.
2015-04-24[ARM]: Don't tail-pad over-aligned functions to the alignment boundary.Richard Earnshaw28-129/+116
2015-04/24 Richard Earnshaw <rearnsha@arm.com> gas/ * config/tc-arm.h (arm_min): New function. (SUB_SEGMENT_ALIGN): Define. gas/testsuite/ * gas/arm/align64.d: Delete trailing padding NOPs. ld/testsuite/ * ld-arm/armthumb-lib.d: Regenerate expected output. * ld-arm/armthumb-lib.d: Likewise. * ld-arm/armthumb-lib.sym: Likewise. * ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-b-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-b.d: Likewise. * ld-arm/cortex-a8-fix-bcc-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bcc.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-plt.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bl.d: Likewise. * ld-arm/cortex-a8-fix-blx-bcond.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-blx.d: Likewise. * ld-arm/cortex-a8-fix-hdr.d: Likewise. * ld-arm/farcall-mixed-app-v5.d: Likewise. * ld-arm/farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-lib-v4t.d: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise. * ld-arm/mixed-app-v5.d: Likewise. * ld-arm/mixed-app.d: Likewise. * ld-arm/mixed-lib.d: Likewise.
2015-04-24Fix typos in sim sources exposed by static analysis.Nick Clifton6-4/+23
bfin PR 18273 * bfin-sim.c (decode_dsp32alu_0): Remove spurious check for s == 1. erc32 PR 18273 * exec.c (add32): Fix typo in check for overflow. igen PR 18273 * misc.c (a2i): Fix typos checking for uppercase letters.
2015-04-24Fix typo in check for valid register number in RX sim.Nick Clifton2-1/+6
PR sim/18273 * reg.c (put_reg): Fix check for valid register number.
2015-04-24Extend test for local labels to include fake symbols and local labels with a ↵Nick Clifton2-5/+48
numeric suffix. * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler local labels to include local labels with a numeric suffix and fake symbols.
2015-04-24Fix printing for GNAT stuff for types that do not have descr. typesPierre-Marie de Rodat2-1/+12
gdb/ChangeLog: 2015-04-24 Pierre-Marie de Rodat <derodat@adacore.com> * gdbtypes.c (print_gnat_stuff): Do not recurse on the descriptive type when there is none.
2015-04-24Define SEC_MEP_VLIW in bfd/section.cH.J. Lu5-4/+17
Bits in section flags should only be defined in bfd/section.c. This patch moves SEC_MEP_VLIW to bfd/section.c. bfd/ PR binutils/18316 * section.c (SEC_MEP_VLIW): New. * bfd-in2.h: Regenerated. include/elf/ PR binutils/18316 * mep.h (SEC_MEP_VLIW): Removed.
2015-04-24A new board file remote-gdbserver-on-localhost.expYao Qi2-0/+83
This patch is to add a new board file that does real remote gdbserver testing on localhost. This board file can be used to reproduce PR 18208. gdb/testsuite 2015-04-24 Yao Qi <yao.qi@linaro.org> * boards/remote-gdbserver-on-localhost.exp: New file.
2015-04-24Skip the compressed1d test for targets which do not use the elf32.em linker ↵Nick Clifton2-0/+7
emulation file. * ld-elf/compressed1d.d: Add notarget for ELF based targets that do not use elf.em.
2015-04-24Correct ld-elf/compressed1e.d to use notarget and for cris-elf, not cris-*.Hans-Peter Nilsson2-1/+6
Don't XPASS cris-linux which *does* support -shared. And xfail is for bugs, notarget is for not-applicable.
2015-04-23Xfail cris and frv for ld-elf/compressed1e.dH.J. Lu2-0/+7
cris and frv don't support -shared. * ld-elf/compressed1e.d: Only run for Linux/gnu. Xfail cris and frv.
2015-04-24Automatic date update in version.inGDB Administrator1-1/+1
2015-04-23Delay setting up compressed debug section namesH.J. Lu6-63/+175
When we set up st_name for output section name in elf_fake_sections, we don't know if the compressed DWARF debug section will be smaller. We may end up with compressed DWARF debug sections which are bigger than the uncompressed ones. This patch delays setting up st_name for output DWARF debug section to _bfd_elf_assign_file_positions_for_non_load which will compress the output debug section. We also postpone placement of shstrtab section after DWARF debug sections have been compressed. The net effect is .shstrtab section is now placed after .symtab and .strtab sections. bfd/ PR ld/18277 * compress.c (bfd_compress_section_contents): Remove the write_compress argument. (bfd_init_section_compress_status): Updated. (bfd_compress_section): Likewise. * elf.c (_bfd_elf_set_reloc_sh_name): New. (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name to (unsigned int) -1 if delay_st_name_p is TRUE. Use _bfd_elf_set_reloc_sh_name. (elf_fake_sections): Don't rename DWARF debug section for linker output if it will be compressed. Instead, set delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr. (assign_section_numbers): Call _bfd_elf_strtab_addref only if sh_name != (unsigned int) -1. Don't finalize nor assign shstrtab section here. Delay setting output section names to _bfd_elf_write_object_contents. (_bfd_elf_compute_section_file_positions): Update comments on sh_offset for shstrtab section. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 for shstrtab section. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name when compressing DWARF debug sections. Place shstrtab section after DWARF debug sections have been compressed. (_bfd_elf_write_object_contents): Setting sh_name for output sections. ld/testsuite/ PR ld/18277 * ld-elf/compressed1d.d: New. * ld-elf/compressed1e.d: Likewise.
2015-04-23Improve warning messages for la/dlaMatthew Fortune8-2/+27
gas/ * config/tc-mips.c (macro): State the recommended way of creating 32-bit or 64-bit addresses. gas/testsuite/ * gas/mips/dla-warn.l: New file. * gas/mips/dla-warn.s: New file. * gas/mips/la-warn.l: New file. * gas/mips/la-warn.s: New file. * gas/mips/mips.exp: Run new tests.
2015-04-23Add option --weak-unresolved-symbols to treat unresolved symbols as weak ref.Sriraman Tallam6-5/+69
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as weak references. This is helpful when we want the link to succeed with unresolved symbols and the dynamic loader to not complain at run-time. Option --warn-unresolved-symbols lets the link succeed but could fail at run-time with unresolved symbol warnings especially when the unresolved symbols have GOT entries and dynamic relocations against them, like when -fPIE is used.
2015-04-23Add option --weak-unresolved-symbols to treat unresolved as weak references.Sriraman Tallam1-0/+45
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as weak references. This is helpful when we want the link to succeed with unresolved symbols and the dynamic loader to not complain at run-time. Option --warn-unresolved-symbols lets the link succeed but could fail at run-time with unresolved symbol warnings especially when the unresolved symbols have GOT entries and dynamic relocations against them, like when -fPIE is used. 2015-04-23 Sriraman Tallam <tmsriram@google.com> * options.h (--weak-unresolved-symbols): New option. * symtab.cc (Symbol_table::sized_write_globals): Change symbol binding to weak with new option. * symtab.h (is_weak_undefined): Check for new option. (is_strong_undefined): Check for new option. * testsuite/Makefile.am (weak_unresolved_symbols_test): New test. * testsuite/Makefile.in: Regenerate. * testsuite/weak_unresolved_symbols_test.cc: New file.
2015-04-23Fix r6-branch-constraints test when run with n64 as default ABIMatthew Fortune2-1/+6
gas/testsuite/ * gas/mips/mips.exp: Require o32 for r6-branch-constraints.
2015-04-23Don't change compressed input debug section namesH.J. Lu15-65/+317
Change compressed input debug section name for objdump is very confusing. But we need to change it for linker so that linker will consider the input section as a debug section. This patch delays section rename to elf_fake_sections for objcopy and avoids it for objdump. bfd/ PR binutils/18209 * bfd.c (bfd): Add is_linker_input. * elf.c (convert_debug_to_zdebug): New. (convert_zdebug_to_debug): Likewise. (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME. (_bfd_elf_init_reloc_shdr): Pass a pointer to section name instead of a pointer to section. (elf_fake_sections): Rename the section name if SEC_ELF_RENAME is set. * section.c (SEC_ELF_RENAME): New. * bfd-in2.h: Regenerated. binutils/ PR binutils/18209 * objcopy.c (setup_section): Copy compress status. binutils/testsuite/ PR binutils/18209 * binutils-all/compress.exp: Replace dw2-3.W with dw2-3gabi.W on zlib-gabi output. * binutils-all/dw2-1.W: Convert section names to .zdebug_*. * binutils-all/dw2-3.W: Likewise. * binutils-all/objdump.W: Likewise. * binutils-all/dw2-3gabi.W: New file. ld/ PR binutils/18209 * ldfile.c (ldfile_try_open_bfd): Set is_linker_input to 1.
2015-04-23Fix gdb.base/interrupt.exp racy fail against gdbserverPedro Alves2-2/+17
Currently, against gdbserver, interrupt.exp occasionaly fails like this: ERROR: Process no longer exists UNRESOLVED: gdb.base/interrupt.exp: send end of file The problem is that we see gdbserver exiting before we match gdb's output: expect: does "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" (spawn_id exp8) match regular expression "end of file"? Gate "end of file"? gate=no expect: read eof expect: set expect_out(spawn_id) "exp8" expect: set expect_out(buffer) "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" Fix this by removing $inferior_spawn_id from the set of spawn ids expect is watching as soon as we see the "end of file" string out of the inferior spawn id, using an indirect spawn id list. Tested on x86-64 Fedora 20, native and gdbserver (both target remote and extended-remote). gdb/testsuite/ChangeLog: 2015-04-23 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Use an indirect spawn id list holding $inferior_spawn_id instead of $inferior_spawn_id directly. On "end of file", remove $inferior_spawn_id from the indirect list.
2015-04-23gdb.base/interrupt.exp: Rename saw_eof to saw_end_of_filePedro Alves2-7/+11
To avoid confusion between "end of file" string matching and eof matching, as in process exit. gdb/testsuite/ChangeLog: 2015-04-23 Pedro Alves <palves@redhat.com> * gdb.base/interrupt.exp: Rename saw_eof to saw_end_of_file.
2015-04-23gdb_test_multiple match eof of any spawn_idPedro Alves2-0/+9
Since silent handling of eof is usually the wrong thing to do, this patch makes gdb_test_multiple handle it for all $any_spawn_id. Currently, against gdbserver, interrupt.exp occasionaly fails like this: FAIL: gdb.base/interrupt.exp: send end of file gdb.log with expect debug output enabled shows: expect: does "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" (spawn_id exp8) match regular expression "end of file"? Gate "end of file"? gate=no expect: read eof expect: set expect_out(spawn_id) "exp8" expect: set expect_out(buffer) "\r\n\r\nChild exited with status 0\r\nGDBserver exiting\r\n" FAIL: gdb.base/interrupt.exp: send end of file Note "expect: read eof" for spawn_id=exp8. exp8 is inferior_spawn_id/gdbserver_spawn_id. That means expect/gdb_test_multiple saw gdbserver exit before we got the expected gdb output. Since there's no explicit pattern for "eof", expect (and thus gdb_test_multiple) just returns. After this commit, we get instead: ERROR: Process no longer exists UNRESOLVED: gdb.base/interrupt.exp: send end of file Note that before we still got an FAIL because $saw_inferior_exit is 0 when we get to: gdb_assert { $saw_eof && $saw_inferior_exit } $msg Fixing the fail (now unresolved) will be the subject of a separate patch. gdb/testsuite/ChangeLog: 2015-04-23 Pedro Alves <palves@redhat.com> * lib/gdb.exp (gdb_test_multiple): Match eof/full_buffer/timeout on $any_spawn_id instead of only on $gdb_spawn_id.
2015-04-23x86: disambiguate disassembly of certain AVX512 insnsJan Beulich10-493/+546
Certain conversion operations as well as vfpclassp{d,s} are ambiguous when the input operand is in memory and no broadcast is being used. While in Intel mode this gets resolved by printing suitable operand size modifiers, AT&T mode need mnemonic suffixes to be added. gas/testsuite/ 2015-04-23 Jan Beulich <jbeulich@suse.com> * gas/i386/avx512dq.d: Add 'z' suffix to vfpclassp{d,s} non- register, non-broadcast cases. * gas/i386/x86-64-avx512dq.d: Likewise. * gas/i386/avx512dq_vl.d: Add 'x' and 'y' suffixes to vcvt{,u}qq2ps and vfpclassp{d,s} non-register, non-broadcast cases. * gas/i386/x86-64-avx512dq_vl.d: Likewise. * gas/i386/avx512f_vl.d: Add 'x' and 'y' suffixes to vcvt{,t}pd2{,u}dq and vcvtpd2ps non-register, non-broadcast cases. * gas/i386/x86-64-avx512f_vl.d: Likewise. opcodes/ 2015-04-23 Jan Beulich <jbeulich@suse.com> * i386-dis.c (putop): Extend "XY" handling to AVX512. Handle "XZ". * i386-dis-evex.h.c (vcvtpd2ps, vcvtqq2ps, vcvttpd2udq, vcvtpd2udq, vcvtuqq2ps, vcvttpd2dq, vcvtpd2dq): Add %XY. (vfpclasspd, vfpclassps): Add %XZ.
2015-04-23x86: don't require operand size specification for AVX512 broadcastsJan Beulich9-238/+258
Certain conversion operations as well as vfpclassp{d,s} are ambiguous when the input operand is in memory. That ambiguity, however, doesn't apply when using broadcasts (the destination operand size can be induced from the broadcast specifier). gas/ 2015-04-23 Jan Beulich <jbeulich@suse.com> * config/tc-i386.c (match_mem_size): Also allow no size specification when broadcasting. gas/testsuite/ 2015-04-23 Jan Beulich <jbeulich@suse.com> * gas/i386/avx512dq.s: Drop 'z' suffix from vfpclassp{d,s} in some AT&T and all Intel cases. * gas/i386/x86-64-avx512dq.s: Likewise. * gas/i386/avx512dq_vl.s: Drop 'x' and 'y' suffixes from vcvt{,u}qq2ps and vfpclassp{d,s} in some AT&T and all Intel cases. * gas/i386/x86-64-avx512dq_vl.s: Likewise. * gas/i386/avx512f_vl.s: Drop 'x' and 'y' suffixes from vcvt{,t}pd2{,u}dq and vcvtpd2ps in some AT&T and all Intel cases. * gas/i386/x86-64-avx512f_vl.s: Likewise.
2015-04-23Explicitly call rl_resize_terminal() in TUI's SIGWINCH handlerPatrick Palka2-0/+6
In readline 6.3, the semantics of SIGWINCH handling has changed. When a SIGWINCH signal is raised, readline's rl_sigwinch_handler() now does not immediately call rl_resize_terminal(). Instead it sets a flag that is checked by RL_CHECK_SIGNALS() at a point where readline has control, and calls rl_resize_terminal() if said flag is set. This change is item (c) in https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES c. Fixed a bug that caused readline to try and run code to modify its idea of the screen size in a signal handler context upon receiving a SIGWINCH. This change in behavior is important to us because TUI's tui_sigwinch_handler() relies on the assumption that by the time it's called, readline will have updated its knowledge of the terminal dimensions via rl_resize_terminal(). Since this assumption no longer holds true, TUI's SIGWINCH handling does not work correctly with readline 6.3. To fix this issue this patch makes TUI explicitly call rl_resize_terminal() in tui_async_resize_screen() at the point where current terminal dimensions are needed. (We could call it in tui_sigwinch_handler too, but since readline avoids doing it, we are probably safer off avoiding to call it in signal handler context as well.) After this change, SIGWINCH handling continues to work properly with both readline 6.2 and 6.3. Since we no longer need it, we could now explicitly disable readline's SIGWINCH handler by setting rl_catch_sigwinch to zero early on in the program startup but I can't seem to find a good spot to place this assignment (the first call to rl_initialize() occurs in tui_initialize_readline() so the assignment should occur before then), and the handler is harmless anyway. gdb/ChangeLog: * tui/tui-win.c (tui_async_resize_screen): Call rl_resize_terminal().
2015-04-23Accept odd result in ld-powerpc/tocnovar testcaseAlan Modra2-1/+2
I didn't commit this with the relro and powerpc .TOC. changes, thinking that something should be done about the odd result of .shstrtab appearing in PT_GNU_RELRO. On looking at it further, I think that changing readelf would be wrong, so let's just accept the results. Real binaries will always have other sections past .got, so PT_GNU_RELRO won't finish past the end of loaded sections. * ld-powerpc/tocnovar.d: Adjust.
2015-04-23Align .TOC. for PowerPC64Alan Modra30-136/+180
This change, with prerequisite 0e5fabeb, provides a toc base aligned to 256 bytes rather than 8 bytes. This is necessary for a minor gcc optimisation, allowing use of d-form instructions to correctly access toc-relative items larger than 8 bytes. bfd/ * elf64-ppc.c (TOC_BASE_ALIGN): Define. (ppc64_elf_next_toc_section): Align multi-got toc base. (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol. ld/ * emulparams/elf64ppc.sh (GOT): Align. ld/testsuite/ * ld-powerpc/ambiguousv1b.d: Update for aligned .got. * ld-powerpc/defsym.d: Likewise. * ld-powerpc/elfv2-2exe.d: Likewise. * ld-powerpc/elfv2exe.d: Likewise. * ld-powerpc/elfv2so.d: Likewise. * ld-powerpc/relbrlt.d: Likewise. * ld-powerpc/tls.g: Likewise. * ld-powerpc/tlsexe.d: Likewise. * ld-powerpc/tlsexe.g: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexetoc.d: Likewise. * ld-powerpc/tlsexetoc.g: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso.d: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlstoc.g: Likewise. * ld-powerpc/tlstocso.d: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-powerpc/tocopt.d: Likewise. * ld-powerpc/tocopt2.d: Likewise. * ld-powerpc/tocopt3.d: Likewise. * ld-powerpc/tocopt4.d: Likewise. * ld-powerpc/tocopt5.d: Likewise.
2015-04-23Automatic date update in version.inGDB Administrator1-1/+1
2015-04-22libiberty/setenv.c: Do not declare environ if defined as a macro.Joel Brobecker2-0/+6
Otherwise, it causes a build warning on some platforms such as MinGW. libiberty/ChangeLog (Eli Zaretskii <eliz@gnu.org>): * setenv.c <environ>: Declare only if not a macro.
2015-04-22windows-nat: Don't change current_event.dwThreadId in ↵Jon Turney2-2/+8
handle_output_debug_string() Using the 'catch-signal' test from the testsuite, on x86_64 Cygwin: $ ./gdb testsuite/outputs/gdb.base/catch-signal/catch-signal.exe [...] (gdb) catch signal Catchpoint 1 (standard signals) (gdb) r [...] Catchpoint 1 (signal SIGHUP), main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ (gdb) c Continuing. main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ Failed to resume program execution (ContinueDebugEvent failed, error 87) (gdb) This error occurs because when handle_output_debug_string processes a Cygwin signal message, it re-writes current_event.dwThreadId to reflect the thread that the signal will be delivered to, which can be different to the thread reporting the signal. Altering current_event.dwThreadId() will cause ContinueDebugEvent() to be applied to the wrong thread and fail. So, rather than re-writing the thread id in current_event, use the thread id by returning it. With this patch applied this test now yields the expected result: $ ./gdb testsuite/outputs/gdb.base/catch-signal/catch-signal.exe [...] (gdb) catch signal Catchpoint 1 (standard signals) (gdb) r [...] Catchpoint 1 (signal SIGHUP), main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ (gdb) c Continuing. Catchpoint 1 (signal SIGHUP), main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:42 42 raise (SIGHUP); /* third HUP */ (gdb) gdb/ChangeLog: 2015-04-22 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (handle_output_debug_string): Don't change current_event.dwThreadId. (get_windows_debug_event): Use thread_id, rather than relying on current_event.dwThreadId being changed.
2015-04-22windows-nat: Report an error if ContinueDebugEvent() failsJon Turney2-0/+10
Using the 'catch-signal' test from the testsuite, on x86_64 Cygwin: $ ./gdb testsuite/outputs/gdb.base/catch-signal/catch-signal.exe [...] (gdb) catch signal Catchpoint 1 (standard signals) (gdb) r [...] Catchpoint 1 (signal SIGHUP), main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ (gdb) c Continuing. [hangs] This is due to a defect in the way Cygwin signals are handled: When handle_output_debug_string processes a Cygwin signal message, it re-writes current_event.dwThreadId to reflect the thread that the signal will be delivered to. Subsequently, the call to ContinueDebugEvent will fail, because we're trying to resume the wrong thread. GDB is then stuck waiting forever for another event that will never come. This patch doesn't fix the problem, it just adds appropriate error handling. Using error() seems appropriate here, if ContinueDebugEvent() fails, the inferior is in an unknown state and we will probably not be debugging it anymore. With this patch applied, resuming the execution of the program now yields: $ ./gdb testsuite/outputs/gdb.base/catch-signal/catch-signal.exe [...] (gdb) catch signal Catchpoint 1 (standard signals) (gdb) r [...] Catchpoint 1 (signal SIGHUP), main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ (gdb) c Continuing. main () at ../../../gdb/testsuite/gdb.base/catch-signal.c:40 40 raise (SIGHUP); /* second HUP */ Failed to resume program execution (ContinueDebugEvent failed, error 87) (gdb) gdb/ChangeLog: 2015-04-22 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (windows_continue): Report an error if ContinueDebugEvent() fails.
2015-04-22windows-nat: Fix misspelling in debug outputJon Turney2-1/+5
gdb/ChangeLog: 2015-04-16 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (windows_resume): Fix misspelling in debug output.
2015-04-22windows-nat: Cleanups in get_windows_debug_eventJon Turney2-15/+20
gdb/ChangeLog: 2015-04-16 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (get_windows_debug_event): Replace retval with thread_id throughout. Update stale comment.
2015-04-22windows-nat: Don't use ternary conditional operator in get_windows_debug_eventJon Turney2-1/+8
gdb/ChangeLog: 2015-04-16 Jon Turney <jon.turney@dronecode.org.uk> * windows-nat.c (get_windows_debug_event): Don't use ternary conditional operator.