linux-mips
[Top] [All Lists]

Re: Using hardware watchpoint for applications debugging

To: colin <colin@realtek.com.tw>
Subject: Re: Using hardware watchpoint for applications debugging
From: Nigel Stephens <nigel@mips.com>
Date: Wed, 29 Mar 2006 15:08:16 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <024c01c65337$63931c90$106215ac@realtek.com.tw>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <024c01c65337$63931c90$106215ac@realtek.com.tw>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 1.5 (Windows/20051201)

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


<Prev in Thread] Current Thread [Next in Thread>