qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Fedorov <serge.fdrv@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling
Date: Fri, 25 Sep 2015 14:34:06 +0300	[thread overview]
Message-ID: <5605312E.5020908@gmail.com> (raw)
In-Reply-To: <55FC1A8E.1070401@gmail.com>

On 18.09.2015 17:07, Sergey Fedorov wrote:
> On 18.09.2015 16:50, Peter Maydell wrote:
>> On 14 September 2015 at 11:51, Sergey Fedorov <serge.fdrv@gmail.com> wrote:

>> @@ -904,7 +913,16 @@ void arm_debug_excp_handler(CPUState *cs)
>>                      arm_debug_target_el(env));
>>          }
>>      } else {
>> -        if (check_breakpoints(cpu)) {
>> +        CPUBreakpoint *bp;
>> +        uint64_t pc = is_a64(env) ? env->pc : env->regs[15];
>> +
>> +        QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
>> +            if (bp->pc == pc && !(bp->flags & BP_CPU)) {
>> +                return;
>> +            }
>> +        }
>> This extra code looks right, but isn't it fixing a different bug?
> You are right, it would better come to separate patch.

Actually, I can't think of it as a separate patch. This change is really
required only if we remove check_breakpoints() here. Otherwise
check_breakpoints() calls bp_wp_matches() which do the necessary check.

Best regards,
Sergey

  parent reply	other threads:[~2015-09-25 11:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 10:51 [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling Sergey Fedorov
2015-09-18 13:50 ` Peter Maydell
2015-09-18 14:07   ` Sergey Fedorov
2015-09-18 14:14     ` Peter Maydell
2015-09-18 16:33       ` Sergey Fedorov
2015-09-18 16:36         ` Peter Maydell
2015-09-18 17:14           ` Sergey Fedorov
2015-09-25 11:34     ` Sergey Fedorov [this message]
2015-09-25 11:42       ` Sergey Fedorov

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=5605312E.5020908@gmail.com \
    --to=serge.fdrv@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).