aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-30NIOS2: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez2-10/+21
For Nios II GNU/Linux targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * nios2-linux-tdep.c (NIOS2_GREGS_SIZE): New macro. (nios2_regset_from_core_section): Remove. (nios2_iterate_over_regset_sections): New. (nios2_linux_init_abi): Adjust gdbarch initialization.
2014-09-30MN10300: Migrate from 'regset_from_core_section' to ↵Andreas Arnez2-11/+18
'iterate_over_regset_sections'. For MN10300 GNU/Linux targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * mn10300-linux-tdep.c (am33_regset_from_core_section): Remove. (am33_iterate_over_regset_sections): New. (am33_linux_init_osabi): Adjust gdbarch initialization.
2014-09-30MIPS: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez4-57/+50
For MIPS targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * mips-linux-tdep.c (mips_linux_regset_from_core_section): Remove. (mips_linux_iterate_over_regset_sections): New. (mips_linux_init_abi): Adjust gdbarch initialization. * mips64obsd-tdep.c (mips64obsd_regset_from_core_section): Remove. (mips64obsd_iterate_over_regset_sections): New. (mips64obsd_init_abi): Adjust. * mipsnbsd-tdep.c (mipsnbsd_regset_from_core_section): Remove. (mipsnbsd_iterate_over_regset_sections): New. (mipsnbsd_init_abi): Adjust.
2014-09-30M88K: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez2-11/+15
For M88K targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * m88k-tdep.c (m88k_regset_from_core_section): Remove. (m88k_iterate_over_regset_sections): New. (m88k_gdbarch_init): Adjust gdbarch initialization.
2014-09-30IA64: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez2-15/+15
For IA-64 GNU/Linux targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * ia64-linux-tdep.c (ia64_linux_regset_from_core_section): Remove. (ia64_linux_iterate_over_regset_sections): New. (ia64_linux_init_abi): Adjust gdbarch initialization.
2014-09-30M68K: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez3-31/+29
For m68k BSD and GNU/Linux targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * m68kbsd-tdep.c (m68kbsd_regset_from_core_section): Remove. (m68kbsd_iterate_over_regset_sections): New. (m68kbsd_init_abi): Adjust gdbarch initialization. * m68klinux-tdep.c (m68k_linux_regset_from_core_section): Remove. (m68k_linux_iterate_over_regset_sections): New. (m68k_linux_init_abi): Adjust gdbarch initialization.
2014-09-30M32R: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez2-9/+17
For m32r GNU/Linux targets, don't define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * m32r-linux-tdep.c (M32R_LINUX_GREGS_SIZE): New macro. (m32r_linux_regset_from_core_section): Remove. (m32r_linux_iterate_over_regset_sections): New. (m32r_linux_init_abi): Adjust gdbarch initialization.
2014-09-30X86: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez11-62/+75
For all I386 and AMD64 targets, replace all occurrences of regset_from_core_section by the iterator method. gdb/ChangeLog: * amd64obsd-tdep.c (amd64obsd_regset_from_core_section): Remove. (amd64obsd_iterate_over_regset_sections): New. (amd64obsd_core_init_abi): Adjust gdbarch initialization. * i386-cygwin-tdep.c (i386_windows_regset_from_core_section): Remove. (i386_cygwin_init_abi): Clear tdep->sizeof_fpregset. Drop regset_from_core_section initialization. * i386-tdep.c (i386_regset_from_core_section): Remove. (i386_iterate_over_regset_sections): New. (i386_gdbarch_init): Adjust gdbarch initialization. * i386-tdep.h (i386_regset_from_core_section): Remove prototype. (i386_iterate_over_regset_sections): New prototype. * i386obsd-tdep.c (i386obsd_aout_regset_from_core_section): Remove. (i386obsd_aout_iterate_over_regset_sections): New. (i386obsd_aout_init_abi): Adjust gdbarch initialization. * configure.tgt (gdb_target_obs): Add fbsd-tdep.o for all x86 FreeBSD targets. * amd64fbsd-tdep.c (fbsd-tdep.h): Include. (amd64fbsd_init_abi): Call fbsd_init_abi. * i386fbsd-tdep.c (fbsd-tdep.h): Include. (i386fbsd4_init_abi): Call fbsd_init_abi. * amd64fbsd-nat.c (_initialize_amd64fbsd_nat): No longer set target method 'make_corefile_notes'. * i386fbsd-nat.c (_initialize_i386fbsd_nat): Likewise.
2014-09-30HPPA: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez5-46/+54
For HP PA-RISC targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * hppa-hpux-tdep.c (hppa_hpux_regset_from_core_section): Remove. (hppa_hpux_iterate_over_regset_sections): New. (hppa_hpux_init_abi): Adjust gdbarch initialization. * hppa-linux-tdep.c (hppa_linux_regset_from_core_section): Remove. (hppa_linux_iterate_over_regset_sections): New. (hppa_linux_init_abi): Adjust. * hppanbsd-tdep.c (hppaobsd_regset_from_core_section): Remove. (hppanbsd_iterate_over_regset_sections): New. (hppanbsd_init_abi): Adjust. * hppaobsd-tdep.c (hppaobsd_regset_from_core_section): Remove. (hppaobsd_iterate_over_regset_sections): New. (hppaobsd_init_abi): Adjust.
2014-09-30FRV: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez2-14/+17
For FR-V GNU/Linux targets, no longer define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * frv-linux-tdep.c (frv_linux_regset_from_core_section): Remove. (frv_linux_iterate_over_regset_sections): New. (frv_linux_init_abi): Adjust gdbarch initialization.
2014-09-30ARM: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez4-17/+24
For ARM BSD targets, don't define the gdbarch method 'regset_from_core_section', but the iterator method instead. gdb/ChangeLog: * arm-tdep.h (armbsd_regset_from_core_section): Remove prototype. (armbsd_iterate_over_regset_sections): New prototype. * armbsd-tdep.c (armbsd_regset_from_core_section): Remove. (armbsd_iterate_over_regset_sections): New. * armobsd-tdep.c (armobsd_init_abi): Adjust gdbarch initialization.
2014-09-30ALPHA: Migrate from 'regset_from_core_section' to 'iterate_over_regset_sections'Andreas Arnez6-70/+69
Don't define the 'regset_from_core_section' method, but the iterator method instead. Do this for GNU/Linux- as well as Net/OpenBSD-targets. In the case of GNU/Linux this should enable non-native use of the 'generate-core-file' command. gdb/ChangeLog: * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Remove. (alpha_linux_iterate_over_regset_sections): New. (alpha_linux_init_abi): Adjust gdbarch initialization. * alphabsd-tdep.h (alphanbsd_regset_from_core_section): Remove prototype. (alphanbsd_iterate_over_regset_sections): New prototype. * alphafbsd-tdep.c (alphafbsd_init_abi): Add comment for missing fbsd_init_abi invocation. * alphanbsd-tdep.c (alphanbsd_supply_gregset): Move below alphanbsd_aout_supply_gregset. Invoke the latter for the appropriate size. (alphanbsd_aout_gregset): Remove. (alphanbsd_regset_from_core_section): Remove. (alphanbsd_iterate_over_regset_sections): New. (alphanbsd_init_abi): Adjust gdbarch initialization. * alphaobsd-tdep.c (alphaobsd_init_abi): Likewise.
2014-09-30AARCH64: Migrate from 'regset_from_core_section' to ↵Andreas Arnez2-15/+18
'iterate_over_regset_sections' Don't define the 'regset_from_core_section' method, but the iterator method instead. This slightly reduces the code and enables non-native use of the 'generate-core-file' command. Also, when all instances of 'regset_from_core_section' are replaced, it can be dropped from the gdbarch interface. gdb/ChangeLog: * aarch64-linux-tdep.c (aarch64_linux_regset_from_core_section): Remove. (aarch64_linux_iterate_over_regset_sections): New. (aarch64_linux_init_abi): Adjust gdbarch initialization.
2014-09-30Add multi-arch capable 'fbsd_make_corefile_notes' variantAndreas Arnez4-1/+173
This creates a new version of the FreeBSD core file note generation logic in the new target-dependent file "fbsd-tdep.c". The new version is mostly copied from "fbsd-nat.c", but uses the iterator instead of regset_from_core_section and defines fbsd_make_corefile_notes as a gdbarch method instead of a target method. Consecutive architecture-dependent changes exploit the new version, migrating away from the target method. When all FreeBSD targets are changed, the target method can go away. gdb/ChangeLog: * fbsd-tdep.c: New file. * fbsd-tdep.h: New file. * Makefile.in (ALL_TARGET_OBS): Add fbsd-tdep.o. (HFILES_NO_SRCDIR): Add fbsd-tdep.h. (ALLDEPFILES): Add fbsd-tdep.c.
2014-09-30Add 'regset' parameter to 'iterate_over_regset_sections_cb'Andreas Arnez14-218/+220
This adds the 'regset' parameter to the iterator callback. Consequently the 'regset_from_core_section' method is dropped for all targets that provide the iterator method. This change prepares for replacing regset_from_core_section everywhere, thereby eliminating one gdbarch interface. Since the iterator is usually no more complex than regset_from_core_section alone, targets that previously didn't define core_regset_sections will then gain multi-arch capable core file generation support without increased complexity. gdb/ChangeLog: * gdbarch.sh (iterate_over_regset_sections_cb): Add regset parameter. * gdbarch.h: Regenerate. * corelow.c (sniff_core_bfd): Don't sniff if gdbarch has a regset iterator. (get_core_register_section): Add parameter 'regset' and use it, if set. Add parameter 'min_size' and verify the bfd section size against it. (get_core_registers_cb): Add parameter 'regset' and pass it to get_core_register section. For the "standard" register sections ".reg" and ".reg2", set an appropriate default for human_name. (get_core_registers): Don't abort when the gdbarch has an iterator but no regset_from_core_section. Add NULL/0 for parameters 'regset'/'min_size' in calls to get_core_register_section. * linux-tdep.c (linux_collect_regset_section_cb): Add parameter 'regset' and use it instead of calling the regset_from_core_section gdbarch method. * i386-tdep.h (struct gdbarch_tdep): Add field 'fpregset'. * i386-tdep.c (i386_supply_xstateregset) (i386_collect_xstateregset, i386_xstateregset): Moved to i386-linux-tdep.c. (i386_regset_from_core_section): Drop handling for .reg-xfp and .reg-xstate. (i386_gdbarch_init): Set tdep field 'fpregset'. Enable generic core file support only if the regset iterator hasn't been set. * i386-linux-tdep.c (i386_linux_supply_xstateregset) (i386_linux_collect_xstateregset, i386_linux_xstateregset): New. Moved from i386-tdep.c and renamed to *_linux*. (i386_linux_iterate_over_regset_sections): Add regset parameter to each callback invocation. Allow any .reg-xstate size when reading from a core file. * amd64-tdep.c (amd64_supply_xstateregset) (amd64_collect_xstateregset, amd64_xstateregset): Moved to amd64-linux-tdep.c. (amd64_regset_from_core_section): Remove. (amd64_init_abi): Set new tdep field 'fpregset'. No longer install an amd64-specific regset_from_core_section gdbarch method. * amd64-linux-tdep.c (amd64_linux_supply_xstateregset) (amd64_linux_collect_xstateregset, amd64_linux_xstateregset): New. Moved from amd64-tdep.c and renamed to *_linux*. (amd64_linux_iterate_over_regset_sections): Add regset parameter to each callback invocation. Allow any .reg-xstate size when reading from a core file. * arm-linux-tdep.c (arm_linux_regset_from_core_section): Remove. (arm_linux_iterate_over_regset_sections): Add regset parameter to each callback invocation. (arm_linux_init_abi): No longer set the regset_from_core_section gdbarch method. * ppc-linux-tdep.c (ppc_linux_regset_from_core_section): Remove. (ppc_linux_iterate_over_regset_sections): Add regset parameter to each callback invocation. (ppc_linux_init_abi): No longer set the regset_from_core_section gdbarch method. * s390-linux-tdep.c (struct gdbarch_tdep): Remove the fields gregset, sizeof_gregset, fpregset, and sizeof_fpregset. (s390_regset_from_core_section): Remove. (s390_iterate_over_regset_sections): Add regset parameter to each callback invocation. (s390_gdbarch_init): No longer set the regset_from_core_section gdbarch method. Drop initialization of deleted tdep fields.
2014-09-30Replace 'core_regset_sections' by iterator methodAndreas Arnez12-328/+312
The core_regset_sections list in gdbarch (needed for multi-arch capable core file generation support) is replaced by an iterator method. Overall, this reduces the code a bit, and it allows for more flexibility. gdb/ChangeLog: * amd64-linux-tdep.c (amd64_linux_regset_sections): Remove. (amd64_linux_iterate_over_regset_sections): New. (amd64_linux_init_abi_common): Don't install the regset section list, but the new iterator in gdbarch. * arm-linux-tdep.c (arm_linux_fpa_regset_sections) (arm_linux_vfp_regset_sections): Remove. Move combined logic... (arm_linux_iterate_over_regset_sections): ...here. New function. (arm_linux_init_abi): Set iterator instead of section list. * corelow.c (get_core_registers_cb): New function, logic moved from... (get_core_registers): ...loop body here. Use new iterator method instead of walking through the regset section list. * gdbarch.sh: Remove 'core_regset_sections'. New method 'iterate_over_regset_sections'. New typedef 'iterate_over_regset_sections_cb'. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * i386-linux-tdep.c (i386_linux_regset_sections) (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections): Remove. (i386_linux_iterate_over_regset_sections): New. (i386_linux_init_abi): Don't choose a regset section list, but install new iterator in gdbarch. * linux-tdep.c (struct linux_collect_regset_section_cb_data): New. (linux_collect_regset_section_cb): New function, logic moved from... (linux_collect_thread_registers): ...loop body here. Use iterator method instead of walking through list. (linux_make_corefile_notes_1): Check for presence of iterator method instead of regset section list. * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) (ppc_linux_vmx_regset_sections, ppc_linux_fp_regset_sections) (ppc64_linux_vsx_regset_sections, ppc64_linux_vmx_regset_sections) (ppc64_linux_fp_regset_sections): Remove. Move combined logic... (ppc_linux_iterate_over_regset_sections): ...here. New function. (ppc_linux_init_abi): Don't choose from above regset section lists, but install new iterator in gdbarch. * regset.h (struct core_regset_section): Remove. * s390-linux-tdep.c (struct gdbarch_tdep): Add new fields have_linux_v1, have_linux_v2, and have_tdb. (s390_linux32_regset_sections, s390_linux32v1_regset_sections) (s390_linux32v2_regset_sections, s390_linux64_regset_sections) (s390_linux64v1_regset_sections, s390_linux64v2_regset_sections) (s390x_linux64_regset_sections, s390x_linux64v1_regset_sections) (s390x_linux64v2_regset_sections): Remove. Move combined logic... (s390_iterate_over_regset_sections): ...here. New function. Use new tdep fields. (s390_gdbarch_init): Set new tdep fields. Don't choose from above regset section lists, but install new iterator.
2014-09-30Error in build_executable_own_libs for non-native targetYao Qi2-0/+9
gdb/testsuite: 2014-09-30 Yao Qi <yao@codesourcery.com> * lib/prelink-support.exp (build_executable_own_libs): Error if the target isn't native.
2014-09-30Skip dlopen-libpthread.exp in cross testingYao Qi2-1/+6
I see the following fails on arm-linux-gnueabi, result of ldd build-git/arm/gdb/testsuite/gdb.threads/dlopen-libpthread.so is 1 output of ldd build-git/arm/gdb/testsuite/gdb.threads/dlopen-libpthread.so is not a dynamic executable child process exited abnormally FAIL: gdb.threads/dlopen-libpthread.exp: ldd dlopen-libpthread.so FAIL: gdb.threads/dlopen-libpthread.exp: ldd dlopen-libpthread.so output contains libs the test script invokes ldd (on host) for the target libraries, which is wrong. ldd can't be cross because it invokes dynamic linker with LD_TRACE_LOADED_OBJECTS and gets the dependent libraries. My first reaction to this problem is to execute ld.so on the target (like remote_exec target). When I start to hack proc build_executable_own_libs, I find it has assumptions here and there that the native testing is performed. Then I check the callers of build_executable_own_libs, and they are all skipped if isnative is false. It is reasonable to do the same in dlopen-libpthread.exp too. gdb/testsuite: 2014-09-30 Yao Qi <yao@codesourcery.com> * gdb.threads/dlopen-libpthread.exp: Skip it if isnative is false.
2014-09-292014-09-29 Sriraman Tallam <tmsriram@google.com>Sriraman Tallam2-1/+6
* options.h (--pic-executable): Add negative to alias to -no-pie.
2014-09-30daily updateAlan Modra1-1/+1
2014-09-29Fix library-list.dtd -> library-list-svr4.dtdJan Kratochvil2-1/+5
commit 2268b414f486239cbcc0f756f157c3e03599efac added file "features/library-list-svr4.dtd" but the added code uses "library-list.dtd" instead. Curiously after changing for a test s/name/nXme/ in the DTD making the gdbserver output non-conforming there is no warning or regression seen (tested gdb.base/shlib-call.exp, using_xfer is still 1). I did not check more why the DTD conformance verification does not work. gdb/ChangeLog 2014-09-29 Jan Kratochvil <jan.kratochvil@redhat.com> * solib-svr4.c (svr4_parse_libraries): Use "library-list-svr4.dtd".
2014-09-29Fix build for OLD_FREEBSD_ABI_LABELH.J. Lu2-2/+11
PR ld/17440 * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build for OLD_FREEBSD_ABI_LABEL.
2014-09-292014-09-29 Terry Guo <terry.guo@arm.com>Terry Guo3-73/+88
* as.c (create_obj_attrs_section): Move it and call it from ... * write.c (create_obj_attrs_section): ... here. (subsegs_finish_section): Refactored.
2014-09-29daily updateAlan Modra1-1/+1
2014-09-28daily updateAlan Modra1-1/+1
2014-09-27Do away with hash table line lookup in dwarf2dbg.cAlan Modra7-18/+39
Hash lookup is silly when we can attach the line table info directly to sections instead. Worse, hash lookup fails when we have multiple sections with the same name. gas/ * dwarf2dbg.c (all_segs_hash): Delete. (get_line_subseg): Delete last_seg, last_subseg, last_line_subseg. Retrieve line_seg for section via seg_info. * subsegs.h (segment_info_typet): Add dwarf2_line_seg. gas/testsuite/ * gas/elf/group2.d, * gas/elf/group2.s: New test. * gas/elf/elf.exp: Run it.
2014-09-27daily updateAlan Modra1-1/+1
2014-09-26Fix handling of relocations against TLS section symbols.Cary Coutant2-1/+9
Gold doesn't handle relocations against the section symbol for a TLS section correctly. Instead of using the offset of the section relative to the TLS segment, it uses the address of the actual section. This patch checks for section symbols for TLS sections, and treats them the same as TLS symbols. gold/ PR gold/16773 * object.cc (Sized_relobj_file): Compute value of section symbols for TLS sections the same as TLS symbols.
2014-09-26Don't prune program spaces when doing "maintenance info program-spaces"Simon Marchi2-4/+5
Remove the pruning of program spaces in print_program_space to remove unwanted side-effects. "info" commands and print routines should generally not change the state of the debugger. gdb/Changelog: * progspace.c (print_program_space): Don't prune program spaces before printing them.
2014-09-25Fix problem where TLS common symbols are not allocated properly during LTO.Cary Coutant3-8/+35
The plugin API doesn't provide a way for the claimed file handler to identify a TLS symbol, so when adding a common TLS symbol, gold mistakenly places the symbol in the non-TLS commons list, and does not override it when we see the replacement symbol that is marked as TLS. Consequently, we allocate the TLS common symbol as a regular common, and, if it's the only TLS in the program, we'll give an internal error because we haven't allocated a TLS segment. This patch fixes the problem by removing an exclusion where common symbols would not override the placeholder symbols, but checking to see if the size needs adjusting (the original reason for the exclusion). Furthermore, we need to avoid putting placeholder symbols in the common list, and wait until we see a real common symbol with a type we can trust. gold/ PR gold/17432 * resolve.cc (Symbol_table::resolve): Override common placeholder symbols, but adjust sizes. * symtab.cc (Symbol_table::add_from_object): Don't add placeholder symbols to common lists.
2014-09-26daily updateAlan Modra1-1/+1
2014-09-25infrun.c:user_visible_resume_ptid: Don't check singlestep_breakpoints_inserted_pPedro Alves2-2/+6
What matters for this function, is whether the user requested a "step", for "set scheduler-locking step", not whether GDB is doing an internal step for some reason. /* Return a ptid representing the set of threads that we will proceed, in the perspective of the user/frontend. */ extern ptid_t user_visible_resume_ptid (int step); Therefore, the check for singlestep_breakpoints_inserted_p is actually incorrect, and we end up applying schedlock more often on sss targets than on non-sss targets. Found by inspection while working on a patch that eliminates the singlestep_breakpoints_inserted_p global. Tested on x86_64 Fedora 20 on top of my 'software single-step on x86' series. gdb/ 2014-09-25 Pedro Alves <palves@redhat.com> * infrun.c (user_visible_resume_ptid): Don't check singlestep_breakpoints_inserted_p.
2014-09-25breakpoint.c: debug output when we skip inserting a breakpointPedro Alves2-1/+14
gdb/ 2014-09-25 Pedro Alves <palves@redhat.com> * breakpoint.c (should_be_inserted): Add debug output.
2014-09-25infrun.c: comment/typo fixesPedro Alves2-3/+10
gdb/ 2014-09-25 Pedro Alves <palves@redhat.com> * infrun.c (stepping_past_instruction_at) (clear_exit_convenience_vars): Point at infrun.h instead of inferior.h. (handle_signal_stop): Fix typo.
2014-09-25daily updateAlan Modra1-1/+1
2014-09-24Fix typo in thumb_in_function_epilogue_pYao Qi2-1/+6
This patch fixes a typo in the bit mask I've made in my previous code refactor. If PC is in the register list, the bit 8 is one, so bit mask 0xff00 should be used. Current condition is a constant false. gdb: 2014-09-24 Yao Qi <yao@codesourcery.com> * arm-tdep.c (thumb_in_function_epilogue_p): Fix typo in the bitmask.
2014-09-24Regen gold POTFILES.inAlan Modra2-1/+7
* po/POTFILES.in: Regenerate.
2014-09-24BFD: Add support for more than one plugin in lib/bfd-pluginsMarkus Trippelsdorf2-52/+63
ar, nm and ranlib currently lack the ability to handle more than one plugin in lib/bfd-plugins. This patch reshuffles the logic in plugin.c to add this functionality. One can now place both llvm and gcc plugins in this directory and have them loaded automatically. Mixed gcc/llvm archives are also supported (but not very useful until ld.bfd and ld.gold also would load multiple plugins and use them to claim different object files). PR 17422 * plugin.c (try_claim): New function. Moved from bfd_plugin_object_p. (try_load_plugin): Pass through bfd. Add test. (load_plugin): Pass through bfd. (bfd_plugin_object_p): Move logic to try_claim.
2014-09-23Add PR reference to ChangeLog entry.Cary Coutant1-0/+1
2014-09-23 Taiju Tsuiki <tzik@google.com> Cary Coutant <ccoutant@google.com> gold/ PR gold/14860 * gold.cc (queue_final_tasks): Add Write_sections_task as a blocker on input_sections_blocker. * layout.cc (Write_sections_task::locks): Unblock input_sections_blocker_. * layout.h (Write_sections_task::Write_sections_task): Add input_sections_blocker. * testsuite/Makefile.am (exception_x86_64_bnd_test): Add gcctestdir/ld to DEPENDENCIES. * testsuite/Makefile.in: Regenerate.
2014-09-23Fix race condition causing assert in Eh_frame_hdr::do_sized_write().Cary Coutant6-7/+25
2014-09-23 Taiju Tsuiki <tzik@google.com> Cary Coutant <ccoutant@google.com> gold/ * gold.cc (queue_final_tasks): Add Write_sections_task as a blocker on input_sections_blocker. * layout.cc (Write_sections_task::locks): Unblock input_sections_blocker_. * layout.h (Write_sections_task::Write_sections_task): Add input_sections_blocker. * testsuite/Makefile.am (exception_x86_64_bnd_test): Add gcctestdir/ld to DEPENDENCIES. * testsuite/Makefile.in: Regenerate.
2014-09-24daily updateAlan Modra1-1/+1
2014-09-23Disallow VEX/EVEX encoded instructions in 16-bit modeH.J. Lu6-4/+57
gas/ PR gas/17421 * config/tc-i386.c (md_assemble): Disallow VEX/EVEX encoded instructions in 16-bit mode. gas/testsuite/ PR gas/17421 * gas/i386/i386.exp: Run inval-16. * gas/i386/inval-16.l: New file. * gas/i386/inval-16.s: Likewise.
2014-09-23Honour SIGILL and SIGSEGV in cancel breakpoint and event lwp selectionYao Qi2-10/+26
I see the following fail on arm-none-linux-gnueabi testing, (gdb) continue^M Continuing.^M ^M Program received signal SIGILL, Illegal instruction.^M [Switching to Thread 1003]^M handler (signo=10) at /scratch/yqi/arm-none-linux-gnueabi/src/gdb-trunk/gdb/testsuite/gdb.threads/sigstep-threads.c:33^M 33 tgkill (getpid (), gettid (), SIGUSR1); /* step-2 */^M (gdb) FAIL: gdb.threads/sigstep-threads.exp: continue the cause is that GDBserver doesn't cancel the breakpoint if the stop signal is SIGILL. The kernel used here is a little old, 2.6.x, and doesn't translate SIGILL to SIGTRAP when program hits breakpoint instruction (which is an illegal instruction actually). GDB and GDBserver can translate SIGILL to SIGTRAP under certain circumstance, so it is not a problem here. See gdbserver/linux-low.c:linux_wait_1 /* If this event was not handled before, and is not a SIGTRAP, we report it. SIGILL and SIGSEGV are also treated as traps in case a breakpoint is inserted at the current PC. If this target does not support internal breakpoints at all, we also report the SIGTRAP without further processing; it's of no concern to us. */ maybe_internal_trap = (supports_breakpoints () && (WSTOPSIG (w) == SIGTRAP || ((WSTOPSIG (w) == SIGILL || WSTOPSIG (w) == SIGSEGV) && (*the_low_target.breakpoint_at) (event_child->stop_pc)))); However, SIGILL and SIGSEGV is not considered when cancelling breakpoint, which causes the fail above. That is, when GDB is doing software single step on address ADDR, both thread A and thread B hits the software single step breakpoint, and get SIGILL. GDB selects the event from thread A, removes the software single step breakpoint, and resume the program. The event (SIGILL) from thread B is reported to GDB, but GDB doesn't regard this SIGILL as SIGTRAP, because the breakpoint on address ADDR was removed, so GDB reports "Program received signal SIGILL". The patch is to allow calling cancel_breakpoint if the signal is SIGILL and SIGSEGV. This patch fixes the fail above. Likewise, event lwp selection should honour SIGILL and SIGSEGV too. gdb/gdbserver: 2014-09-23 Yao Qi <yao@codesourcery.com> * linux-low.c (lp_status_maybe_breakpoint): New function. (linux_low_filter_event): Call lp_status_maybe_breakpoint. (count_events_callback): Likewise. (select_event_lwp_callback): Likewise. (cancel_breakpoints_callback): Likewise.
2014-09-23daily updateAlan Modra1-1/+1
2014-09-23Fix 'call8: call target out of range' xtensa ld relaxation bugSterling Augustine2-4/+44
During link-time relaxation distance between cross-section call site and its target may grow, producing 'call target out of range' error for relaxed calls. Be more conservative when calculating whether or not a callx can be converted to a straight call. 2014-09-23 Sterling Augustine <augustine.sterling@gmail.com> bfd/ * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section call relaxation use furthermost addresses where call source and destination can be to check whether it's in the range of a direct call.
2014-09-22Ignore MOD field for control/debug register moveH.J. Lu7-32/+70
This patch ignores the MOD field in control/debug register move instructions. gas/testsuite/ * gas/i386/cdr.d: New file. * gas/i386/cdr.s: Likewise. * gas/i386/x86-64-cdr.d: Likewise. * gas/i386/i386.exp: Run cdr and x86-64-cdr. opcodes/ * i386-dis.c (MOD_0F20): Removed. (MOD_0F21): Likewise. (MOD_0F22): Likewise. (MOD_0F23): Likewise. (dis386_twobyte): Replace MOD_0F20, MOD_0F21, MOD_0F22 and MOD_0F23 with "movZ". (mod_table): Remove MOD_0F20, MOD_0F21, MOD_0F22 and MOD_0F23. (OP_R): Check mod/rm byte and call OP_E_register.
2014-09-22readline/search.c: Remove useless parameter '0' for rl_message()Chen Gang2-1/+7
The related warning under Darwin x86_64: gcc -c -DHAVE_CONFIG_H -I. -I../../binutils-gdb/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 ../../binutils-gdb/readline/search.c ../../binutils-gdb/readline/search.c:213:24: warning: data argument not used by format string [-Wformat-extra-args] rl_message ("%s", p, 0); ~~~~ ^ 1 warning generated. readline/ChangeLog.gdb: * search.c (_rl_nsearch_init): Remove useless parameter '0' for rl_message(). Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
2014-09-222014-09-22 Jan-Benedict Glaw <jbglaw@lug-owl.de>Jan-Benedict Glaw2-0/+5
* gdb.texinfo (Set Breaks): Add missing "@end table".
2014-09-22Update target_stop's documentationGary Benson2-2/+8
This commit updates target_stop's documentation to clarify that it is asynchronous. gdb/ChangeLog: * target.c (target_stop): Updated comment.
2014-09-22Rename target_{stop,continue}_ptidGary Benson5-13/+24
This commit renames target_stop_ptid as target_stop_and_wait and target_continue_ptid as target_continue_no_signal. Comments are updated to more fully describe the functions' behaviour. gdb/ChangeLog: * target/target.h (target_stop_ptid): Renamed as... (target_stop_and_wait): New function. Updated comment. All uses updated. (target_continue_ptid): Renamed as... (target_continue_no_signal): New function. Updated comment. All uses updated.