aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-04-26x86: tighten assertion in build_modrm_byte()Jan Beulich2-4/+8
All VEX3SOURCES cases should have VexW set, and all should have a SIMD register destination.
2018-04-26x86: drop dead code from build_modrm_byte()Jan Beulich2-19/+10
There are no templates with VexImmExt and ImmExt set at the same time. There are also no VEX3SOURCES templates with CpuFMA. I assume both are left-overs from the implementation of an early specification which was later revised.
2018-04-26Automatic date update in version.inGDB Administrator1-1/+1
2018-04-25[ARM] FDPIC: Update testsuite so that many tests pass with ↵Christophe Lyon119-111/+241
arm*-uclinuxfdpiceabi. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> binutils/ * testsuite/binutils-all/elfedit-2.d: Accept arm*-*-uclinuxfdpiceabi. * testsuite/binutils-all/elfedit-3.d: Likewise. * testsuite/binutils-all/objcopy.exp: Likewise. * testsuite/binutils-all/strip-3.d: Likewise. * testsuite/lib/binutils-common.exp: Likewise. ld/ * testsuite/ld-arm/export-class.exp: Accept arm*-*-uclinuxfdpiceabi. * testsuite/ld-discard/discard.exp: Likewise. * testsuite/ld-elf/binutils.exp: Likewise. * testsuite/ld-elf/commonpage1.d: Likewise. * testsuite/ld-elf/compress1c.d: Likewise. * testsuite/ld-elf/compressed1b.d: Likewise. * testsuite/ld-elf/compressed1c.d: Likewise. * testsuite/ld-elf/compressed1e.d: Likewise. * testsuite/ld-elf/dynamic1.d: Likewise. * testsuite/ld-elf/dynsym1.d: Likewise. * testsuite/ld-elf/ehdr_start-missing.d: Likewise. * testsuite/ld-elf/ehdr_start-shared.d: Likewise. * testsuite/ld-elf/ehdr_start-userdef.d: Likewise. * testsuite/ld-elf/ehdr_start-weak.d: Likewise. * testsuite/ld-elf/ehdr_start.d: Likewise. * testsuite/ld-elf/exclude3b.d: Likewise. * testsuite/ld-elf/export-class.exp: Likewise. * testsuite/ld-elf/global1.d: Likewise. * testsuite/ld-elf/hash.d: Likewise. * testsuite/ld-elf/header.d: Likewise. * testsuite/ld-elf/loadaddr1.d: Likewise. * testsuite/ld-elf/loadaddr2.d: Likewise. * testsuite/ld-elf/loadaddr3a.d: Likewise. * testsuite/ld-elf/loadaddr3b.d: Likewise. * testsuite/ld-elf/local1.d: Likewise. * testsuite/ld-elf/maxpage1.d: Likewise. * testsuite/ld-elf/maxpage2.d: Likewise. * testsuite/ld-elf/maxpage3a.d: Likewise. * testsuite/ld-elf/mbind1a.d: Likewise. * testsuite/ld-elf/mbind1b.d: Likewise. * testsuite/ld-elf/mbind1c.d: Likewise. * testsuite/ld-elf/multibss1.d: Likewise. * testsuite/ld-elf/noload-2.d: Likewise. * testsuite/ld-elf/now-1.d: Likewise. * testsuite/ld-elf/now-2.d: Likewise. * testsuite/ld-elf/now-3.d: Likewise. * testsuite/ld-elf/now-4.d: Likewise. * testsuite/ld-elf/pie.d: Likewise. * testsuite/ld-elf/pr12975.d: Likewise. * testsuite/ld-elf/pr13177.d: Likewise. * testsuite/ld-elf/pr13195.d: Likewise. * testsuite/ld-elf/pr16322.d: Likewise. * testsuite/ld-elf/pr16498a.d: Likewise. * testsuite/ld-elf/pr16498b.d: Likewise. * testsuite/ld-elf/pr17615.d: Likewise. * testsuite/ld-elf/pr19162.d: Likewise. * testsuite/ld-elf/pr19539.d: Likewise. * testsuite/ld-elf/pr19617a.d: Likewise. * testsuite/ld-elf/pr19617b.d: Likewise. * testsuite/ld-elf/pr19617c.d: Likewise. * testsuite/ld-elf/pr19698.d: Likewise. * testsuite/ld-elf/pr19789.d: Likewise. * testsuite/ld-elf/pr20513c.d: Likewise. * testsuite/ld-elf/pr20513d.d: Likewise. * testsuite/ld-elf/pr21384.d: Likewise. * testsuite/ld-elf/pr21389a.d: Likewise. * testsuite/ld-elf/pr21389b.d: Likewise. * testsuite/ld-elf/pr21389c.d: Likewise. * testsuite/ld-elf/pr21562a.d: Likewise. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.d: Likewise. * testsuite/ld-elf/pr21562e.d: Likewise. * testsuite/ld-elf/pr21562f.d: Likewise. * testsuite/ld-elf/pr21562g.d: Likewise. * testsuite/ld-elf/pr21562h.d: Likewise. * testsuite/ld-elf/pr21562i.d: Likewise. * testsuite/ld-elf/pr21562j.d: Likewise. * testsuite/ld-elf/pr21562k.d: Likewise. * testsuite/ld-elf/pr21562l.d: Likewise. * testsuite/ld-elf/pr21562m.d: Likewise. * testsuite/ld-elf/pr21562n.d: Likewise. * testsuite/ld-elf/pr21903a.d: Likewise. * testsuite/ld-elf/pr21903b.d: Likewise. * testsuite/ld-elf/pr21903d.d: Likewise. * testsuite/ld-elf/pr22269a.d: Likewise. * testsuite/ld-elf/pr22269b.d: Likewise. * testsuite/ld-elf/pr22393-1a.d: Likewise. * testsuite/ld-elf/pr22393-1b.d: Likewise. * testsuite/ld-elf/pr22393-1c.d: Likewise. * testsuite/ld-elf/pr22393-1d.d: Likewise. * testsuite/ld-elf/pr22393-1e.d: Likewise. * testsuite/ld-elf/pr22393-1f.d: Likewise. * testsuite/ld-elf/pr22423.d: Likewise. * testsuite/ld-elf/rpath-1.d: Likewise. * testsuite/ld-elf/rpath-2.d: Likewise. * testsuite/ld-elf/runpath-1.d: Likewise. * testsuite/ld-elf/runpath-2.d: Likewise. * testsuite/ld-elf/seg.d: Likewise. * testsuite/ld-elf/sizeofb.d: Likewise. * testsuite/ld-elf/startofb.d: Likewise. * testsuite/ld-elf/strtab.d: Likewise. * testsuite/ld-elf/textaddr1.d: Likewise. * testsuite/ld-elf/textaddr2.d: Likewise. * testsuite/ld-elf/textaddr3.d: Likewise. * testsuite/ld-elf/textaddr4.d: Likewise. * testsuite/ld-elf/textaddr5.d: Likewise. * testsuite/ld-elf/textaddr6.d: Likewise. * testsuite/ld-elf/textaddr7.d: Likewise. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elf/tls_common.exp: Likewise. * testsuite/ld-elf/unknown2.d: Likewise. * testsuite/ld-gc/abi-note.d: Likewise. * testsuite/ld-gc/pr11218.d: Likewise. * testsuite/ld-gc/pr19167.d: Likewise. * testsuite/ld-gc/pr20022.d: Likewise. * testsuite/ld-gc/start.d: Likewise. * testsuite/ld-gc/stop.d: Likewise. * testsuite/ld-scripts/phdrs2.exp: Likewise. * testsuite/ld-scripts/rgn-at5.d: Likewise. * testsuite/ld-undefined/entry-3.d: Likewise. * testsuite/ld-undefined/entry-4.d: Likewise.
2018-04-25[ARM] FDPIC: Implement Thumb-only PLT for FDPIC.Christophe Lyon10-21/+352
2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. (elf32_arm_output_arch_local_syms): Likewise. ld/testsuite/ * arm-elf.exp: Execute the new FDPIC Thumb-only tests. * fdpic-main-m.d: New test. * fdpic-main-m.s: New. * fdpic-main-m.sym: New. * fdpic-shared-m.d: New test. * fdpic-shared-m.s: New. * fdpic-shared-m.sym: New.
2018-04-25[ARM] FDPIC: New tests.Christophe Lyon12-0/+811
2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> ld/ * testsuite/ld-arm/arm-elf.exp: Execute the new FDPIC tests. * testsuite/ld-arm/fdpic-main.d: New test. * testsuite/ld-arm/fdpic-main.ld: New. * testsuite/ld-arm/fdpic-main.r: New. * testsuite/ld-arm/fdpic-main.s: New. * testsuite/ld-arm/fdpic-main.sym: New. * testsuite/ld-arm/fdpic-shared.d: New test. * testsuite/ld-arm/fdpic-shared.ld: New. * testsuite/ld-arm/fdpic-shared.r: New. * testsuite/ld-arm/fdpic-shared.s: New. * testsuite/ld-arm/fdpic-shared.sym: New.
2018-04-25[ARM] FDPIC: Fix ld testcase not to conflict with uclibc's includes.Christophe Lyon2-4/+10
2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> ld/ * testsuite/ld-elf/pr2404b.c (main): Rename time variable into time1.
2018-04-25[ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbolChristophe Lyon2-3/+9
2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
2018-04-25[ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation ↵Christophe Lyon2-1/+9
for FDPIC platform 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2.
2018-04-25[ARM] FDPIC: Add stack segmentChristophe Lyon2-0/+19
The size of the stack segment defaults to 32KB, and can be overridden by defining the __stacksize symbol. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (DEFAULT_STACK_SIZE): New. (elf32_arm_always_size_sections): Create stack segment.
2018-04-25[ARM] Add TLS relocations for FDPIC.Christophe Lyon10-14/+148
Define and handle TLS relocations for FDPIC in BFD and gas. In gas, the new relocations are rejected if the --fdpic option was not specified. We also define the __tdata_start symbol to mark the start of the .tdata section. This allows FDPIC static binaries to find the start of .tdata section, since phdr->p_vaddr of TLS segment is not a valid value for FDPIC. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/: * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC) (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New relocations. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. (struct elf32_arm_link_hash_table): Update comment. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations. (IS_ARM_TLS_RELOC): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Update comment. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC, BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC. gas/ * config/tc-arm.c (reloc_names): Add TLSGD_FDPIC, TLSLDM_FDPIC, GOTTPOFF_FDIC relocations. (md_apply_fix): Handle the new TLS FDPIC relocations. (tc_gen_reloc): Likewise. (arm_fix_adjustable): Likewise. include/ * elf/arm.h: Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. ld/ * scripttempl/elf.sc: Define __tdata_start for .tdata section.
2018-04-25[ARM] Implement PLT for FDPIC.Christophe Lyon2-9/+152
FDPIC requires special PLT entries, defined in this patch. Note that lazy binding is not supported because of a race condition for lack of an atomic 64-bits load instruction. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (elf32_arm_fdpic_plt_entry): New. (elf32_arm_create_dynamic_sections): Handle FDPIC. (elf32_arm_allocate_plt_entry): Likewise. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise.
2018-04-25[ARM] Implement FDPIC relocations.Christophe Lyon4-31/+731
This is the main BFD patch, that enables the linker to actually handle the FDPIC relocations. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. ld/ * emulparams/armelf_linux_fdpiceabi.sh: Add .rofixup section.
2018-04-25[ARM] Add FDPIC relocations definitionsChristophe Lyon10-4/+170
Add FDPIC relocation definitions in BFD and gas. Gas rejects them if the --fdpic option was not specified. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC) (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC) (BFD_RELOC_ARM_FUNCDESC_VALUE): New. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE. (elf32_arm_howto_from_type): Take new members of elf32_arm_howto_table_2 into account. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. gas/ * config/tc-arm.c (reloc_names): Add gotfuncdesc, gotofffuncdesc, funcdesc. (md_apply_fix): Support the new relocations. (tc_gen_reloc): Likewise. * testsuite/gas/arm/reloc-fdpic.d: New. * testsuite/gas/arm/reloc-fdpic.s: New. include/ * elf/arm.h (R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC) (R_ARM_FUNCDESC) (R_ARM_FUNCDESC_VALUE): Define new relocations.
2018-04-25[ARM] Add FDPIC OSABI flag support.Christophe Lyon8-4/+81
ELF files targetting ARM FDPIC use the ELFOSABI_ARM_FDPIC flag. Set it appropriately in file generators (eg. gas), and handle it in readers (eg. readelf). 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * elf32-arm.c (elf32_arm_print_private_bfd_data): Support EF_ARM_PIC and ELFOSABI_ARM_FDPIC. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC. binutils/ * readelf.c (decode_ARM_machine_flags): Support EF_ARM_PIC. (get_osabi_name): Support ELFOSABI_ARM_FDPIC. gas/ * config/tc-arm.c (arm_fdpic): New. (elf32_arm_target_format): Support FDPIC. (OPTION_FDPIC): New. (md_longopts): Support FDPIC. (md_parse_option): Likewise. (md_show_usage): Likewise. include/ * elf/arm.h (EF_ARM_FDPIC): New.
2018-04-25[ARM] Add armelf_linux_fdpiceabi and armelfb_linux_fdpiceabi BFD backendsChristophe Lyon12-3/+131
Initial definition of these new backends. 2018-04-25 Christophe Lyon <christophe.lyon@st.com> Mickaël Guêné <mickael.guene@st.com> bfd/ * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_linux_fdpiceabi.c and earmelfb_linux_fdpiceabi.c. (earmelf_linux_fdpiceabi.c, earmelfb_linux_fdpiceabi.c): New rules. * Makefile.in: Regenerate. * configure.tgt (arm*-*-uclinuxfdpiceabi): Handle new target. * emulparams/armelf_linux_fdpiceabi.sh: New. * emulparams/armelfb_linux_fdpiceabi.sh: New.
2018-04-25Fix new inferior events outputPedro Alves7-6/+26
Since f67c0c917150 ("Enable 'set print inferior-events' and improve detach/fork/kill/exit messages"), when detaching a remote process, we get, for detach against a remote target: (gdb) detach Detaching from program: ...., process 5388 Ending remote debugging. [Inferior 1 (Thread 5388.5388) detached] ^^^^^^^^^^^^^^^^ That is incorrect, for it is printing a thread id as string while we should be printing the process id instead. I.e., either one of: [Inferior 1 (process 5388) detached] [Inferior 1 (Remote target) detached] depending on remote stub support for the multi-process extensions. Similarly, after killing a process, we're printing thread ids while we should be printing process ids. E.g., on native GNU/Linux: (gdb) k Kill the program being debugged? (y or n) y [Inferior 1 (Thread 0x7ffff7faa8c0 (LWP 30721)) has been killed] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ while it should have been: Kill the program being debugged? (y or n) y [Inferior 1 (process 30721) has been killed] ^^^^^^^^^^^^^ There's a wording inconsistency between detach and kill: [Inferior 1 (process 30721) has been killed] [Inferior 1 (process 30721) detached] Given we were already saying "detached" instead of "has been detached", and we used to say just "exited", and given that the "has been" doesn't really add any information, this commit changes the message to just "killed": [Inferior 1 (process 30721) killed] gdb/ChangeLog: 2018-04-25 Pedro Alves <palves@redhat.com> * infcmd.c (kill_command): Print the pid as string, not the whole thread's ptid. Add comment. s/has been killed/killed/ in output message. * remote.c (remote_detach_1): Print the pid as string, not the whole thread's ptid. gdb/testsuite/ChangeLog: 2018-04-25 Pedro Alves <palves@redhat.com> * gdb.base/hook-stop.exp: Expect "killed" instead of "has been killed". * gdb.base/kill-after-signal.exp: Likewise. * gdb.threads/kill.exp: Likewise.
2018-04-25x86: drop redundant AVX512VL shift templatesJan Beulich3-126/+6
These were wrongly left in place by commit ed438a93f1 ("x86: fold certain AVX512 rotate and shift templates").
2018-04-25Fix the mask for the sqrdml(a|s)h instructions.Tamar Christina6-127/+10070
Rn is supposed to have a 5 bit range but instead was given 4 bits causing these instructions to disassemble as unknown instructions. opcodes/ * aarch64-tbl.h (sqrdmlah, sqrdmlsh): Fix masks. gas/ * testsuite/gas/aarch64/rdma.s: Test for larger register numbers. * testsuite/gas/aarch64/rdma.d: Update results. * testsuite/gas/aarch64/rdma-directive.d: Likewise.
2018-04-25Updated Spanish translation for the gas directory.Nick Clifton2-559/+432
2018-04-25Silence gcc-8 warningsAlan Modra3-1/+36
This seems to work with gcc-8 and a bunch of prior gcc versions I tested. * elf-linux-core.h: Disable gcc-8 string truncation warning. * elf.c (elfcore_write_prpsinfo): Likewise.
2018-04-24Fix bug with relocation addends and merge sections with --icf.Cary Coutant3-31/+68
During --icf processing, gold was incorrectly processing the relocation addend for references to items in a merge section. PC-relative references and other forms of reference with a biased base address require a non-section local symbol, where the addend is purely the bias. gold/ PR gold/20642 PR gold/22820 * gc.h (gc_process_relocs): Flag STT_SECTION symbols in symvec. * icf.cc (get_section_contents): For merge sections, ignore the addend for relocations against non-section symbols.
2018-04-25Remove arm-aout and arm-coff supportAlan Modra254-1929/+489
This also removes arm-netbsd (not arm-netbsdelf!), arm-openbsd, and arm-riscix. Those targets weren't on the obsolete list but they are all aout, and it doesn't make all that much sense to remove arm-aout without removing them too. bfd/ * Makefile.am: Remove arm-aout and arm-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-arm.c: Delete. * armnetbsd.c: Delete. * riscix.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/binutils-all/arm/objdump.exp: Remove arm-aout and arm-coff support. * testsuite/binutils-all/objcopy.exp: Likewise. * testsuite/lib/binutils-common.exp: Likewise. gas/ * Makefile.am: Remove arm-aout and arm-coff support. * config/tc-arm.c: Likewise. * config/tc-arm.h: Likewise. * configure.tgt: Likewise. * testsuite/gas/aarch64/codealign.d: Likewise. * testsuite/gas/aarch64/mapping.d: Likewise. * testsuite/gas/aarch64/mapping2.d: Likewise. * testsuite/gas/arm/adds-thumb1-reloc-local-armv7-m.d: Likewise. * testsuite/gas/arm/adds-thumb1-reloc-local.d: Likewise. * testsuite/gas/arm/addsw-bad.d: Likewise. * testsuite/gas/arm/align.d: Likewise. * testsuite/gas/arm/align64.d: Likewise. * testsuite/gas/arm/arch7.d: Likewise. * testsuite/gas/arm/arch7a-mp.d: Likewise. * testsuite/gas/arm/arch7em.d: Likewise. * testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise. * testsuite/gas/arm/arm-it-auto-2.d: Likewise. * testsuite/gas/arm/arm-it-auto-3.d: Likewise. * testsuite/gas/arm/arm-it-auto.d: Likewise. * testsuite/gas/arm/arm-it-bad-2.d: Likewise. * testsuite/gas/arm/arm-it.d: Likewise. * testsuite/gas/arm/armv7e-m+fpv5-d16.d: Likewise. * testsuite/gas/arm/armv7e-m+fpv5-sp-d16.d: Likewise. * testsuite/gas/arm/armv8-2-fp16-scalar-thumb.d: Likewise. * testsuite/gas/arm/armv8-2-fp16-scalar.d: Likewise. * testsuite/gas/arm/armv8-2-fp16-simd-thumb.d: Likewise. * testsuite/gas/arm/armv8-2-fp16-simd.d: Likewise. * testsuite/gas/arm/armv8-a+crypto.d: Likewise. * testsuite/gas/arm/armv8-a+fp.d: Likewise. * testsuite/gas/arm/armv8-a+ras.d: Likewise. * testsuite/gas/arm/armv8-a+rdma-warning.d: Likewise. * testsuite/gas/arm/armv8-a+rdma.d: Likewise. * testsuite/gas/arm/armv8-a+simd.d: Likewise. * testsuite/gas/arm/armv8-a-barrier-thumb.d: Likewise. * testsuite/gas/arm/armv8-r+fp.d: Likewise. * testsuite/gas/arm/armv8-r+simd.d: Likewise. * testsuite/gas/arm/armv8-r-barrier-thumb.d: Likewise. * testsuite/gas/arm/armv8_1-a+simd.d: Likewise. * testsuite/gas/arm/armv8_2+rdma.d: Likewise. * testsuite/gas/arm/armv8_2-a.d: Likewise. * testsuite/gas/arm/armv8_3-a-fp.d: Likewise. * testsuite/gas/arm/armv8_3-a-simd.d: Likewise. * testsuite/gas/arm/armv8a-automatic-hlt.d: Likewise. * testsuite/gas/arm/armv8a-automatic-lda.d: Likewise. * testsuite/gas/arm/attr-syntax.d: Likewise. * testsuite/gas/arm/automatic-bw.d: Likewise. * testsuite/gas/arm/automatic-cbz.d: Likewise. * testsuite/gas/arm/automatic-clrex.d: Likewise. * testsuite/gas/arm/automatic-lda.d: Likewise. * testsuite/gas/arm/automatic-ldaex.d: Likewise. * testsuite/gas/arm/automatic-ldaexb.d: Likewise. * testsuite/gas/arm/automatic-ldrex.d: Likewise. * testsuite/gas/arm/automatic-ldrexd.d: Likewise. * testsuite/gas/arm/automatic-movw.d: Likewise. * testsuite/gas/arm/automatic-sdiv.d: Likewise. * testsuite/gas/arm/automatic-strexb.d: Likewise. * testsuite/gas/arm/barrier-bad-thumb.d: Likewise. * testsuite/gas/arm/barrier-bad.d: Likewise. * testsuite/gas/arm/barrier-thumb.d: Likewise. * testsuite/gas/arm/barrier.d: Likewise. * testsuite/gas/arm/bignum1.d: Likewise. * testsuite/gas/arm/blx-bad.d: Likewise. * testsuite/gas/arm/blx-bl-convert.d: Likewise. * testsuite/gas/arm/blx-local.s: Likewise. * testsuite/gas/arm/crc32-armv8-a-bad.d: Likewise. * testsuite/gas/arm/crc32-armv8-a.d: Likewise. * testsuite/gas/arm/crc32-armv8-r-bad.d: Likewise. * testsuite/gas/arm/crc32-armv8-r.d: Likewise. * testsuite/gas/arm/dis-data.d: Likewise. * testsuite/gas/arm/dis-data2.d: Likewise. * testsuite/gas/arm/dis-data3.d: Likewise. * testsuite/gas/arm/eabi_attr_1.d: Likewise. * testsuite/gas/arm/fp-save.d: Likewise. * testsuite/gas/arm/group-reloc-alu-encoding-bad.d: Likewise. * testsuite/gas/arm/group-reloc-alu-parsing-bad.d: Likewise. * testsuite/gas/arm/group-reloc-alu.d: Likewise. * testsuite/gas/arm/group-reloc-ldc-encoding-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldc-parsing-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldc.d: Likewise. * testsuite/gas/arm/group-reloc-ldr-encoding-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldr-parsing-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldr.d: Likewise. * testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldrs-parsing-bad.d: Likewise. * testsuite/gas/arm/group-reloc-ldrs.d: Likewise. * testsuite/gas/arm/insn-error-a.d: Likewise. * testsuite/gas/arm/insn-error-t.d: Likewise. * testsuite/gas/arm/inst-po-2.d: Likewise. * testsuite/gas/arm/inst-po-3.d: Likewise. * testsuite/gas/arm/inst-po-be.d: Likewise. * testsuite/gas/arm/inst-po.d: Likewise. * testsuite/gas/arm/ldconst.d: Likewise. * testsuite/gas/arm/ldgesb-bad.d: Likewise. * testsuite/gas/arm/ldgesh-bad.d: Likewise. * testsuite/gas/arm/ldst-offset0.d: Likewise. * testsuite/gas/arm/local_function.d: Likewise. * testsuite/gas/arm/local_label_coff.d: Likewise. * testsuite/gas/arm/local_label_elf.d: Likewise. * testsuite/gas/arm/mapping.d: Likewise. * testsuite/gas/arm/mapping2.d: Likewise. * testsuite/gas/arm/mapping3.d: Likewise. * testsuite/gas/arm/mapping4.d: Likewise. * testsuite/gas/arm/mapshort-elf.d: Likewise. * testsuite/gas/arm/mask_1-armv8-a.d: Likewise. * testsuite/gas/arm/mask_1-armv8-r.d: Likewise. * testsuite/gas/arm/movs-thumb1-reloc-local-armv7-m.d: Likewise. * testsuite/gas/arm/movs-thumb1-reloc-local.d: Likewise. * testsuite/gas/arm/movw-local.d: Likewise. * testsuite/gas/arm/mrs-msr-thumb-v6t2.d: Likewise. * testsuite/gas/arm/mrs-msr-thumb-v7-m.d: Likewise. * testsuite/gas/arm/mrs-msr-thumb-v7e-m.d: Likewise. * testsuite/gas/arm/msr-imm-bad.d: Likewise. * testsuite/gas/arm/msr-reg-bad.d: Likewise. * testsuite/gas/arm/msr-reg-thumb.d: Likewise. * testsuite/gas/arm/nomapping.d: Likewise. * testsuite/gas/arm/nops.d: Likewise. * testsuite/gas/arm/pic.d: Likewise. * testsuite/gas/arm/pinsn.d: Likewise. * testsuite/gas/arm/plt-1.d: Likewise. * testsuite/gas/arm/pr21458.d: Likewise. * testsuite/gas/arm/pr9722.d: Likewise. * testsuite/gas/arm/strex-t.d: Likewise. * testsuite/gas/arm/t2-branch-global.d: Likewise. * testsuite/gas/arm/target-reloc-1.d: Likewise. * testsuite/gas/arm/thumb-b-bad.d: Likewise. * testsuite/gas/arm/thumb-w-bad.d: Likewise. * testsuite/gas/arm/thumb-w-good.d: Likewise. * testsuite/gas/arm/thumb.d: Likewise. * testsuite/gas/arm/thumb2_it.d: Likewise. * testsuite/gas/arm/thumb2_it_auto.d: Likewise. * testsuite/gas/arm/thumb2_it_search.d: Likewise. * testsuite/gas/arm/thumb2_ldmstm.d: Likewise. * testsuite/gas/arm/thumb2_ldr_immediate_armv6.d: Likewise. * testsuite/gas/arm/thumb2_ldr_immediate_armv6t2.d: Likewise. * testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.d: Likewise. * testsuite/gas/arm/thumb2_pool.d: Likewise. * testsuite/gas/arm/thumb2_vpool.d: Likewise. * testsuite/gas/arm/thumb2_vpool_be.d: Likewise. * testsuite/gas/arm/thumb32.d: Likewise. * testsuite/gas/arm/thumbver.d: Likewise. * testsuite/gas/arm/tls.d: Likewise. * testsuite/gas/arm/tls_vxworks.d: Likewise. * testsuite/gas/arm/undefined.d: Likewise. * testsuite/gas/arm/undefined_coff.d: Likewise. * testsuite/gas/arm/unwind.d: Likewise. * testsuite/gas/arm/v4bx.d: Likewise. * testsuite/gas/arm/vcmp-noprefix-imm.d: Likewise. * testsuite/gas/arm/vcvt-bad.d: Likewise. * testsuite/gas/arm/vfma1.d: Likewise. * testsuite/gas/arm/vldconst.d: Likewise. * testsuite/gas/arm/vldconst_be.d: Likewise. * testsuite/gas/arm/vldm-arm.d: Likewise. * testsuite/gas/arm/vldr.d: Likewise. * testsuite/gas/arm/weakdef-1.d: Likewise. * testsuite/gas/arm/weakdef-2.d: Likewise. * config/te-riscix.h: Delete. * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am: Remove arm-aout and arm-coff support. * configure.tgt: Likewise. * testsuite/ld-arm/attr-merge-div-00.d: Likewise. * testsuite/ld-arm/attr-merge-div-01-m3.d: Likewise. * testsuite/ld-arm/attr-merge-div-01.d: Likewise. * testsuite/ld-arm/attr-merge-div-02.d: Likewise. * testsuite/ld-arm/attr-merge-div-10-m3.d: Likewise. * testsuite/ld-arm/attr-merge-div-10.d: Likewise. * testsuite/ld-arm/attr-merge-div-11.d: Likewise. * testsuite/ld-arm/attr-merge-div-12.d: Likewise. * testsuite/ld-arm/attr-merge-div-120.d: Likewise. * testsuite/ld-arm/attr-merge-div-20.d: Likewise. * testsuite/ld-arm/attr-merge-div-21.d: Likewise. * testsuite/ld-arm/attr-merge-div-22.d: Likewise. * testsuite/ld-arm/attr-merge-hardfp-use-1.d: Likewise. * testsuite/ld-arm/attr-merge-hardfp-use-2.d: Likewise. * testsuite/ld-arm/attr-merge-nosection-1.d: Likewise. * testsuite/ld-arm/attr-merge-unknown-2.d: Likewise. * testsuite/ld-arm/attr-merge-unknown-2r.d: Likewise. * testsuite/ld-arm/attr-merge-unknown-3.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-1.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-10.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-10r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-11.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-11r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-12.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-12r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-13.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-13r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-14.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-14r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-1r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-2.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-2r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-3.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-4.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-5.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-6.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-6r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-7.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-8.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-8r.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-9.d: Likewise. * testsuite/ld-arm/attr-merge-vfp-9r.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-00-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-00.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-02-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-02.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-04-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-04.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-20-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-20.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-22-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-22.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-24-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-40-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-40.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-42-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-44-nowarn.d: Likewise. * testsuite/ld-arm/attr-merge-wchar-44.d: Likewise. * testsuite/ld-arm/eabi-hard-float.d: Likewise. * testsuite/ld-arm/eabi-soft-float-ABI4.d: Likewise. * testsuite/ld-arm/eabi-soft-float-r.d: Likewise. * testsuite/ld-arm/eabi-soft-float.d: Likewise. * testsuite/ld-arm/gc-hidden-1.d: Likewise. * emulparams/armaoutb.sh: Delete. * emulparams/armaoutl.sh: Delete. * emulparams/armcoff.sh: Delete. * emulparams/armnbsd.sh: Delete. * emulparams/riscix.sh: Delete. * scripttempl/armaout.sc: Delete. * scripttempl/armcoff.sc: Delete. * scripttempl/riscix.sc: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
2018-04-25Automatic date update in version.inGDB Administrator1-1/+1
2018-04-24Fix internal error caused by conflicting default version definitions.Cary Coutant12-22/+196
gold/ PR gold/16504 * dynobj.cc (Versions::symbol_section_contents): Don't set VERSYM_HIDDEN flag for undefined symbols. * symtab.cc (Symbol_table::add_from_object): Don't override default version definition with a different default version. * symtab.h (Symbol::from_dyn): New method. * testsuite/plugin_test.c (struct sym_info): Add ver field. (claim_file_hook): Pass symbol version to plugin API. (parse_readelf_line): Parse symbol version. * testsuite/Makefile.am (ver_test_pr16504): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/ver_test_pr16504.sh: New test script. * testsuite/ver_test_pr16504_a.c: New source file. * testsuite/ver_test_pr16504_a.script: New version script. * testsuite/ver_test_pr16504_b.c: New source file. * testsuite/ver_test_pr16504_b.script: New version script.
2018-04-24Enable 'set print inferior-events' and improve detach/fork/kill/exit messagesSergio Durigan Junior20-62/+266
This patch aims to turn 'set print inferior-events' always on, and do some cleanup on the messages printed by GDB when various inferior events happen (attach, detach, fork, kill, exit). To make sure that the patch is correct, I've tested it with a handful of combinations of 'set follow-fork-mode', 'set detach-on-fork' and 'set print inferior-events'. In the end, I decided to make my hand-made test into an official testcase. More on that below. Using the following program as an example: #include <unistd.h> int main () { fork (); return 0; } We see the following outputs from the patched GDB: - With 'set print inferior-events on': (gdb) r Starting program: a.out [Detaching after fork from child process 27749] [Inferior 1 (process 27745) exited normally] (gdb) - With 'set print inferior-events off': (gdb) r Starting program: a.out [Inferior 1 (process 27823) exited normally] (gdb) Comparing this against an unpatched GDB: - With 'set print inferior-events off' and 'set follow-fork-mode child': (gdb) r Starting program: a.out [Inferior 2 (process 5993) exited normally] (gdb) Compare this against an unpatched GDB: (unpatched-gdb) r Starting program: a.out [New process 5702] [Inferior 2 (process 5702) exited normally] (unpatched-gdb) It is possible to notice that, in this scenario, the patched GDB will lose the '[New process %d]' message. - With 'set print inferior-events on', 'set follow-fork-mode child' and 'set detach-on-fork on': (gdb) r Starting program: a.out [Attaching after process 27905 fork to child process 27909] [New inferior 2 (process 27909)] [Detaching after fork from parent process 27905] [Inferior 1 (process 27905) detached] [Inferior 2 (process 27909) exited normally] (gdb) Compare this output with an unpatched GDB, using the same settings: (unpatched-gdb) r Starting program: a.out [New inferior 28033] [Inferior 28029 detached] [New process 28033] [Inferior 2 (process 28033) exited normally] [Inferior 28033 exited] (unpatched-gdb) As can be seen above, I've also made a few modifications to messages that are printed when 'set print inferior-events' is on. For example, a few of the messages did not contain the '[' and ']' as prefix/suffix, which led to a few inconsistencies like: Attaching after process 22995 fork to child process 22999. [New inferior 22999] Detaching after fork from child process 22999. [Inferior 22995 detached] [Inferior 2 (process 22999) exited normally] So I took the opportunity and included the square brackets where applicable. I have also made the existing messages more uniform, by always printing "Inferior %d (process %d)..." where applicable. This makes it easier to identify the inferior number and the PID number from the messages. As suggested by Pedro, the "[Inferior %d exited]" message from 'exit_inferior' has been removed, because it got duplicated when 'inferior-events' is on. I'm also using the 'add_{thread,inferior}_silent' versions (instead of their verbose counterparts) on some locations, also to avoid duplicated messages. For example, a patched GDB with 'set print inferior-events on', 'set detach-on-fork on' and 'set follow-fork-mode child', but using 'add_thread', would print: (gdb) run Starting program: a.out [Attaching after process 25088 fork to child process 25092.] [New inferior 25092] <--- duplicated [Detaching after fork from child process 25092.] [Inferior 25088 detached] [New process 25092] <--- duplicated [Inferior 2 (process 25092) exited normally] But if we use 'add_thread_silent' (with the same configuration as before): (gdb) run Starting program: a.out [Attaching after process 31606 fork to child process 31610] [New inferior 2 (process 31610)] [Detaching after fork from parent process 31606] [Inferior 1 (process 31606) detached] [Inferior 2 (process 31610) exited normally] As for the tests, the configuration options being exercised are: - follow-fork-mode: child/parent - detach-on-fork: on/off - print inferior-events: on/off It was also necessary to perform adjustments on several testcases, because the expected messages changed considerably. Built and regtested on BuildBot, without regressions. gdb/ChangeLog: 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com> Sergio Durigan Junior <sergiodj@redhat.com> Pedro Alves <palves@redhat.com> * infcmd.c (kill_command): Print message when inferior has been killed. * inferior.c (print_inferior_events): Remove 'static'. Set as '1'. (add_inferior): Improve message printed when 'print_inferior_events' is on. (exit_inferior): Remove message printed when 'print_inferior_events' is on. (detach_inferior): Improve message printed when 'print_inferior_events' is on. (initialize_inferiors): Use 'add_inferior_silent' to set 'current_inferior_'. * inferior.h (print_inferior_events): Declare here as 'extern'. * infrun.c (follow_fork_inferior): Print '[Attaching...]' or '[Detaching...]' messages when 'print_inferior_events' is on. Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']' as prefix/suffix for messages. Remove periods. Fix erroneous 'Detaching after fork from child...', replace it by '... from parent...'. (handle_vfork_child_exec_or_exit): Add '[' and ']' as prefix/suffix when printing 'Detaching...' messages. Print them when 'print_inferior_events' is on. * remote.c (remote_detach_1): Print message when detaching from inferior and '!is_fork_parent'. gdb/testsuite/ChangeLog: 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com> Sergio Durigan Junior <sergiodj@redhat.com> Pedro Alves <palves@redhat.com> * gdb.base/attach-non-pgrp-leader.exp: Adjust 'Detaching...' regexps to expect for '[Inferior ... detached]' as well. * gdb.base/attach.exp: Likewise. * gdb.base/catch-syscall.exp (check_for_program_end): Adjust "gdb_continue_to_end". (test_catch_syscall_with_wrong_args): Likewise. * gdb.base/foll-fork.exp: Adjust regexps to match '[' and ']'. Don't set 'verbose' on. * gdb.base/foll-vfork.exp: Likewise. * gdb.base/fork-print-inferior-events.c: New file. * gdb.base/fork-print-inferior-events.exp: New file. * gdb.base/hook-stop.exp: Adjust regexps to expect for new '[Inferior ... has been killed]' message. * gdb.base/kill-after-signal.exp: Likewise. * gdb.base/solib-overlap.exp: Adjust regexps to expect for new detach message. * gdb.threads/kill.exp: Adjust regexps to expect for new kill message. * gdb.threads/clone-attach-detach.exp: Adjust 'Detaching...' regexps to expect for '[Inferior ... detached]' as well. * gdb.threads/process-dies-while-detaching.exp: Likewise.
2018-04-24Fix an illegal memory access when trying to copy an ELF binary with corrupt ↵Nick Clifton2-1/+12
section symbols. PR 23113 * elf.c (ignore_section_sym): Check for the output_section pointer being NULL before dereferencing it.
2018-04-24Fix an illegal memory access when copying a PE format file with corrupt ↵Nick Clifton3-2984/+2662
debug information. PR 23110 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for a negative PE_DEBUG_DATA size before iterating over the debug data.
2018-04-24info-shared.exp: Replace libs=-ldl with shlib_loadSimon Marchi2-1/+6
As reported in PR 23104, -ldl doesn't work on FreeBSD. Replace it with shlib_load, which adds the right flags for dynamic library loading based on the current target platform. The test still passes on Linux, and should now pass on FreeBSD, though I did not test personally. gdb/testsuite/ChangeLog: PR gdb/23104 * gdb.base/info-shared.exp: Replace libs=-ldl with shlib_load.
2018-04-24Reindent cli-out.hTom Tromey2-7/+13
I noticed that cli-out.h had incorrect indentation in some spots. This fixes it. ChangeLog 2018-04-24 Tom Tromey <tom@tromey.com> * cli-out.h: Reindent.
2018-04-24Remove cli_ui_out::out_field_fmtTom Tromey3-19/+7
I noticed that cli_ui_out::out_field_fmt is only used by a single caller, and it can easily be replaced by fputs_filtered. So, this patch removes it. ChangeLog 2018-04-24 Tom Tromey <tom@tromey.com> * cli-out.c (cli_ui_out::out_field_fmt): Remove. (cli_ui_out::do_field_string): Use fputs_filtered. * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
2018-04-24Automatic date update in version.inGDB Administrator1-1/+1
2018-04-23Remove a cleanup from scm-frame.cTom Tromey2-29/+30
This removes a cleanup from scm-frame.c, replacing it with unique_xmalloc_ptr and a new scope. I believe this also fixes a latent bug involving calling do_cleanups twice for a single cleanup. Regression tested using the gdb.guile test suite on x86-64 Fedora 26. ChangeLog 2018-04-23 Tom Tromey <tom@tromey.com> * guile/scm-frame.c (gdbscm_frame_read_var): Use gdb::unique_xmalloc_ptr.
2018-04-23Regenerate gdb/configure and gdbserver/configureTom Tromey4-24/+39
Pedro pointed out that gdb/configure and gdbserver/configure weren't updated after some recent *.m4 changes. This patch rebuilds those files. Tested by rebuilding. Pedro approved this in the thread where he raised this issue, so I'm pushing it in. ChangeLog 2018-04-23 Tom Tromey <tom@tromey.com> * configure: Rebuild. gdbserver/ChangeLog 2018-04-23 Tom Tromey <tom@tromey.com> * configure: Rebuild.
2018-04-23Revert bfd part of "Silence gcc-8 warnings"Alan Modra3-20/+5
The gcc warning has been fixed, and the patch regressed builds with some older versions of gcc. * elf-linux-core.h: Revert last change. * elf.c: Likewise.
2018-04-23Prevent an illegal memory access in gprof by ensuring that string tables for ↵Nick Clifton2-3/+16
aout format files are always zero-terminated. PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it.
2018-04-23Silence gcc-8 warningsAlan Modra7-6/+46
All of these warnings were false positives. -Wstringop-truncation is particularly annoying when it warns about strncpy used quite correctly. bfd/ * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable gcc-8 string truncation warning. (swap_linux_prpsinfo32_ugid16_out): Likewise. (swap_linux_prpsinfo64_ugid32_out): Likewise. (swap_linux_prpsinfo64_ugid16_out): Likewise. * elf.c (elfcore_write_prpsinfo): Likewise. gas/ * stabs.c (generate_asm_file): Use memcpy rather than strncpy. Remove call to strlen inside loop. * config/tc-cr16.c (getreg_image): Warning fix. * config/tc-crx.c (getreg_image): Warning fix.
2018-04-23Automatic date update in version.inGDB Administrator1-1/+1
2018-04-22Fixed test case to compile & run on FreeBSDRajendra SY2-2/+13
Problems: 1. linking -dl lib on FreeBSD platform 2. backtrace from ld-elf shows r_debug_state() instead of _dl_debug_state() Cause: 1. There is no dl library on FreeBSD platform test has to ignore linking "-ldl" 2. The stop due to a shared library event shows backtrace frame #0 function as r_debug_state() gdb/ChangeLog: PR gdb/23095 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to prepare_for_testing. Set normal_bp to r_debug_state if target is bsd.
2018-04-22Automatic date update in version.inGDB Administrator1-1/+1
2018-04-21FreeBSD: Fix 'Couldn't get registers: Device busy' error (PR gdb/23077)Pedro Alves3-2/+15
As Rajendra SY reported at <https://sourceware.org/ml/gdb-patches/2018-04/msg00399.html>, several attach-related tests are failing on FreeBSD. The "attach" command errors with "Couldn't get registers: Device busy". When the "attach" command is executed, it calls target_attach -> inf_ptrace_attach, which just does the ptrace(PT_ATTACH), it does not wait for the child to stop with SIGSTOP. Afterwards, the command is complete and we go back to the event loop. The event loop wakes up and we end up in target_wait -> fbsd_wait, and handle the SIGSTOP stop. At the end of execute_command, though, before going back to the event loop, we check if the frame language changed via check_frame_language_change(). That reads the current PC, which is what leads to the registers read that fails. The problem is that we fail to mark the attached-to thread as executing between the initial attach, and the subsequent target_wait. Until we see the thread stop with SIGSTOP, we shouldn't try to read registers off of it. I guess there may a timing issue here - if you're "lucky", the thread may stop before gdb reads its registers, masking the problem. With that fixed, check_frame_language_change() becomes a nop until the thread is marked not-executing again, after target_wait is called and we go through handle_inferior_event -> normal_stop. We haven't seen the problem on Linux because there, the target_attach implementation waits for the thread to stop before returning. Still, that's supposedly hidden from the core, since the Linux target, like most targets, is a '!to_attach_no_wait' target. This fixes: FAIL: gdb.base/attach.exp: attach1, after setting file FAIL: gdb.base/attach.exp: attach2, with no file FAIL: gdb.base/attach.exp: load file manually, after attach2 (re-read) (got interactive prompt) FAIL: gdb.base/attach.exp: attach when process' a.out not in cwd FAIL: gdb.base/dprintf-detach.exp: bai=on ds=gdb dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=on ds=gdb dd=off: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=on ds=call dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=on ds=call dd=off: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=on ds=agent dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=on ds=agent dd=off: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=gdb dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=gdb dd=off: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=call dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=call dd=off: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=agent dd=on: re-attach to inferior FAIL: gdb.base/dprintf-detach.exp: bai=off ds=agent dd=off: re-attach to inferior gdb/ChangeLog: 2018-04-21 Pedro Alves <palves@redhat.com> Rajendra SY <rajendra.sy@gmail.com> * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing. * remote.c (extended_remote_attach): In all-stop mode, mark the thread as executing.
2018-04-21Test that gcc -B picks up new ldAlan Modra2-0/+23
gcc configured using --with-ld always uses that particular version of ld if it exists. This patch adds a check that the ld version reported directly from ld-new matches that reported via gcc. I chose to compare the ld --version output rather than a more strict test (for example by gcc --print-prog-name=ld), because the version test allows a user to run the ld testsuite after installing a new ld (in the place expected by gcc). Sample output: Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/alan/src/binutils-gdb/ld/testsuite/config/default.exp as tool-and-target-specific interface file. ERROR: ************************************************************************ ERROR: Your compiler driver ignores -B when choosing ld. ERROR: You will not be testing the new ld in many of the following tests. ERROR: It seems you will be testing /usr/bin/x86_64-w64-mingw32-ld instead. ERROR: ************************************************************************ WARNING: Assuming target board is the local machine (which is probably wrong). You may need to set your DEJAGNU environment variable. Running /home/alan/src/binutils-gdb/ld/testsuite/ld-aarch64/aarch64-elf.exp ... * testsuite/lib/ld-lib.exp (run_host_cmd): Check that gcc -B works.
2018-04-21Automatic date update in version.inGDB Administrator1-1/+1
2018-04-20RISC-V: Add new option -mrelax/-mno-relax.Jim Wilson7-0/+80
gas/ * config/tc-riscv.c (options): Add OPTION_RELAX and OPTION_NO_RELAX. (md_longopts): New option -mrelax and -mno-relax. (md_parse_option): Handle -mrelax and -mno-relax. * doc/c-riscv.texi: Document for -mrelax and -mno-relax. * testsuite/gas/riscv/no-relax-reloc.d: New. * testsuite/gas/riscv/no-relax-reloc.s: New. * testsuite/gas/riscv/relax-reloc.d: New. * testsuite/gas/riscv/relax-reloc.s: New.
2018-04-20Improve on-line help for thread_apply_command and thread_apply_all_command.Philippe Waroquiers1-3/+5
Add a Usage: line for thread_apply_command, in particular to mention the thread ID list. In thread_apply_command and thread_apply_all_command help, use uppercase for arg names, as this style seems to be more standard. 2018-04-20 Philippe Waroquiers <philippe.waroquiers@skynet.be> * thread.c (_initialize_thread): improve on-line help for thread_apply_command and thread_apply_all_command.
2018-04-20PR22978, TLS local-dynamic incorrectly linked on hppa-linuxAlan Modra2-32/+48
We were emitting dynamic relocs on the second word of a TLS GD GOT entry pair (the dtprel offset), without the addend necessary when no symbol is present on the dynamic reloc. Unfortunately the simple solution of providing the proper addend doesn't work due to an hppa glibc ld.so bug that ignores such addends. So instead optimize the relocs. The dtprel offset is known at link time for locally defined symbols (the only case where we'll end up with no symbol on a dynamic reloc) so we can omit the dynamic reloc in that case. Furthermore, we can omit a dynamic reloc on the first word of a TLS GD GOT entry pair (the module id) if the symbol is local and we are producing an executable. Similarly, a tprel reloc on a TLS IE GOT entry is not needed for local symbols in an executable. So the condition for TLS GOT relocs can become bfd_link_dll(info) rather than bfd_link_pic(info) as needed for normal GOT relocs. This all presumes hppa ld.so doesn't need to differentiate TLS GD GOT pairs from TLS LD GOT pairs, which is currently true. PR 22978 * elf32-hppa.c (got_relocs_needed): Add extra param to special case both dtprel and tprel relocs. (allocate_dynrelocs): Adjust conditions for got relocs. (elf32_hppa_relocate_section): Likewise for local sym got relocs. Emit dynamic relocs on TLS GOT entries for shared libraries, not when pic. Omit dynamic reloc on dtprel entry when local, and on tprel entry when local and executable.
2018-04-20Updated Spanish translation for gas sub-directoryNick Clifton2-923/+730
2018-04-19Add test case for a known hang in infrunRichard Bunt3-0/+188
The hang occurs when GDB tries to call inferior functions on two different threads with scheduler-locking turned on. The first call works fine, with the call to infrun_async(1) causing the signal_handler to be marked and the event to be handled, but then the event loop resets the "ready" member to zero, while leaving infrun_is_async set to 1. As a result, GDB hangs if the user switches to another thread and calls a second function because calling infrun_async(1) a second time has no effect, meaning the inferior call events are never handled. The added test case provokes the above issue. gdb/testsuite/ChangeLog: * gdb.threads/multiple-successive-infcall.c: New test. * gdb.threads/multiple-successive-infcall.exp: New file.
2018-04-20Automatic date update in version.inGDB Administrator1-1/+1
2018-04-19[OB PATCH] Fix some comments in thread.cPhilippe Waroquiers2-5/+9
Fix some typos. Remove obsolete comment about dispatch to thread_apply_command, rather tell that thread_command either switches to a thread, or prints the current thread. 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be> * thread.c (thread_apply_all_command): Fix comment. (thread_command): Fix comment.