The skip test currently relies on the order of evaluation of
arguments which is not defined. Use the comma operator where
order is defined instead.
gdb/testsuite/ChangeLog:
2013-06-18 Will Newton <will.newton@linaro.org>
* gdb.base/skip.c: Use comma to evaluate results of foo()
and bar() before passing to baz().
* gdb.base/skip.c: baz() now takes one argument instead of
two.
PR symtab/15391 is a failure with the DW_OP_GNU_implicit_pointer
feature.
I tracked it down to a logic error in read_pieced_value. The code
truncates this_size_bits according to the type size and offset too
early -- it should do it after taking bits_to_skip into account.
This patch fixes the bug.
While testing this, I also tripped across a latent bug because
indirect_pieced_value does not sign-extend where needed. This patch
fixes this bug as well.
Finally, Pedro pointed out that a previous version implemented sign
extension incorrectly. This version introduces a new gdb_sign_extend
function for this. A couple of notes on this function:
* It has the gdb_ prefix to avoid clashes with various libraries that
felt free to avoid proper namespacing. There is a "sign_extend"
function in a Tile GX header, in an SOM-related BFD header (and in
sh64-tdep.c and as a macro in arm-wince-tdep.c, but those are
ours...)
* I looked at all the sign extensions in gdb and didn't see ones that
I felt comfortable converting to use this function; in large part
because I don't have a good way to test the conversion.
Built and regtested on x86-64 Fedora 18. New test cases included;
this required a minor addition to the DWARF assembler. Note that the
DWARF CU made by implptrpiece.exp uses a funny pointer size in order
to show the sign-extension bug on all platforms.
* dwarf2loc.c (read_pieced_value): Truncate this_size_bits
after taking bits_to_skip into account. Sign extend byte_offset.
* utils.h (gdb_sign_extend): Declare.
* utils.c (gdb_sign_extend): New function.
* gdb.dwarf2/implptrpiece.exp: New file.
* gdb.dwarf2/implptrconst.exp (d): New variable.
Print d.
* lib/dwarf2.exp (Dwarf::_location): Handle DW_OP_piece.
python-selftest.exp fails with an error when using the
native-gdbserver.exp board.
The bug is that the selftest code doesn't work in this situation. It
never has.
This patch fixes the problem by pushing the needed check into
do_self_tests. This helps prevent the problem in the future.
* lib/selftest-support.exp (do_self_tests): Reject remote or
non-native targets.
* gdb.gdb/complaints.exp: Remove check.
* gdb.gdb/observer.exp: Remove check.
* gdb.gdb/xfullpath.exp: Remove check.
* gdb.gdb/complaints.exp: Remove check.
Since these insns run in usermode, there should be no need to setup
RET[ENI] to safe values. They won't be dereferenced, and any insn
that returns via them are valid only in supervisor mode. Since this
is in the main exception code path, saving any insn at all is good
as it gets multiplied quickly (as in O(n^2) times).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* resolve.cc (Symbol::override_base): Don't override st_type
from plugin placeholder symbols.
(Symbol_table::resolve): Likewise.
(Symbol_table::should_override): Don't complain about TLS mismatch
if the TO symbol is a plugin placeholder.
* testsuite/Makefile.am (plugin_test_tls): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/plugin_test_tls.sh: New test script.
* testsuite/two_file_test_2_tls.cc: New test source.
* testsuite/two_file_test_tls.cc: New test source.
* elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
R_AARCH64_GOT_LD_PREL19.
ld/testsuite/
* ld-aarch64/aarch64-elf.exp: Add 'ifunc-7c'.
* ld-aarch64/ifunc-7c.d: New test.
* elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
supports thumb instructions.
PR ld/15302
* ld-arm/branch-lks-sym.ld: New script.
* ld-arm/thumb-b-lks-sym.s: New test.
* ld-arm/thumb-b-lks-sym.d: Expected disassembly.
* ld-arm/thumb-bl-lks-sym.s: New test.
* ld-arm/thumb-bl-lks-sym.d: Expected disassembly.
* ld-arm/arm-elf.exp: Run the new tests.
* config/tc-m68k.h (TC_CHECK_ADJUSTED_BROKEN_DOT_WORD): Define.
* config/tc-m68k.c (tc_m68k_check_adjusted_broken_word): New
function. Generates an error if the adjusted offset is out of a
16-bit range.
gas/
* config/tc-nios2.c (md_apply_fix): Mask constant
BFD_RELOC_NIOS2_HIADJ16 value to 16 bits.
gas/testsuite/
* gas/nios2/movia.s: Add additional test case with negative
constant value.
* gas/nios2/movia.d: Likewise.
This fixes the regressions reported at
<http://sourceware.org/ml/gdb-patches/2013-06/msg00280.html>:
$ runtest-gdbserver gdb.base/siginfo-obj.exp gdb.base/siginfo-thread.exp gdb.threads/siginfo-threads.exp
Running ./gdb.base/siginfo-thread.exp ...
FAIL: gdb.base/siginfo-thread.exp: p ssi_addr
Running ./gdb.threads/siginfo-threads.exp ...
FAIL: gdb.threads/siginfo-threads.exp: signal 0 si_pid
FAIL: gdb.threads/siginfo-threads.exp: signal 1 si_pid
FAIL: gdb.threads/siginfo-threads.exp: signal 2 si_pid
FAIL: gdb.threads/siginfo-threads.exp: signal 3 si_pid
Running ./gdb.base/siginfo-obj.exp ...
FAIL: gdb.base/siginfo-obj.exp: p ssi_addr
FAIL: gdb.base/siginfo-obj.exp: p ssi_addr
The multi-arch patch made GDBserver do the the wrong siginfo layout
conversion, because most uses of `linux_is_elf64' were removed, and it
ended up never set. A global really is the wrong thing to use as
elf64-ness is a per-process property; `linux_is_elf64' was just
accidentally left behind.
Tested on x86_64 Fedora 17.
gdb/gdbserver/
2013-06-12 Pedro Alves <palves@redhat.com>
* linux-x86-low.c (linux_is_elf64): Delete global.
(x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
with local linux_pid_exe_is_elf_64_file use.
There's no need for every arch to pre-allocate disabled_regsets.
Chances are the array won't be used.
(I have a hunch that with some more work we could dispense with
initialize_regsets_info.)
Tested on x86_64 Fedora 17 w/ -lmcheck.
gdb/gdbserver/
2013-06-11 Pedro Alves <palves@redhat.com>
* linux-low.c (regset_disabled, disable_regset): New functions.
(regsets_fetch_inferior_registers)
(regsets_store_inferior_registers): Use them.
(initialize_regsets_info); Don't allocate the disabled_regsets
array here.
* linux-low.h (struct regsets_info) <disabled_regsets>: Extend
comment.