This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [AArch64] Use int64_t for address offset
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 28 Jun 2016 17:27:49 +0100
- Subject: Re: [PATCH] [AArch64] Use int64_t for address offset
- Authentication-results: sourceware.org; auth=none
- References: <1465979890-14353-1-git-send-email-yao dot qi at linaro dot org>
On Wed, Jun 15, 2016 at 9:38 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
> 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
I pushed it in.
--
Yao (éå)