This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] [AArch64] Use int64_t for address offset
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 28 Jun 2016 13:16:58 -0400
- Subject: [binutils-gdb] [AArch64] Use int64_t for address offset
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 2ac09a5bbbff78d363ede2f038c31a9b1cb0887b ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: 2ac09a5bbbff78d363ede2f038c31a9b1cb0887b
[AArch64] Use int64_t for address offset
In AArch64 displaced stepping and fast tracepoint, GDB/GDBserver needs
to check whether the offset can fit in the range. We are using int32_t
for offset, it is sufficient to get an offset from an instruction, but
it is not enough to get an offset from two addresses. For example,
we have a BL in shared lib which is at 0x0000002000040774, and the
scratch pad for displaced stepping is at 0x400698. The offset can't
fit in 28 bit imm. However, since we are using int32_t for offset, GDB
thinks the offset can fit it, and generate the B instruction with wrong
offset.
It fixes the following fail,
-FAIL: gdb.base/dso2dso.exp: next over call to sub2
gdb:
2016-06-28 Yao Qi <yao.qi@linaro.org>
* aarch64-tdep.c (aarch64_displaced_step_b): Use int64_t for
variable new_offset.
gdb/gdbserver:
2016-06-28 Yao Qi <yao.qi@linaro.org>
* linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
for variable new_offset.
(aarch64_ftrace_insn_reloc_b_cond): Likewise.
(aarch64_ftrace_insn_reloc_cb): Likewise.
(aarch64_ftrace_insn_reloc_tb): Likewise.
(aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
PRIx64 instead of PRIx32.
- Follow-Ups:
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-m64, branch master