From: "colin" <colin@realtek.com.tw>
To: "Nigel Stephens" <nigel@mips.com>
Cc: <linux-mips@linux-mips.org>
Subject: Re: Using hardware watchpoint for applications debugging
Date: Thu, 30 Mar 2006 10:15:28 +0800 [thread overview]
Message-ID: <002d01c6539f$d040a200$106215ac@realtek.com.tw> (raw)
In-Reply-To: 442A94D0.1020106@mips.com
Hi Nigel,
We use the same way with you to handle the issue 2.
As to adding watchpoint to kernel, there will be another problem.
ASID in kernel is variable. Therefore, we cannot indicate which thread we
want to watch by ASID.
What we can do is setting G (global) bit to WatchHi Register and then all
threads accessing that address will cause the exception.
In the exception, it will filter the threads by PID to find out the thread
we are watching.
Regards,
Colin
----- Original Message -----
From: "Nigel Stephens" <nigel@mips.com>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Wednesday, March 29, 2006 10:08 PM
Subject: Re: Using hardware watchpoint for applications debugging
>
>
> colin wrote:.
> > 2. When an exception happens and we find that it's not touching the
righ
> > address, we will discard it. However, exception will happen again
because
> > the former instruction will be re-executed when the exception is
finished.
> >
> >
>
> You'll need to single-step over the instruction which generated the
> unwanted watchpoint exception, with the watchpoint disabled. Then after
> handling the single step reenable the watchpoint and resume normal
> execution.
>
> It would be best if you added watchpoint support to the kernel ptrace
> code: since that would make the watchpoints usable by GDB also.
>
> Nigel
>
WARNING: multiple messages have this Message-ID (diff)
From: "colin" <colin@realtek.com.tw>
To: Nigel Stephens <nigel@mips.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Using hardware watchpoint for applications debugging
Date: Thu, 30 Mar 2006 10:15:28 +0800 [thread overview]
Message-ID: <002d01c6539f$d040a200$106215ac@realtek.com.tw> (raw)
Message-ID: <20060330021528.ll8X5TfViz4iWRX9zSYUYPVmByAVbuyzPA4X06yD6Eg@z> (raw)
In-Reply-To: 442A94D0.1020106@mips.com
Hi Nigel,
We use the same way with you to handle the issue 2.
As to adding watchpoint to kernel, there will be another problem.
ASID in kernel is variable. Therefore, we cannot indicate which thread we
want to watch by ASID.
What we can do is setting G (global) bit to WatchHi Register and then all
threads accessing that address will cause the exception.
In the exception, it will filter the threads by PID to find out the thread
we are watching.
Regards,
Colin
----- Original Message -----
From: "Nigel Stephens" <nigel@mips.com>
To: "colin" <colin@realtek.com.tw>
Cc: <linux-mips@linux-mips.org>
Sent: Wednesday, March 29, 2006 10:08 PM
Subject: Re: Using hardware watchpoint for applications debugging
>
>
> colin wrote:.
> > 2. When an exception happens and we find that it's not touching the
righ
> > address, we will discard it. However, exception will happen again
because
> > the former instruction will be re-executed when the exception is
finished.
> >
> >
>
> You'll need to single-step over the instruction which generated the
> unwanted watchpoint exception, with the watchpoint disabled. Then after
> handling the single step reenable the watchpoint and resume normal
> execution.
>
> It would be best if you added watchpoint support to the kernel ptrace
> code: since that would make the watchpoints usable by GDB also.
>
> Nigel
>
next prev parent reply other threads:[~2006-03-30 2:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-29 13:47 Using hardware watchpoint for applications debugging colin
2006-03-29 13:47 ` colin
2006-03-29 14:08 ` Nigel Stephens
2006-03-29 14:32 ` Kevin D. Kissell
2006-03-29 14:32 ` Kevin D. Kissell
2006-03-30 2:19 ` colin
2006-03-30 2:19 ` colin
2006-03-30 2:15 ` colin [this message]
2006-03-30 2:15 ` colin
2006-03-30 10:49 ` Nigel Stephens
2006-03-30 18:37 ` Ralf Baechle
2006-03-30 18:57 ` Daniel Jacobowitz
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='002d01c6539f$d040a200$106215ac@realtek.com.tw' \
--to=colin@realtek.com.tw \
--cc=linux-mips@linux-mips.org \
--cc=nigel@mips.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