From: Pedro Alves <palves@redhat.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Will Newton <will.newton@linaro.org>,
Andreas Schwab <schwab@linux-m68k.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH/AARCH64] Fix hardware break points
Date: Mon, 16 Sep 2013 12:44:00 -0000 [thread overview]
Message-ID: <5236FD06.9070807@redhat.com> (raw)
In-Reply-To: <CA+=Sn1kwQNtXFU6EA5X90934qeRGSS8Ryb9DZTbOb9PVoX++5w@mail.gmail.com>
On 09/12/2013 08:15 AM, Andrew Pinski wrote:
> On Tue, Sep 10, 2013 at 7:37 AM, Will Newton <will.newton@linaro.org> wrote:
>> On 27 July 2013 23:42, Andrew Pinski <pinskia@gmail.com> wrote:
>>
>> Hi Andrew,
>>
>>> On Sat, Jul 27, 2013 at 2:34 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>>> Andrew Pinski <pinskia@gmail.com> writes:
>>>>
>>>>> OK? Built and tested on aarch64-linux-gnu with no regressions.
>>>>
>>>> Did you?
>>>>
>>>>> + memset (®s, 0, size(regs));
>>>
>>> This is what I get for copying and pasting from one source file to another.
>>>
>>> Here is the fixed one which was definitely tested.
>>
>> What's the status of this patch? It seems like it fixes real problems
>> people are seeing in the field.
> After not much thought, I decided this was an obvious patch as regs is
> used uninitialized otherwise when passed to ptrace.
Leaves me wondering what field of regs other than regs.dbg_regs is
the kernel actually looking at then for NT_ARM_HW_WATCH/NT_ARM_HW_BREAK,
given regs.dbg_regs _is_ initialized:
for (i = 0; i < count; i++)
{
regs.dbg_regs[i].addr = addr[i];
regs.dbg_regs[i].ctrl = ctrl[i];
}
if (ptrace (PTRACE_SETREGSET, tid,
watchpoint ? NT_ARM_HW_WATCH : NT_ARM_HW_BREAK,
(void *) &iov))
Makes me wonder whether the issue is that "count" isn't right for
the running kernel.
Was a patch for gdbserver ever posted/committed? AFAICS,
gdbserver's aarch64_linux_set_debug_regs is an exact copy of gdb's.
--
Pedro Alves
next prev parent reply other threads:[~2013-09-16 12:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-27 20:13 Andrew Pinski
2013-07-27 21:34 ` Andreas Schwab
2013-07-27 22:42 ` Andrew Pinski
2013-07-29 17:56 ` Tom Tromey
2013-09-10 14:38 ` Will Newton
2013-09-12 7:15 ` Andrew Pinski
2013-09-16 12:44 ` Pedro Alves [this message]
2013-09-16 12:53 ` Will Newton
2013-09-16 13:38 ` Pedro Alves
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=5236FD06.9070807@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pinskia@gmail.com \
--cc=schwab@linux-m68k.org \
--cc=will.newton@linaro.org \
/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