aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-22Add ld-elfvers/vers-gold.expusers/hjl/gold-testH.J. Lu2-2/+37
2015-07-22Add gold, GOLD and gcc_B_opt_goldH.J. Lu2-3/+46
2015-07-22Don't compare symbol addresses directlyH.J. Lu9-25/+127
GCC 5 will fold symbol address comparison, assuming each symbol has a different address, which leads to abort. We should use separate functions to compare symbol address. PR gold/18663 * testsuite/Makefile.am (script_test_1_SOURCES): Set to script_test_1a.cc script_test_1b.cc. (script_test_11_r.o): Replace script_test_11.o with script_test_11a.o script_test_11b.o. (script_test_11.o): Removed. (script_test_11a.o): New. (script_test_11b.o): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/script_test_1.h: New file. * testsuite/script_test_1b.cc: Likewise. * testsuite/script_test_11.h: Likewise. * testsuite/script_test_11b.c: Likewise. * testsuite/script_test_1.cc: Renamed to ... * testsuite/script_test_1a.cc: This. Include "script_test_1.h". (main): Call check_int and check_ptr. * testsuite/script_test_11.c: Renamed to ... * testsuite/script_test_11a.c: This. Include "script_test_11.h". (main): Call ptr_equal.
2015-07-22Mark global with hidden attributeH.J. Lu4-3/+10
GCC 5 will generate a relocation for protected symbol: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 when compiling for a shared library. It is undefined to access protected symbol in IFUNC selector function inside a shared library. PR gold/18628 * testsuite/ifuncdep2.c (global): Change protected to hidden. * testsuite/ifuncmod1.c (global): Likewise. * testsuite/ifuncmod5.c (global): Likewise.
2015-07-22Fix ppc64 ELFv1 assertion failureAlan Modra2-7/+11
Bogus assembly can hit an assertion in opd_entry_value when the symbol referenced by a function descriptor is undefined. Worse, the code after the assert copies unitialised memory to return the code section. This uninitialised pointer can later be dereferencd, possibly causing a linker segmentation fault. * elf64-ppc.c (opd_entry_value): Remove assertion. Instead, return -1 if symbol referenced is not defined. Tidy.
2015-07-22GOLD aarch64 warning fixAlan Modra2-1/+5
aarch64.cc:2026:50: error: integer overflow in expression [-Werror=overflow] Insntype adr_insn = adrp_insn & ((1 << 31) - 1); * aarch64.cc (try_fix_erratum_843419_optimized): Warning fix.
2015-07-22Automatic date update in version.inGDB Administrator1-1/+1
2015-07-21Fix problem where __start_ and __stop_ section symbols do not honor version ↵Cary Coutant2-0/+17
script. When creating the special __start_ and __stop_ section symbols, gold does not check the version script to see if they should be local instead of global. 2015-07-21 Cary Coutant <ccoutant@gmail.com> gold/ PR gold/18548 * symtab.cc (Symbol_table::do_define_in_output_data): Check for forced local symbol even when oldsym != NULL. (Symbol_table::do_define_in_output_segment): Likewise. (Symbol_table::do_define_as_constant): Likewise.
2015-07-21Fix typo in PR number.Cary Coutant1-1/+1
Fix internal error when linking an archive library with no preceding objects. gold/ PR gold/18698 * archive.cc (Library_base::should_include_member): Don't use entry point for relocatable links, or if target is not yet valid. * parameters.cc (Parameters::entry): Check target_valid().
2015-07-21Fix internal error when linking an archive library with no preceding objects.Cary Coutant3-5/+16
gold/ PR gold/18696 * archive.cc (Library_base::should_include_member): Don't use entry point for relocatable links, or if target is not yet valid. * parameters.cc (Parameters::entry): Check target_valid().
2015-07-21Move aarch64_linux_get_debug_reg_capacity to nat/aarch64-linux-hw-point.cYao Qi6-103/+72
There are also some duplication on getting HW watchpoint/breakpoint registers info between GDB and GDBserver. This patch moves them to nat/aarch64-linux-hw-point.c. Note that ENABLE_NLS is not defined in GDBserver, so it should be OK to use _( markup. gdb: 2015-07-21 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Move it to nat/aarch64-linux-hw-point.c. (aarch64_linux_child_post_startup_inferior): Update. * nat/aarch64-linux-hw-point.c (aarch64_linux_get_debug_reg_capacity): New function. * nat/aarch64-linux-hw-point.h (aarch64_linux_get_debug_reg_capacity): Declare it. gdb/gdbserver: 2015-07-21 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call aarch64_linux_get_debug_reg_capacity.
2015-07-21btrace: fix case label in btrace_data_appendMarkus Metzger2-1/+5
gdb/ * common/btrace-common.c (btrace_data_append): Change case label.
2015-07-21[ARM] Support correctly spelled ARMv6KZ architecture namesMatthew Wahab9-9/+66
2015-07-20 Matthew Wahab <matthew.wahab@arm.com> gas/ * NEWS: Mention corrected spelling of armv6kz. * config/tc-arm.c (arm_cpus): Replace ARM_ARCH_V6ZK with ARM_ARCH_V6KZ. (arm_archs): Likewise. Also add "armv6kz" and "armv6kzt2". * doc/c-arm.texi: Replace "armv6zk" with "armv6kz". gas/testsuite * gas/arm/attr-march-armv6kz.d: New. * gas/arm/attr-march-armv6kzt2.d: New. include/opcode * arm.h (ARM_AEXT_V6ZK): Rename to ARM_AEXT_V6KZ. (ARM_AEXT_V6ZKT2): Rename to ARM_AEXT_V6KZT2. (ARM_ARCH_V6ZK): Rename to ARM_ARCH_V6KZ. (ARM_ARCH_V6ZKT2): Rename to ARM_ARCH_V6KZT2.
2015-07-21Automatic date update in version.inGDB Administrator1-1/+1
2015-07-20gdb.ada/info_exc.exp: Adjust expected output in "info exception" test.Joel Brobecker2-3/+5
Since multi_line was moved to gdb.exp in a slightly stricter form, The gdb.ada/info_exc.exp:info exceptions test has been failing. This is because it now expects a new-line sequence at the end of each argument given to multi_line, including ".*". But the intent when writing the test was to signify "could-be-nothing-at-all". As a result, the test fails on x86_64-linux with a runtime built as recommended, because of that extra new-line sequence. gdb/testsuite/ChangeLog: * gdb.ada/info_exc.exp: Adjust "info exceptions" expected output.
2015-07-20Optimize erratum 843419 fix.Han Shen2-12/+166
gold/ChangeLog: * aarch64.cc (AArch64_insn_utilities::is_adr): New method. (AArch64_insn_utilities::aarch64_adr_encode_imm): New method. (AArch64_insn_utilities::aarch64_adrp_decode_imm): New method. (E843419_stub): New sub-class of Erratum_stub. (AArch64_relobj::try_fix_erratum_843419_optimized): New method. (AArch64_relobj::section_needs_reloc_stub_scanning): Try optimized fix. (AArch64_relobj::create_erratum_stub): Add 1 argument. (Target_aarch64::scan_erratum_843419_span): Pass in adrp insn offset.
2015-07-20Update testsuite/pr18689.sh for older GCCH.J. Lu1-1/+1
Older GCC, like 4.2, generates .debug_macinfo section instead of .debug_macro section. This patch updates testsuite/pr18689.sh to support it.
2015-07-20Properly set arm-specific elf flags wrt hardfp.Han Shen2-0/+7
gold/ChangeLog: * arm.cc (Target_arm::do_adjust_elf_header): Set flags into view.
2015-07-20Clear SHF_COMPRESSED flag bit from input to outputH.J. Lu6-7/+88
For relocatable link, we should clear the SHF_COMPRESSED flag bit from input group section. PR gold/18689 * layout.cc (Layout::layout): Clear the SHF_COMPRESSED flag bit from input group section for relocatable link. * testsuite/Makefile.am (check_SCRIPTS): Add pr18689.sh. (check_DATA): Add pr18689.stdout. (MOSTLYCLEANFILES): Add pr18689a.o pr18689b.o. (pr18689.stdout): New rule. (pr18689a.o): Likewise. (pr18689b.o): Likewise. (pr18689.o): Likewise. * testsuite/pr18689.c: New file. * testsuite/pr18689.sh: Likewise. * testsuite/Makefile.in: Regenerated.
2015-07-20Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi.Doug Evans2-1/+7
gdb/doc/ChangeLog: * Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi.
2015-07-20Remove warning about references from shared objects to hidden symbols.Yiran Wang5-20/+35
gold/ PR gold/15574 * resolve.cc (Symbol_table): Remove warning about references from shared objects to hidden symbols. * testsuite/Makefile.am (hidden_test): Add hidden_test.syms. * testsuite/Makefile.in: Regenerate. * testsuite/hidden_test.sh: Check dynamic symbol table; update expected error messages.
2015-07-20Fix ARI warnings to nat/aarch64-linux-hw-point.{c,h}Yao Qi3-7/+15
This patch is to fix two ARI warnings for nat/aarch64-linux-hw-point.{c,h}. gdb: 2015-07-20 Yao Qi <yao.qi@linaro.org> * nat/aarch64-linux-hw-point.c (aarch64_handle_unaligned_watchpoint): Re-indent the code. * nat/aarch64-linux-hw-point.h: Use ULONGEST rather than "unsigned long long".
2015-07-20Make binutils abort message GDB friendlyH.J. Lu3-8/+8
We used to generate abort messages like: internal error, aborting at .../bfd/elf64-x86-64.c line 1554 in elf_x86_64_check_relocs We can't cut and paste "file line ???" to GDB. This patch changes those abort messages to internal error, aborting at .../bfd/elf64-x86-64.c:1554 in elf_x86_64_check_relocs so that we can cut and paste "file:???" to GDB. bfd/ * bfd.c (_bfd_abort): Replace " line " with ":" in output message. gas/ * messages.c (as_assert): Replace " line " with ":" in output message. (as_abort): Likewise. ld/ * ldmisc.c (ld_abort): Replace " line " with ":" in output message.
2015-07-20Regen two filesAlan Modra4-3/+12
bfd/ * po/SRC-POTFILES.in: Regenerate. binutils/ * doc/Makefile.in: Regenerate.
2015-07-20ALIGN change affects cris scriptsAlan Modra3-4/+12
More fallout from a2c59f28. This one could have been fixed by simply using ". = ALIGN (ABSOLUTE (.), 2);" but it's nicer to align the section. * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define. (INIT_START, FINI_START): Don't ALIGN. * scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR.
2015-07-20ALIGN change affects standard scriptsAlan Modra3-26/+48
a2c59f28 changed the way the unary ALIGN behaved inside output sections, resulting in cris-elf testsuite regressions. This patch pads out .bss in the same manner as it was prior to the ALIGN change. * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot. * ldexp.c (is_align_conditional): Handle binary ALIGN. (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to dot inside output sections. Handle absolute expressions.
2015-07-20Automatic date update in version.inGDB Administrator1-1/+1
2015-07-19Automatic date update in version.inGDB Administrator1-1/+1
2015-07-18dwarf2read: Allow SEC_ALLOC sections to be located at address 0.Kevin Buettner2-1/+6
GDB already allows statically initialized variables, located in SEC_LOAD sections, to be placed at address 0. This change allows uninitialized variables (which are in SEC_ALLOC sections) to be placed address 0 as well. gdb/ChangeLog: * dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero to be set for SEC_ALLOC sections too.
2015-07-18Automatic date update in version.inGDB Administrator1-1/+1
2015-07-17Move common aarch64 HW breakpoint/watchpoint code to nat/Yao Qi10-1218/+767
When I look at test fails related to watchpoint on aarch64-linux, I find there are some code duplicates between GDB and GDBserver. This patch is to move some of them to a nat/aarch64-linux-hw-point.{h,c}. The only change I do is about the dr_changed_t typedef, which was ULONGEST in GDB and 'unsigned long long' in GDBserver. Each bit of dr_changed_t represents a status of each HW breakpoint or watchpoint register, and the max number of HW breakpoint or watchpoint registers is 16, so the width of 'unsigned long long' is sufficient. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * Makefile.in (HFILES_NO_SRCDIR): Add nat/aarch64-linux-hw-point.h. (aarch64-linux-hw-point.o): New rule. * nat/aarch64-linux-hw-point.h: New file. * nat/aarch64-linux-hw-point.c: New file. * aarch64-linux-nat.c: Include nat/aarch64-linux-hw-point.h. (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h. (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise. (AARCH64_HWP_ALIGNMENT): Likewise. (AARCH64_HWP_MAX_LEN_PER_REG): Likewise. (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise. (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise. (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise. (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise. (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise. (struct aarch64_debug_reg_state): Likewise. (struct arch_lwp_info): Likewise. (aarch64_linux_set_debug_regs): Likewise. (aarch64_notify_debug_reg_change): Remove static. (aarch64_align_watchpoint): Likewise. (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise. (aarch64_watchpoint_length): Likewise. (aarch64_point_encode_ctrl_reg): Likewise (aarch64_point_is_aligned): Likewise. (aarch64_dr_state_insert_one_point): Likewise. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise. * config/aarch64/linux.mh (NAT_FILE): Add aarch64-linux-hw-point.o. gdb/gdbserver: 2015-07-17 Yao Qi <yao.qi@linaro.org> * Makefile.in (aarch64-linux-hw-point.o): New rule. * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o. * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h. (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h. (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise. (AARCH64_HWP_ALIGNMENT): Likewise. (AARCH64_HWP_MAX_LEN_PER_REG): Likewise. (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise. (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise. (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise. (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise. (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise. (struct aarch64_debug_reg_state): Likewise. (struct arch_lwp_info): Likewise. (aarch64_align_watchpoint): Likewise. (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise. (aarch64_watchpoint_length): Likewise. (aarch64_point_encode_ctrl_reg): Likewise (aarch64_point_is_aligned): Likewise. (aarch64_align_watchpoint): Likewise. (aarch64_linux_set_debug_regs): (aarch64_dr_state_insert_one_point): Likewise. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise.
2015-07-17Pass aarch64_debug_reg_state to functionsYao Qi4-53/+72
Some functions on handling HW watchpoint in GDB and GDBserver looks the same except the code getting debug register state from current inferior. In GDB, we get debug register state like this: state = aarch64_get_debug_reg_state (ptid_get_pid (inferior_ptid)); while in GDBserver, we get debug register state like this: state = aarch64_get_debug_reg_state (); This patch is to move two lines above out of some functions, and pass aarch64_debug_reg_state to these functions, in this way, these functions are the same, and can be moved to a common place. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_handle_breakpoint): Add argument state and don't call aarch64_get_debug_reg_state. All callers update. (aarch64_linux_insert_hw_breakpoint): Call aarch64_get_debug_reg_state earlier. (aarch64_linux_remove_hw_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Add argument state and don't call aarch64_get_debug_reg_state. All callers update. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Add argument state. (aarch64_linux_insert_watchpoint): Call aarch64_get_debug_reg_state earlier. (aarch64_linux_remove_watchpoint): Likewise. gdb/gdbserver: 2015-07-17 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state and don't aarch64_get_debug_reg_state. All callers update. (aarch64_handle_aligned_watchpoint): Likewise. (aarch64_handle_unaligned_watchpoint): Likewise. (aarch64_handle_watchpoint): Likewise. (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier. (aarch64_remove_point): Likewise.
2015-07-17Use debug_printf to print debug messageYao Qi4-40/+50
Some functions in aarch64-linux-nat.c and linux-aarch64-low.c looks the same except for the code printing debug message. In GDB, we use fprintf_unfiltered (gdb_stdlog, ...) while in GDBserver, we use fprintf (stderr, ...). This patch is to change them to use debug_printf so that these functions are the same, and I can move them to a common place in the following patch. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_show_debug_reg_state): Use debug_printf. (aarch64_handle_unaligned_watchpoint): Likewise. gdb/gdbserver: 2015-07-17 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use debug_printf. (aarch64_handle_unaligned_watchpoint): Likewise.
2015-07-17int -> enum target_hw_bp_type in aarch64-linux-nat.cYao Qi2-7/+20
This patch is to use 'enum target_hw_bp_type' instead of int for breakpoint type, in order to make some functions in GDB and GDBserver looks similar. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_dr_state_insert_one_point): Change argument type's type to 'enum target_hw_bp_type'. (aarch64_dr_state_remove_one_point): Likewise. (aarch64_handle_breakpoint): Likewise. (aarch64_linux_insert_hw_breakpoint): Likewise. (aarch64_linux_remove_hw_breakpoint): Likewise. (aarch64_handle_aligned_watchpoint): Likewise.
2015-07-17Call ptid_get_pid instead of get_thread_id in ↵Yao Qi2-1/+6
aarch64_linux_get_debug_reg_capacity aarch64_linux_get_debug_reg_capacity is called by aarch64_linux_child_post_startup_inferior, and argument ptid is created in inf-ptrace.c:inf_ptrace_create_inferior, /* On some targets, there must be some explicit actions taken after the inferior has been started up. */ target_post_startup_inferior (pid_to_ptid (pid)); so in aarch64_linux_get_debug_reg_capacity, we can get pid by ptid_get_pid, and don't need to use get_thread_id. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Call ptid_get_pid instead of get_thread_id.
2015-07-17[AArch64] Sort TLS reloc types alphabeticallyJiong Wang2-17/+22
2015-07-17Fix using uninitialised valuesYao Qi2-2/+7
We did a code refacotr here https://sourceware.org/ml/gdb-patches/2013-11/msg00063.html > (get_current_thread): New function, factored out from ... > (add_current_inferior_and_thread): ... this. Adjust. > >@@ -3332,18 +3371,8 @@ add_current_inferior_and_thread (char *wait_status) > > inferior_ptid = null_ptid; > >- /* Now, if we have thread information, update inferior_ptid. First >- if we have a stop reply handy, maybe it's a T stop reply with a >- "thread" register we can extract the current thread from. If >- not, ask the remote which is the current thread, with qC. The >- former method avoids a roundtrip. Note we don't use >- remote_parse_stop_reply as that makes use of the target >- architecture, which we haven't yet fully determined at this >- point. */ >- if (wait_status != NULL) >- ptid = stop_reply_extract_thread (wait_status); >- if (ptid_equal (ptid, null_ptid)) >- ptid = remote_current_thread (inferior_ptid); >+ /* Now, if we have thread information, update inferior_ptid. */ >+ ptid = get_current_thread (wait_status); but after the refactor, local variable ptid is used without initialisation. However, before this change, ptid is initialised to null_ptid. This error can be found by valgrind too... ==3298== at 0x6B99BA: ptid_equal (ptid.c:80) ==3298== by 0x4C67FF: get_current_thread (remote.c:3484) ==3298== by 0x4C6951: add_current_inferior_and_thread (remote.c:3511) ==3298== by 0x4C762C: extended_remote_create_inferior (remote.c:8506) ==3298== by 0x5A5312: run_command_1 (infcmd.c:606) ==3298== by 0x68B4FB: execute_command (top.c:463) ==3298== by 0x5C7214: command_handler (event-top.c:494) ==3298== by 0x5C78A3: command_line_handler (event-top.c:692) ==3298== by 0x6DEB57: rl_callback_read_char (callback.c:220) ==3298== by 0x5C7278: rl_callback_read_char_wrapper (event-top.c:171) ==3298== by 0x5C72C2: stdin_event_handler (event-top.c:432) ==3298== by 0x5C6194: gdb_wait_for_event (event-loop.c:834) This patch initialises local variable ptid to null in get_current_thread. We don't need to initialise ptid in add_current_inferior_and_thread, so this patch also removes the ptid initialisation. gdb: 2015-07-17 Yao Qi <yao.qi@linaro.org> * remote.c (get_current_thread): Initialise ptid to null_ptid. (add_current_inferior_and_thread): Don't initialise ptid.
2015-07-17Automatic date update in version.inGDB Administrator1-1/+1
2015-07-16stabs.texinfo: @include gdb-cfg.texi.Doug Evans2-0/+8
gdb/doc/ChangeLog: * stabs.texinfo: @include gdb-cfg.texi.
2015-07-16Fix gdb.arch/i386-biarch-core.exp FAIL on i386.Jan Kratochvil2-9/+26
This new test fails on i686 buildbot slaves, (gdb) core-file /home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build/gdb/testsuite/gdb.arch/i386-biarch-core.core "/home/gdb-buildbot-2/fedora-x86-64-2/fedora-i686/build/gdb/testsuite/gdb.arch/i386-biarch-core.core" is not a core dump: File format not recognized (gdb) FAIL: gdb.arch/i386-biarch-core.exp: core-file There are two problems: (1) The testcase did not really test if elf64-i386 is supported by GDB (BFD). That was OK for a Fedora testcase but I forgot about it when submitting it upstream. I haven't really verified if the GNU target is elf64-little but it seems so, no other one seems suitable from: elf32-x86-64 elf64-big elf64-k1om elf64-l1om elf64-little elf64-x86-64 pei-x86-64 (2) The output of the "core-file" command itself can be arbitrary as the elf64-i386 file with x86_64 registers is really broken; but that does not matter much, important is the following test whether core file memory is readable. ./configure --enable-64-bit-bfd (gdb) core-file /home/jkratoch/redhat/gdb-test-build32-plus64/gdb/testsuite/gdb.arch/i386-biarch-core.core^M warning: Couldn't find general-purpose registers in core file.^M Failed to read a valid object file image from memory.^M warning: Couldn't find general-purpose registers in core file.^M #0 <unavailable> in ?? ()^M (gdb) FAIL: gdb.arch/i386-biarch-core.exp: core-file x/i 0x400078^M 0x400078: hlt ^M (gdb) PASS: gdb.arch/i386-biarch-core.exp: .text is readable I do not know much dejagnu but I expect 'istarget' tests against the site.exp 'target_triplet' content which is set to the primary GDB target (--target=...). GDB is normally never configured for primary target elf64-i386, I think BFD does not know such explicit target, it gets recognized as elf64-little. In fact many testfiles of the GDB testsuite are wrong as they require 'istarget' (therefore primary GDB target) even for just loading arch specific files which would be sufficient with secondary target (--enable-targets=...) support. This my new patch removes this 'istarget' check as it is IMO unrelated to what we need to test. Although you are right we do 'x/i' and test for 'hlt' so I think we should test also for available 'set architecture i386'. We could also test by 'x/bx' instead of 'x/i' to avoid such additional test/requirement. This testcase comes from a different bug from 2009: https://bugzilla.redhat.com/show_bug.cgi?id=457187 http://pkgs.fedoraproject.org/cgit/gdb.git/commit/?id=94cd124608bf0dd359cb48a710800d72c21b30c3 That bug has been fixed in the meantime but the same testcase was reproducing this new different bug - internal error regression - so I submitted it. We can remove the "x/bx $address" test but it was useful for the previous bug from 2009 as that time the internal error regression did not happen, just the core file was not recognized (which would not be detected by the proposed ignoring of the "core-file" command output) and so the core file was not available. That can be tested by the "x/bx $address" test. gdb/testsuite/ChangeLog 2015-07-16 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.arch/i386-biarch-core.exp: Replace istarget by "complete set gnutarget". Remove expectation for the "core-file" command.
2015-07-16Updates the ARM disassembler's output of floating point constants to include ↵Alessandro Marzocchi3-4/+42
the actual floating point value. opcodes * arm-dis.c (print_insn_coprocessor): Added support for quarter float bitfield format. (coprocessor_opcodes): Changed VFP vmov reg,immediate to use new quarter float bitfield format. tests * gas/arm/vfpv3-const-conv.d: Update expected result due to change of comment for vmov reg,immediate with VFP coprocessor.
2015-07-17Correct readelf dynamic section buffer overlow testAlan Modra2-3/+9
PR binutils/18672 * readelf.c (get_32bit_dynamic_section): Correct buffer limit test. (get_64bit_dynamic_section): Likewise.
2015-07-16[AArch64][3/3] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21Jiong Wang7-1/+53
2015-07-16[AArch64][2/3] GAS support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21Jiong Wang12-0/+91
2015-07-16[AArch64][1/3] Add R_AARCH64_P32_TLSLD_ADR_PREL21 in elf headerJiong Wang2-0/+5
2015-07-16[ARM] Add crypto-neon-fp-armv8.1 as an fpu optionMatthew Wahab3-2/+11
2015-07-16 Matthew Wahab <matthew.wahab@arm.com> gas/ * config/tc-arm.c (arm_fpus): Add crypto-neon-fp-armv8.1. * doc/c-arm.texi (-mfpu=): Likewise. Correct the entry for neon-fp-armv8.1.
2015-07-16[ARM] Make human parsing of "processor does not support instruction in mode" ↵James Greenhalgh9-140/+154
error messages easier 2015-07-16 James Greenhalgh <james.greenhalgh@arm.com> gas/ * config/tc-arm.c (md_assemble): Rephrase the "selected processor does not support ARM mode" error messages. gas/testsuite/ * gas/arm/arch7em-bad.l: Update expected errors. * gas/arm/arch7m-bad.l: Likewise. * gas/arm/arm-idiv-bad.l: Likewise. * gas/arm/arm7-bad.l: Likewise. * gas/arm/armv1-bad.l: Likewise. * gas/arm/thumb-w-bad.l: Likewise.
2015-07-16[AArch64] Mark single precision pseudo registers unavailable if invalidPierre Langlois2-1/+10
I noticed two failure in gdb.trace/mi-trace-frame-collected.exp: FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register) FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register) In these cases, we are not collecting registers so the MI command -trace-frame-collected should only give us the value of the PC. However, it also gives us all of the single precision pseudo registers, initialized with 0x0. We can reproduce this error by simply issuing the 'maint print cooked-register' when no inferior is connected: ~~~ ... (gdb) maint print cooked-register Name Nr Rel Offset Size Type Cooked value x0 0 0 0 8 long <unavailable> x1 1 1 8 8 long <unavailable> ... d30 130 62 1540 8 *1 <unavailable> d31 131 63 1548 8 *1 <unavailable> s0 132 64 1556 4 *1 0x00000000 s1 133 65 1560 4 *1 0x00000000 s2 134 66 1564 4 *1 0x00000000 ... s28 160 92 1668 4 *1 0x00000000 s29 161 93 1672 4 *1 0x00000000 s30 162 94 1676 4 *1 0x00000000 s31 163 95 1680 4 *1 0x00000000 h0 164 96 1684 2 *1 <unavailable> h1 165 97 1686 2 *1 <unavailable> h2 166 98 1688 2 *1 <unavailable> ... ~~~ It turns out GDB does not check if S registers are valid before returning a value for them. It should return <unavailable> in this case. gdb/ChangeLog: * aarch64-tdep.c (aarch64_pseudo_read_value): Mark S register as unavailable if invalid.
2015-07-16Automatic date update in version.inGDB Administrator1-1/+1
2015-07-15Revert the previous 7 commits of: Validate binary before useJan Kratochvil43-1946/+824
ddc98fbf2fd9e244a215a4d09e559180dc573a14 Create empty nat/linux-maps.[ch] and common/target-utils.[ch] 6e5b4429db0d66e2d0b27e1bcfe4709f3dae73ed Move gdb_regex* to common/ f7af1fcd759fa126612018a5916cf808df7bb8bc Prepare linux_find_memory_regions_full & co. for move 9904185cfde13d6c6849f1f042c8e3b74974cf08 Move linux_find_memory_regions_full & co. 700ca40f6fc1addd7238f4ab57f76c095ad3c99f gdbserver build-id attribute generator ca5268b6be265580b91ef75c1a1a9815f581ae42 Validate symbol file using build-id 0a94970d663a053c523f23ac0d71deb25a77f709 Tests for validate symbol file using build-id gdb/ChangeLog 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com> Revert the previous 6 commits: Create empty nat/linux-maps.[ch] and common/target-utils.[ch]. Move gdb_regex* to common/ Prepare linux_find_memory_regions_full & co. for move Move linux_find_memory_regions_full & co. gdbserver build-id attribute generator Validate symbol file using build-id gdb/gdbserver/ChangeLog 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com> Revert the previous 3 commits: Move gdb_regex* to common/ Move linux_find_memory_regions_full & co. gdbserver build-id attribute generator gdb/doc/ChangeLog 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com> Revert the previous 2 commits: gdbserver build-id attribute generator Validate symbol file using build-id gdb/testsuite/ChangeLog 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com> Revert the previous commit: Tests for validate symbol file using build-id.