From: Frederic Weisbecker <fweisbec@gmail.com>
To: DDD <dongdong.deng@windriver.com>
Cc: Jason Wessel <jason.wessel@windriver.com>,
will.deacon@arm.com, lethal@linux-sh.org,
mahesh@linux.vnet.ibm.com, prasad@linux.vnet.ibm.com,
benh@kernel.crashing.org, paulus@samba.org, mingo@elte.hu,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] hw-breakpoints, kgdb, x86: add a flag topassDIE_DEBUG notification
Date: Wed, 28 Jul 2010 19:08:57 +0200 [thread overview]
Message-ID: <20100728170854.GC5394@nowhere> (raw)
In-Reply-To: <4C4D6DD3.80909@windriver.com>
On Mon, Jul 26, 2010 at 07:13:23PM +0800, DDD wrote:
> Frederic Weisbecker wrote:
>> Why? It seems to me a kernel debugger should have the highest priority
>> over anything.
>
> In my option, the reason of kgdb set the lowest-prio for
> notifier is:
>
> For letting kgdb to keep simple, there is no codes to check the
> breakpoint event was generated by kgdb or not, thus it have to set kgdb
> as lowest priority to notifier.
>
> If the breakpoint event is not generated by kgdb, the source of the
> breakpoint event will consume that event before passing to kgdb's
> routine, so that the breakpoint event of kgdb getting must be generated
> by kgdb itself.
Ok, but that makes it hard to differentiate from a spurious breakpoint
event.
>>
>>
>>
>>>> - Always returning NOTIFY_DONE from the breakpoint path.
>>>>
>>>>
>>> Without some further investigation, I am not sure what this will do.
>>
>>
>>
>> Nothing, this NOTIFY_STOP is only an optimization. But now I think that
>> won't solve the problem. We still clear a dr6 trap bit for a debug
>> exception due to lazy dr7 switches we have to handle.
>>
>> This is why kgdb should have the highest priority, or use the overflow
>> callback.
>
>
> OK, I will try to use the overflow callback to let kgdb works with
> hw_breakpoints. :-)
>
> Thanks,
> Dongdong
Thanks.
kgdb sets breakpoints through arch_install_hw_breakpoint()
So when it triggers, it will be handled by perf through
perf_bp_event(), so it's quite natural it is considered as
handled and then it's bit removed from dr6. The only way
for kgdb to handle it properly is to set an overflow_handler.
Tell me if you encounter any problem.
next prev parent reply other threads:[~2010-07-28 17:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 2:16 [RFC PATCH] hw-breakpoints, kgdb, x86: add a flag to pass DIE_DEBUG notification Dongdong Deng
2010-07-23 13:04 ` Frederic Weisbecker
2010-07-23 13:19 ` [RFC PATCH] hw-breakpoints, kgdb, x86: add a flag to passDIE_DEBUG notification Jason Wessel
2010-07-23 14:07 ` Frederic Weisbecker
2010-07-23 15:49 ` [RFC PATCH] hw-breakpoints, kgdb, x86: add a flag topassDIE_DEBUG notification Jason Wessel
2010-07-23 16:17 ` Frederic Weisbecker
2010-07-26 11:13 ` DDD
2010-07-28 17:08 ` Frederic Weisbecker [this message]
2010-07-28 17:15 ` [RFC PATCH] hw-breakpoints, kgdb, x86: add a flagtopassDIE_DEBUG notification Jason Wessel
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=20100728170854.GC5394@nowhere \
--to=fweisbec@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=dongdong.deng@windriver.com \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=prasad@linux.vnet.ibm.com \
--cc=will.deacon@arm.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