I happen to see that argument pc is not used inside disas_aarch64_insn
at all. This patch is to remove it.
OK to apply?
opcodes:
2015-10-02 Yao Qi <yao.qi@linaro.org>
* aarch64-dis.c (disas_aarch64_insn): Remove argument PC.
(print_insn_aarch64_word): Caller updated.
Since something like ".long foo - ." may be used as pointer, we make
sure that PLT is used if foo is a function defined in a shared library.
bfd/
PR ld/19031
* elf64-x86-64.c (elf_x86_64_check_relocs): Set
pointer_equality_needed for R_X86_64_PC32 reloc in non-code
sections.
ld/testsuite/
PR ld/19031
* ld-x86-64/x86-64.exp: Run PR ld/19031 test.
* ld-x86-64/pr19031.out: New file.
* ld-x86-64/pr19031a.c: Likewise.
* ld-x86-64/pr19031b.S: Likewise.
* ld-x86-64/pr19031c.c: Likewise.
Since the record-btrace target now supports non-stop mode, we no
longer need to force-disable as-ns on x86.
gdb/ChangeLog:
2015-09-30 Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_nat_always_non_stop_p): Always return 1.
* x86-linux-nat.c (x86_linux_always_non_stop_p): Delete.
(x86_linux_create_target): Don't install
x86_linux_always_non_stop_p.
This fixes a typo that used strncmp instead of strprefix when
checking for an exec event in a stop reply packet.
gdb/ChangeLog:
* remote.c (remote_parse_stop_reply): Call strprefix instead
of strncmp.
Since something like ".long foo - ." may be used as pointer, we make
sure that PLT is used if foo is a function defined in a shared library.
bfd/
PR ld/19031
* elf32-i386.c (elf_i386_check_relocs): Set
pointer_equality_needed for R_386_PC32 reloc in non-code
sections.
ld/testsuite/
PR ld/19031
* ld-i386/i386.exp: Run PR ld/19031 test.
* ld/testsuite/ld-i386/pr19031.out: New file.
* ld/testsuite/ld-i386/pr19031a.c: Likewise.
* ld/testsuite/ld-i386/pr19031b.S: Likewise.
* ld/testsuite/ld-i386/pr19031c.c: Likewise.
As reported by Ulrich here:
https://sourceware.org/ml/gdb-patches/2015-09/msg00604.html
The system compiler (gcc 4.1) in Centos 5 doesn't like that we cast to a
pointer to a type that doesn't exist. I see no real value in using this
kind iof construct over just using void *. So this patch changes the
tdep_info field to void * and removes the casts. Even in C++, we
should not need an explicit cast when assigning to a void *.
gdb/ChangeLog:
* gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *.
* gdbarch.h: Regenerate.
* i386-tdep.c (i386_gdbarch_init): Remove cast to
struct gdbarch_tdep_info *.
* mips-tdep.c (mips_gdbarch_init): Likewise.
* ppc-linux-tdep (ppu2spu_sniffer): Likewise.
* rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
* spu-multiarch.c (spu_gdbarch): Likewise.
Happen to see these lines are too long. This patch shortens them.
gdb/gdbserver:
2015-09-30 Yao Qi <yao.qi@linaro.org>
* linux-aarch64-low.c (emit_movk): Shorten a long line.
(emit_load_store_pair): Likewise.
I noticed this while working on the test case. I believe it would make
sense to skip running the tests if the binary failed to build. Although
I would understand the opposite argument: if the binary does not build
for some reason, we probably want to know about it, and some catastrophic
failures in the tests might alarm us better than a timid "UNTESTED".
gdb/testsuite/ChangeLog:
* gdb.python/py-type.exp: Do not run tests if binaries fail to
build.
Architectures which use RETURN_VALUE_STRUCT_CONVENTION will have a
NULL return value after executing a finish command. See get_return_value()
in infcmd.c.
This patch avoids an eventual SIGSEV (caused by attempting to
derefrence a NULL pointer) by adding a suitable test to
finish_command_fsm_should_stop().
I encountered this problem while testing msp430:
(gdb) PASS: gdb.base/structs.exp: zed L<n> for finish; return 1 structs-tc
finish
Run till exit from #0 fun1 () at /ironwood1/sourceware-git/msp430-elf/../binutils-gdb/gdb/testsuite/gdb.base/structs.c:125
ERROR: Process no longer exists
gdb/ChangeLog:
* infcmd.c (finish_command_fsm_should_stop): Don't attempt to
record a NULL value.
If the atomic section in x86-tsx.S is aborted, the tsx.exp test will fail
even if the traced output is actually correct.
Consider abort scenarios in the test.
testsuite/
* gdb.btrace/tsx.exp: Consider multiple correct outputs in the record
instruction-history test.
When we check consistency for merge ELF sections, we should not only
check EI_CLASS, but also compatible e_machine.
bfd/
PR ld/19013
* elflink.c (_bfd_elf_merge_sections): Only merge input bfds
that have the compatible ELF machine code with the output bfd.
ld/testsuite/
PR ld/19013
* ld-x86-64/pr19013-nacl.d: New file.
* ld-x86-64/pr19013-x32.d: Likewise.
* ld-x86-64/pr19013.d: Likewise.
* ld-x86-64/pr19013.s: Likewise.
* ld-x86-64/x86-64.exp: Run PR ld/19013 tests.
We can't allow sections to be merged and sized by the ELF linker
backend and then later be output by the generic linker backend. The
generic linker backend doesn't understand merge sections.
PR ld/19013
* elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
will be handled by elf_link_input_bfd. Rename abfd param to obfd.
The FT32 simulator was not correctly simulating the behavior of the
program memory (PM) write port. When it is locked, writes to the
data register do nothing.
We can't use the output section size to copy input section since
--interleave will shrink the output section. Instead, we change
bfd_convert_section_contents to return the updated input section
size. When we do that, we don't need to adjust the output section
size to skip gap fills.
bfd/
PR binutils/19020
* bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
* bfd-in2.h: Regenerated.
binutils/
PR binutils/19020
* objcopy.c (copy_object): Don't adjust the output section size
when copying from input sections.
(copy_section): Use input section size for the copy. Get the
updated section size from bfd_convert_section_contents.
binutils/testsuite/
PR binutils/19020
* binutils-all/objcopy.exp: Run pr19020a and pr19020b.
* lib/utils-lib.exp (run_dump_test): Support binary input.
* binutils-all/pr19020.in: New file.
* binutils-all/pr19020a.d: Likewise.
* binutils-all/pr19020b.d: Likewise.
The stack unwinder can now use FT32_*() macros to interpet binary
instructions instead of local definitions.
2015-09-29 James Bowman <james.bowman@ftdichip.com>
* ft32-tdep.c: #include "opcode/ft32.h".
Delete local macros IS_PUSH, PUSH_REG, IS_LINK, LINK_SIZE.
(ft32_analyze_prologue): Use FT32_* macros.
In objcopy, copy_object calls copy_section to copy contents of input
section to output section. When --gap-fill= is used, objcopy extends
the size of output sectios to fill gaps between output sections with
gap fills. In this case, we adjust the output section size to skip
gap files to avoid reading beypond the input section buffer before
calling copy_section and restore the output section size after input
sections have been copied.
binutils/
PR binutils/19005
* objcopy.c (copy_object): Adjust the output section size to
skip gap fills between sections when copying from input sections
to output sections.
ld/testsuite/
PR binutils/19005
* ld-elf/pr19005.d: New file.
* ld-elf/pr19005.s: Likewise.
* ld-elf/pr19005.t: Likewise.
gas * doc/c-s390.texi: Add documentation.
Add missing code markup.
* config/tc-s390.c (current_flags): New static variable.
(s390_parse_cpu): Parse cpu flags a la "+nohtm" etc.
(s390_setup_opcodes): Use cpu flags to determine the set of opcodes.
Fix indentation.
(md_parse_option): Call s390_parse_cpu with the new signature.
(s390_machine): Likewise.
Keep track of current_flags.
Simplify code a bit.
undefine MAX_HISTORY at end of function.
(s390_machinemode): undefine MAX_HISTORY at end of function.
Update an error message.
tests * gas/s390/s390.exp: Add new tests.
* gas/s390/machine-parsing-1.s: New test file.
* gas/s390/machine-parsing-1.l: Likewise.
* gas/s390/machine-parsing-2.s: Likewise.
* gas/s390/machine-parsing-2.l: Likewise.
* gas/s390/machine-parsing-3.s: Likewise.
* gas/s390/machine-parsing-3.l: Likewise.
* gas/s390/machine-parsing-4.s: Likewise.
* gas/s390/machine-parsing-4.l: Likewise.
* gas/s390/machine-parsing-5.s: Likewise.
* gas/s390/machine-parsing-5.l: Likewise.
* gas/s390/machine-parsing-6.s: Likewise.
* gas/s390/machine-parsing-6.l: Likewise.
opcode * s390.h (S390_INSTR_FLAG_HTM): New flag.
(S390_INSTR_FLAG_VX): New flag.
(S390_INSTR_FLAG_FACILITY_MASK): New flag mask.
opcodes * s390-mkopc.c (main): Parse htm and vx flag.
* s390-opc.txt: Mark instructions from the hardware transactional
memory and vector facilities with the "htm"/"vx" flag.
Other places (e.g. the gdb stack unwinder) can use these instead of
hard-coded patterns.
[include/Changelog]
2015-09-26 James Bowman <james.bowman@ftdichip.com>
* opcode/ft32.h: Add instruction macros FT32_*()