Re: how to creat watchpoint in kernel for data access debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 23, 2014 at 03:51:17AM +0100, Wang, Yalin wrote:
> I have a problems that I want create a watchpoint to monitor a data for
> Debug in kernel , but I don't know how to do it , I try the kprobes , but
> seems it only support create .text section probe , Can't monitor data
> access ,  then  I try  perf_event_create to create a hardware Data
> watchpoint , it can work , but has a problem: When the data access hit , I
> don't know how to bypass this time's watchpoint , This need simulate the
> data access  or step the break instructions in data abort Exception
> handler ,  seems kernel don't provide these for perf_event ..
> 
> I test this on ARM arch ,
> My question is that how to create data watchpoint in kernel ?

It depends on why you want the watchpoint. If it's for counting accesses to
that data, then you can use the perf tool and the perf code will try to deal
with the single-stepping for you. Otherwise, you can investigate KGDB, but
I've never tried it myself (and I don't think it uses hardware watchpoint
for ARM)..

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux