aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-03Add basic Linux kernel supportlkd-ibm-v4Philipp Rudo
This patch implements a basic target_ops for Linux kernel support. In particular it models Linux tasks as GDB threads such that you are able to change to a given thread, get backtraces, disassemble the current frame etc.. To simplify matters this patch only supports static targets, i.e. core dumps. Support for live targets will be provided in a separate patch. gdb/ChangeLog: * gdbarch.sh (lk_init_private): New hook. * gdbarch.h: Regenerated. * gdbarch.c: Regenerated. * lk-low.h: New file. * lk-low.c: New file. * lk-lists.h: New file. * lk-lists.c: New file. * Makefile.in (SFILES, ALLDEPFILES): Add lk-low.c and lk-lists.c. (HFILES_NO_SRCDIR): Add lk-low.h and lk-lists.h. (ALL_TARGET_OBS): Add lk-low.o and lk-lists.o. * configure.tgt (lk_target_obs): New variable with object files for Linux kernel support. (s390*-*-linux*): Add lk_target_obs.
2017-08-02MIPS: Factor out FPU type naming in `gdbarch' debugHEADmasterMaciej W. Rozycki
Replace chains of conditional expressions used in target-dependent MIPS `gdbarch' debug output to get a textual name of the FPU type with calls to a helper decoder function, improving code readability. No functional change. gdb/ * mips-tdep.c (mips_fpu_type_str): New function. (mips_dump_tdep): Call it.
2017-08-02Check ELF section header only for ELF outputH.J. Lu
When placing an orphan input section, check ELF section header only for ELF output. PR ld/21884 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Check ELF section header only for ELF output. * testsuite/ld-elf/pr21884.d: New test. * testsuite/ld-elf/pr21884.t: Likewise. * testsuite/ld-elf/pr21884a.s: Likewise. * testsuite/ld-elf/pr21884b.s: Likewise.
2017-08-02Revert the last change to emultempl/elf32.emH.J. Lu
It will be replaced by a different fix. * emultempl/elf32.em (_place_orphan): Revert the last change.
2017-08-02Add support for creating archives of slim-LTO modules using MRi script commands.Nick Clifton
PR 21702 * arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD command.
2017-08-02Fix assertion failure for xtensa linker.Max Filippov
* emultempl/xtensaelf.em (xtensa_wild_group_interleave_callback): Only check for by_name sorting.
2017-08-02Fix seg-fault when trying to place non-ELF orphan sections.Nick Clifton
PR 21884 * emultempl/elf32.em (_place_orphan): Skip non-ELF binaries when looking for sections to merge.
2017-08-02Fix potential illegal memory access in Xtensa port.Max Filippov
* xtensa-isa.c (xtensa_isa_init): Don't update lookup table entries for sysregs with negative indices.
2017-08-02Fix gas and binutils testsuite failures for am33_2.0-linux target.Nick Clifton
gas * testsuite/gas/all/gas.exp: Add am33 to the skip lists of tests passed over by the mn10300 target. * testsuite/gas/elf/elf.exp: Likewise. * testsuite/gas/elf/dwarf2-11.d: Correct skip of am33 target. * testsuite/gas/elf/dwarf2-12.d: Likewise. * testsuite/gas/elf/dwarf2-13.d: Likewise. * testsuite/gas/elf/dwarf2-14.d: Likewise. * testsuite/gas/elf/dwarf2-15.d: Likewise. * testsuite/gas/elf/dwarf2-16.d: Likewise. * testsuite/gas/elf/dwarf2-17.d: Likewise. * testsuite/gas/elf/dwarf2-18.d: Likewise. * testsuite/gas/elf/dwarf2-5.d: Likewise. * testsuite/gas/elf/dwarf2-6.d: Likewise. * testsuite/gas/elf/dwarf2-7.d: Likewise. binutils * testsuite/binutils-all/objdump.exp (cpus_expected): Add am33-2.
2017-08-02Teach readelf about IA64 MSB relocs.Alan Modra
* readelf.c (is_32bit_abs_reloc): Add R_IA64_SECREL32MSB and R_IA64_DIR32MSB. (is_64bit_abs_reloc): Add R_IA64_DIR64MSB. (is_64bit_pcrel_reloc): Add R_IA64_PCREL64MSB.
2017-08-02Automatic date update in version.inGDB Administrator
2017-08-01MIPS: Consistently use MIPS_FPU_TYPE for `gdbarch' memberMaciej W. Rozycki
Complement commit 74ed0bb4148e ("Replace current_gdbarch in *mips*"), <https://sourceware.org/ml/gdb-patches/2008-06/msg00490.html>, and consistently use the MIPS_FPU_TYPE macro to access the `->mips_fpu_type' target-dependent `gdbarch' member. No functional change. gdb/ * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access `->mips_fpu_type'.
2017-08-01S/390: Fix claimfile failuresAndreas Krebbel
This fixes a segfault when trying to access the local_plt field in the s390 specific elf data althoug the underlaying object is a generic elf object. This fixes the following testsuite failures: < FAIL: plugin claimfile replace symbol with source < FAIL: plugin claimfile resolve symbol with source < FAIL: plugin claimfile replace file with source < FAIL: plugin set symbol visibility with source < FAIL: plugin ignore lib with source < FAIL: plugin claimfile replace lib with source < FAIL: plugin 2 with source lib < FAIL: load plugin 2 with source < FAIL: plugin 3 with source lib < FAIL: load plugin 3 with source bfd/ChangeLog: 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it isn't the S/390 specific elf data. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2017-08-01x86: Update segment register check in Intel syntaxH.J. Lu
https://sourceware.org/ml/binutils/2009-04/msg00223.html introduced a new Intel syntax parser which accepts mov eax, fs:gs:[eax] It ignores anything between ':'s after fs and treats mov eax, DWORD PTR fs:foobar:16 mov eax, DWORD PTR fs:foobar:barfoo:16 mov eax, DWORD PTR fs:ds:16 mov eax, DWORD PTR fs:ds:cs:16 as mov eax, DWORD PTR fs:16 This patch updates segment register check and only allows a single ':'. PR gas/21874 * config/tc-i386-intel.c (i386_intel_operand): Update segment register check. * testsuite/gas/i386/intelok.s: Replace "fs:gs:[eax]" with "fs:[eax]". * testsuite/gas/i386/inval-seg.s: Add tests for invalid segment register. * testsuite/gas/i386/x86-64-inval-seg.s: Likewise. * testsuite/gas/i386/inval-seg.l: Updated. * testsuite/gas/i386/x86-64-inval-seg.l: Likewise.
2017-08-01Updated Swedish translation for the binutils sub-directory.Nick Clifton
* po/sv.po: Updated Swedish translation.
2017-08-01[GOLD] PowerPC recreate eh_frame for stubs on each relax passAlan Modra
There is a very small but non-zero probability that a stub group contains stubs on one relax pass, but does not on the next. In that case we would get an FDE covering a zero length address range. (Actually, it's even worse. Alignment padding for stubs can mean the address for the non-existent stubs is past the end of the original section to which stubs are attached, and due to the way do_plt_fde_location calculates the length we can get a negative length.) Fixing this properly requires removing the FDE. Also, I have been implementing the __tls_get_addr_opt support for gold, and that stub needs something other than the default FDE. The necessary FDE will depend on the offset to the __tls_get_addr_opt stub, which of course can change during relaxation. That means at the very least, rewriting the FDE on each pass, possibly changing the FDE size. I think that is better done by completely recreating PLT eh_frame FDEs. * ehframe.cc (Fde::operator==): New. (Cie::remove_fde, Eh_frame::remove_ehframe_for_plt): New. * ehframe.h (Fde::operator==): Declare. (Cie::remove_fde, Eh_frame::remove_ehframe_for_plt): Likewise. * layout.cc (Layout::remove_eh_frame_for_plt): New. * layout.h (Layout::remove_eh_frame_for_plt): Declare. * powerpc.cc (Target_powerpc::do_relax): Remove old eh_frame FDEs. (Stub_table::add_eh_frame): Delete eh_frame_added_ condition. Don't add eh_frame for empty stub section. (Stub_table::remove_eh_frame): New.
2017-08-01Automatic date update in version.inGDB Administrator
2017-07-31Update myself in MAINTAINERSRichard Henderson
2017-07-31Fix bb instructions with double-word condition on hppa.John David Anglin
2017-07-31Improve handling of ADD and SUB relocations on the RISCV target.Kuan-Lin Chen
* elfxx-riscv.c (riscv_elf_add_sub_reloc): New function. * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc. [R_RISCV_ADD16]: Likewise. [R_RISCV_ADD32]: Likewise. [R_RISCV_ADD64]: Likewise. [R_RISCV_SUB6]: Likewise. [R_RISCV_SUB8]: Likewise. [R_RISCV_SUB16]: Likewise. [R_RISCV_SUB32]: Likewise. [R_RISCV_SUB64]: Likewise.
2017-07-31Fix compile time error when using ansidecl.h with an old version of GCC.Nick Clifton
PR 21850 * ansidecl.h (OVERRIDE): Protect check of __cplusplus value with #idef __cplusplus.
2017-07-31Update ChangeLog (missed that in my previous commit)Xavier Roirand
gdb/ * ChangeLog: Add previous commit entry Change-Id: Ic4f07cca66126e73340f032f19a2d5029bf0d40a
2017-07-31[GOLD] PowerPC --no-tls-optimizeAlan Modra
This adds a --no-tls-optimize option for people who want to keep __tls_get_addr calls in an executable rather than optimizing such code sequences to IE/LE. Also tidy some formatting errors, rename a variable to better reflect its use, and tweak two functions that create pairs of GOT entries to first check whether the GOT entry already exists before potentially inserting the header via reserve(2). Without the check it is possible to waste one GOT entry. * options.h (no_tls_optimize): New powerpc option. * powerpc.cc (Target_powerpc::abiversion, set_abiversion): Formatting. (Target_powerpc::stk_toc): Formatting, fix comment. (Target_powerpc::Track_tls::tls_get_addr_state): Rename from tls_get_addr. (Target_powerpc::optimize_tls_gd, optimize_tls_ld, optimize_tls_ie): Return TLSOPT_NONE when !tls_optimize. (Target_powerpc::add_global_pair_with_rel): Check for existing reloc before reserving. (Target_powerpc::add_local_tls_pair): Likewise.
2017-07-31Fix compiling zlib using x86_64-musl.Marty Plummer
PR 21861 * winduni.c (codepages): Use cp1252 for codepage 0.
2017-07-31Fix documentation about rot agent expression bytecodeSimon Marchi
The rot agent expression bytecode rotates the three items on the top of the stack. It is not clear which way the rotation is. However, the documentation currently shows this as the effect of the instructions: a b c => c b a which doesn't make sense, since the value b doesn't move. The two valid possibilities I see are a b c => b c a a b c => c a b depending on which way you rotate. When looking at the gdbserver code, the top of the stack becomes the third item, and the next-to-top item becomes the top. So the second form would be the right one, since in this notation the top of the stack is the rightmost element: a b c => c a b I adjusted the symbolic description and added a bit of text to make it more obvious. gdb/doc/ChangeLog: * agentexpr.texi (rot): Fix symbolic description, improve textual description.
2017-07-31darwin: handle recent version of dyldXavier Roirand
gdb/ * solib-darwin.c (DYLD_VERSION_MAX): Increase value. Change-Id: I45da25f46b3e452d44993b122a994c818d00020b
2017-07-31PR 21847, PowerPC64 --plt-localentry againAlan Modra
This makes ld warn about --plt-localentry if a version of glibc without the necessary ld.so checks is detected, and revises the documentation. bfd/ * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry without ld.so checks. gold/ * powerpc.cc (Target_powerpc::scan_relocs): Warn on --plt-localentry without ld.so checks. ld/ * ld.texinfo (plt-localentry): Revise.
2017-07-31Automatic date update in version.inGDB Administrator
2017-07-30Automatic date update in version.inGDB Administrator
2017-07-29PR 21847, Don't default PowerPC64 to --plt-localentryAlan Modra
The big comment in ppc64_elf_tls_setup says why. I've also added some code to the bfd linker that catches the -lpthread -lc symbol differences and disable generation of optimized call stubs even when --plt-localentry is activated. Gold doesn't yet have that. PR 21847 bfd/ * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry. (ppc64_elf_merge_symbol): Set non_zero_localentry. (is_elfv2_localentry0): Test non_zero_localentry. (ppc64_elf_tls_setup): Default to --no-plt-localentry. gold/ * powerpc.cc (Target_powerpc::scan_relocs): Default to --no-plt-localentry. ld/ * ld.texinfo (plt-localentry): Document.
2017-07-29Automatic date update in version.inGDB Administrator
2017-07-28gold: Add put_ch_reserved to 64-bit Chdr_writeH.J. Lu
The 64-bit ELF compression header has a reserved field. It should be cleared to avoid random bits in it. elfcpp/ PR gold/21857 * elfcpp.h (Chdr_write): Add put_ch_reserved. (Chdr_write<64, true>::put_ch_reserved): New. (Chdr_write<64, false>::put_ch_reserved): Likewise. gold/ PR gold/21857 * compressed_output.cc (Output_compressed_section::set_final_data_size): Call put_ch_reserved to clear the reserved field for 64-bit ELF.
2017-07-28Add missing changelogAndreas Krebbel
2017-07-28S/390: Fix segfault when linking -shared -nostartfilesAndreas Krebbel
Regression-tested on s390x. bfd/ChangeLog: 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL pointer check for htab->elf.irelplt. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2017-07-28Make some improvements to how SORT_* specifiers and EXCLUDE_FILE specifiers ↵Andrew Burgess
are handled in the linker script grammar. * ldgram.y (ldgram_had_keep): Make static. (ldgram_vers_current_lang): Likewise. (filename_spec): New rule. (input_section_spec_no_keep): Use filename_spec. (wildcard_maybe_exclude): New rule. (wildcard_spec): Rename to... (section_name_spec): ...this. (section_NAME_list): Rename to... (section_name_list): ...this. (section_name_spec): Simplifiy and use wildcard_maybe_exclude. * ldlang.c (placed_commons): Delete. (lang_add_wild): No longer set placed_commons. (print_wild_statement): Use full names for SORT specifiers. * testsuite/ld-scripts/align.exp: Run new tests. * testsuite/ld-scripts/align3.d: New file. * testsuite/ld-scripts/align3.t: New file. * testsuite/ld-scripts/align4.d: New file. * testsuite/ld-scripts/align4.t: New file. * testsuite/ld-scripts/align5.d: New file. * testsuite/ld-scripts/align5.t: New file. * testsuite/ld-scripts/exclude-file-5.d: New file. * testsuite/ld-scripts/exclude-file-5.map: New file. * testsuite/ld-scripts/exclude-file-5.t: New file. * testsuite/ld-scripts/exclude-file-6.d: New file. * testsuite/ld-scripts/exclude-file-6.map: New file. * testsuite/ld-scripts/exclude-file-6.t: New file. * NEWS: Mention the changes.
2017-07-28Fix problems parsing RISCV architecture extenstions in the assembler.Andrew Waterman
* config/tc-riscv.c (riscv_set_arch): Handle the Q subset like all other subsets. Obviate use-after-free.
2017-07-28Automatic date update in version.inGDB Administrator
2017-07-27Add myself as a write-after-approval GDB maintainer.Xavier Roirand
gdb/Changelog: 2017-07-27 Xavier Roirand <roirand@adacore.com> * MAINTAINERS (Write After Approval): Add Xavier Roirand. Change-Id: Iee1dae7597da8f2c8c3098c14649ff400a81a388
2017-07-27Move AVR .promemx.* sections into higher memory.Georg-Johann Lay
PR ld/21849 * scripttempl/avr.sc: Split .progmemx.* from .progmem.* and locate former at a higher address.
2017-07-27Fix address violation issues encountered when parsing corrupt binaries.Nick Clifton
PR 21840 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab size is -1. * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion with error return. * section.c (bfd_make_section_with_flags): Fail if the name or bfd are NULL. * vms-alpha.c (bfd_make_section_with_flags): Correct computation of end pointer. (evax_bfd_print_emh): Check for invalid string lengths.
2017-07-27Automatic date update in version.inGDB Administrator
2017-07-26Gold: Fix mips.cc for GCC 4.2H.J. Lu
GCC 4.2 fails to compile "(uint64_t) 0x800080008000" with error: integer constant is too large for ‘long’ type This patch adds "llu" suffix to 0x800080008000 for GCC 4.2. * mips.cc (Mips_relocate_functions): Add "llu" suffix to 0x800080008000.
2017-07-26Add "maint check xml-descriptions" to test builtin xml target descriptionsYao Qi
Now, GDB is able to dynamically create i386-linux target descriptions from features, instead of using pre-generated target descriptions. These pre-generated target descriptions are no longer used by GDB (note that they are still used by GDBserver). This patch add a new maint command "maint check xml-descriptions" to test dynamically generated tdesc are identical to these generated from xml files. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * cli/cli-cmds.c (maintenancechecklist): New variable. * gdbcmd.h (maintenancechecklist): Declare it. * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]: Call i386_linux_read_description with different masks. * maint.c (maintenance_check_command): New function. (_initialize_maint_cmds): Call add_prefix_cmd. * target-descriptions.c (tdesc_reg): override operator != and ==. (tdesc_type): Likewise. (tdesc_feature): Likewise. (target_desc): Likewise. [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function. (maintenance_check_xml_descriptions): New function. (_initialize_target_descriptions) Add command "xml-descriptions". * target-descriptions.h (selftests::record_xml_tdesc): Declare. gdb/testsuite: 2017-07-26 Yao Qi <yao.qi@linaro.org> * gdb.gdb/unittest.exp: Invoke command "maintenance check xml-descriptions". gdb/doc: 2017-07-26 Yao Qi <yao.qi@linaro.org> * gdb.texinfo (Maintenance Commands): Document command "maint check xml-descriptions".
2017-07-26Lazily and dynamically create i386-linux target descriptionsYao Qi
Instead of using pre-generated target descriptions, this patch changes GDB to lazily and dynamically create target descriptions according to the target hardware capability (xcr0 in i386). This support any combination of target features. Some reg in target description has "regnum" attribute, so its register number is got from the attribute value instead from sequential allocation. <reg name="xmm0" bitsize="128" type="vec128" regnum="32"/> when target description is created, it should match the regnum, so this patch adds a new field m_next_regnum to track it, if attribute number is greater than the m_next_regnum, print the code to set register number explicitly. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c. Include features/i386/32bit-*.c. (i386_linux_read_description): Generate target description if it doesn't exist. (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386 functions. * features/i386/32bit-linux.c: Re-generated. * features/i386/32bit-sse.c: Likewise. * target-descriptions.c (print_c_feature::visit): Print code to set register number if needed. (print_c_feature) <m_next_regnum>: New field.
2017-07-26Generate c for feature instead of tdescYao Qi
This patch changes Makefile and command "maint print c-files" so that GDB can print c files for features instead target description. Previously, we feed GDB a target description xml file, which generate c files including multiple features. With this patch, in Makefile, we wrap each feature xml file, and create a temp target description which include only one feature. Then, adjust the target description printer for them, and print a c function for each given feature, so that we can use these c functions later to create target description in a flexible way. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * features/Makefile (CFILES): Rename with TDESC_CFILES. (FEATURE_XMLFILES): New. (FEATURE_CFILES): New. New rules. (clean-cfiles): Remove generated c files. * features/i386/32bit-avx.c: Generated. * features/i386/32bit-avx512.c: Generated. * features/i386/32bit-core.c: Generated. * features/i386/32bit-linux.c: Generated. * features/i386/32bit-mpx.c: Generated. * features/i386/32bit-pkeys.c: Generated. * features/i386/32bit-sse.c: Generated. * target-descriptions.c: Include algorithm. (tdesc_element_visitor): Add method visit_end. (print_c_tdesc): Implement visit_end. (print_c_tdesc:: m_filename_after_features): Move it to protected. (print_c_feature): New class. (maint_print_c_tdesc_cmd): Use print_c_feature if XML file name starts with "i386/32bit-".
2017-07-26Use visitor pattern for "maint print c-tdesc"Yao Qi
Target description can be modeled as a tree, the target description is the root node, features are children nodes, registers and types are grand-children nodes. So command "maint print c-tdesc" in effect traverse/visit each node, and print them in c. This can be implemented by visitor pattern, this is the first reason. Secondly, I want to this command prints c files in a different way for some specific xml files, but still print c files the same way for the rest of xml files. Third, I even want to print xml files from target descriptions, so that GDBserver can use it to reply GDB's query qXfer:features:read:target.xml. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * target-descriptions.c (tdesc_element_visitor): New class. (tdesc_element): New class. (tdesc_reg): Inherit from tdesc_element. (tdesc_reg::accept): New function. (tdesc_type): Inherit from tdesc_element. (tdesc_type::accept): New function. (tdesc_feature): Inherit from tdesc_element. (tdesc_feature::accept): New function. (target_desc): Inherit from tdesc_element. (target_desc::target_desc): New. (target_desc::~target_desc): New. (target_desc::accept): New. (allocate_target_description): Use new. (free_target_description): Use delete. (print_c_tdesc): New class. (maint_print_c_tdesc_cmd): Adjust. * features/aarch64.c: Re-generated. * features/arc-arcompact.c: Re-generated. * features/arc-v2.c: Re-generated. * features/arm/arm-with-iwmmxt.c: Re-generated. * features/arm/arm-with-m.c: Re-generated. * features/arm/arm-with-m-fpa-layout.c: Re-generated. * features/arm/arm-with-m-vfp-d16.c: Re-generated. * features/arm/arm-with-neon.c: Re-generated. * features/arm/arm-with-vfpv2.c: Re-generated. * features/arm/arm-with-vfpv3.c: Re-generated. * features/i386/amd64-avx-avx512.c: Re-generated. * features/i386/amd64-avx-avx512-linux.c: Re-generated. * features/i386/amd64-avx.c: Re-generated. * features/i386/amd64-avx-linux.c: Re-generated. * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated. * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated. * features/i386/amd64-avx-mpx.c: Re-generated. * features/i386/amd64-avx-mpx-linux.c: Re-generated. * features/i386/amd64.c: Re-generated. * features/i386/amd64-linux.c: Re-generated. * features/i386/amd64-mpx.c: Re-generated. * features/i386/amd64-mpx-linux.c: Re-generated. * features/i386/i386-avx-avx512.c: Re-generated. * features/i386/i386-avx-avx512-linux.c: Re-generated. * features/i386/i386-avx.c: Re-generated. * features/i386/i386-avx-linux.c: Re-generated. * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated. * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated. * features/i386/i386-avx-mpx.c: Re-generated. * features/i386/i386-avx-mpx-linux.c: Re-generated. * features/i386/i386.c: Re-generated. * features/i386/i386-linux.c: Re-generated. * features/i386/i386-mmx.c: Re-generated. * features/i386/i386-mmx-linux.c: Re-generated. * features/i386/i386-mpx.c: Re-generated. * features/i386/i386-mpx-linux.c: Re-generated. * features/i386/x32-avx-avx512.c: Re-generated. * features/i386/x32-avx-avx512-linux.c: Re-generated. * features/i386/x32-avx.c: Re-generated. * features/i386/x32-avx-linux.c: Re-generated. * features/i386/x32.c: Re-generated. * features/i386/x32-linux.c: Re-generated. * features/microblaze.c: Re-generated. * features/microblaze-with-stack-protect.c: Re-generated. * features/mips64-dsp-linux.c: Re-generated. * features/mips64-linux.c: Re-generated. * features/mips-dsp-linux.c: Re-generated. * features/mips-linux.c: Re-generated. * features/nds32.c: Re-generated. * features/nios2.c: Re-generated. * features/nios2-linux.c: Re-generated. * features/rs6000/powerpc-32.c: Re-generated. * features/rs6000/powerpc-32l.c: Re-generated. * features/rs6000/powerpc-403.c: Re-generated. * features/rs6000/powerpc-403gc.c : Re-generated. * features/rs6000/powerpc-405.c: Re-generated. * features/rs6000/powerpc-505.c: Re-generated. * features/rs6000/powerpc-601.c: Re-generated. * features/rs6000/powerpc-602.c: Re-generated. * features/rs6000/powerpc-603.c: Re-generated. * features/rs6000/powerpc-604.c: Re-generated. * features/rs6000/powerpc-64.c: Re-generated. * features/rs6000/powerpc-64l.c: Re-generated. * features/rs6000/powerpc-7400.c: Re-generated. * features/rs6000/powerpc-750.c: Re-generated. * features/rs6000/powerpc-860.c: Re-generated. * features/rs6000/powerpc-altivec32.c: Re-generated. * features/rs6000/powerpc-altivec32l.c: Re-generated. * features/rs6000/powerpc-altivec64.c: Re-generated. * features/rs6000/powerpc-altivec64l.c: Re-generated. * features/rs6000/powerpc-cell32l.c: Re-generated. * features/rs6000/powerpc-cell64l.c: Re-generated. * features/rs6000/powerpc-e500.c: Re-generated. * features/rs6000/powerpc-e500l.c: Re-generated. * features/rs6000/powerpc-isa205-32l.c: Re-generated. * features/rs6000/powerpc-isa205-64l.c: Re-generated. * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated. * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated. * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated. * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated. * features/rs6000/powerpc-vsx32.c: Re-generated. * features/rs6000/powerpc-vsx32l.c: Re-generated. * features/rs6000/powerpc-vsx64.c: Re-generated. * features/rs6000/powerpc-vsx64l.c: Re-generated. * features/rs6000/rs6000.c: Re-generated. * features/s390-linux32.c: Re-generated. * features/s390-linux32v1.c: Re-generated. * features/s390-linux32v2.c: Re-generated. * features/s390-linux64.c: Re-generated. * features/s390-linux64v1.c: Re-generated. * features/s390-linux64v2.c: Re-generated. * features/s390-te-linux64.c: Re-generated. * features/s390-tevx-linux64.c: Re-generated. * features/s390-vx-linux64.c: Re-generated. * features/s390x-linux64.c: Re-generated. * features/s390x-linux64v1.c: Re-generated. * features/s390x-linux64v2.c: Re-generated. * features/s390x-te-linux64.c: Re-generated. * features/s390x-tevx-linux64.c: Re-generated. * features/s390x-vx-linux64.c: Re-generated. * features/sparc/sparc32-solaris.c: Re-generated. * features/sparc/sparc64-solaris.c: Re-generated. * features/tic6x-c62x.c: Re-generated. * features/tic6x-c62x-linux.c: Re-generated. * features/tic6x-c64x.c: Re-generated. * features/tic6x-c64x-linux.c: Re-generated. * features/tic6x-c64xp.c: Re-generated. * features/tic6x-c64xp-linux.c: Re-generated.
2017-07-26Centralize i386 linux target descriptionsYao Qi
This patch moves all the tdesc_i386*_linux target descriptions to a function i386_linux_read_description, which returns the right target description according to xcr0. This also remove the duplication in getting target descriptions in corefile and native target. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * i386-linux-tdep.c (i386_linux_read_description): New function. (i386_linux_core_read_description): Call i386_linux_read_description. * i386-linux-tdep.h (i386_linux_read_description): Declare. (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations. (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise. (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise. * x86-linux-nat.c (x86_linux_read_description): Call i386_linux_read_description.
2017-07-26Add optional argument to command "maint prints c-tdesc"Yao Qi
Nowadays, we need two steps to print c files for xml target description, that is, 1) read xml target description in, update the current tdesc, 2) visit the current tdesc, print the c file. It is unnecessary to involve in current tdesc, and some validations in each gdbarch are performed unnecessarily, which will reject some target descriptions if they are missing some mandatory feature. This patch adds an optional argument to "maint print c-tdesc", which is an XML file target description, so that we can combine the two steps above into one step, and don't have to involve in global current tdesc. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * NEWS: Mention it. * features/Makefile (%.c: %.xml): Pass the xml file name to command "maint print c-tdesc". * target-descriptions.c (maint_print_c_tdesc_cmd): Get file name from 'arg'. gdb/doc: 2017-07-26 Yao Qi <yao.qi@linaro.org> * gdb.texinfo (Maintenance Commands): Document optional argument of "maint print c-tdesc".
2017-07-26Class-fy target_descYao Qi
This patch adds ctor and dtor in target_desc. gdb: 2017-07-26 Yao Qi <yao.qi@linaro.org> * target-descriptions.c (target_desc): Add ctor and dtor. Do in-class initialization. (tdesc_create_feature): Call new instead of XCNEW. (free_target_description): Ue delete.
2017-07-26Add enum for result of fast_tracepoint_collectingSimon Marchi
I got confused by the result value of fast_tracepoint_collecting, while it sounds like it would return true/false (whether the thread is collecting or not), it actually returns: 0: not collecting 1: in the jump pad, before the relocated instruction 2: in the jump pad, at or after the relocated instruction To avoid confusion, I think it would be nice to make it return an enum. If you can help find a shorter but still relavant name, it would be awesome. Otherwise, we'll go with that, fast_tpoint_collect_result, which is at least consistent with the existing fast_tpoint_collect_status. gdb/gdbserver/ChangeLog: * tracepoint.h (enum class fast_tpoint_collect_result): New enumeration. (fast_tracepoint_collecting): Change return type to fast_tpoint_collect_result. * tracepoint.c (fast_tracepoint_collecting): Likewise. * linux-low.h: Include tracepoint.h. (struct lwp_info) <collecting_fast_tracepoint>: Change type to fast_tpoint_collect_result. * linux-low.c (handle_tracepoints): Adjust. (linux_fast_tracepoint_collecting): Change return type to fast_tpoint_collect_result. (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered, linux_wait_1, stuck_in_jump_pad_callback, lwp_signal_can_be_delivered, linux_resume_one_lwp_throw, proceed_one_lwp): Adjust to type change.