From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] aarch64 multi-arch part 6: HW breakpoint on unaligned address
Date: Thu, 15 Oct 2015 13:02:00 -0000 [thread overview]
Message-ID: <561FA3F6.2070300@redhat.com> (raw)
In-Reply-To: <86fv1c4kg7.fsf@gmail.com>
On 10/15/2015 09:14 AM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>> At least the comment should be updated. It's quite misleading as is.
>
> In order to do 32-bit check in nat/aarch64-linux-hw-point.c, I add a new
> regcache interface regcache_register_size which is defined in both GDB
> and GDBserver. It has two arguments, regcache and number, which looks
> more reasonable than register_size, IMO. With regcache_register_size in
> place, we can check 32-bit like this,
>
> struct regcache *regcache
> = get_thread_regcache_for_ptid (current_lwp_ptid ());
>
> /* Set alignment to 2 only if the current process is 32-bit,
> since thumb instruction can be 2-byte aligned. Otherwise, set
> alignment to AARCH64_HBP_ALIGNMENT. */
> if (regcache_register_size (regcache, 0) == 8)
> alignment = AARCH64_HBP_ALIGNMENT;
> else
> alignment = 2;
>
> on the other hand, a lot of register_size calls in GDB and GDBserver can
> be replaced by regcache_register_size. This can be done separately.
>
> Here is the patch V2, regression tested on aarch64-linux.
LGTM.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-10-15 13:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 10:11 Yao Qi
2015-10-13 11:07 ` Pedro Alves
2015-10-13 15:26 ` Yao Qi
2015-10-13 16:58 ` Andrew Pinski
2015-10-13 17:31 ` Pedro Alves
2015-10-15 8:14 ` Yao Qi
2015-10-15 13:02 ` Pedro Alves [this message]
2015-10-15 14:10 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561FA3F6.2070300@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox