Re: How to find out which part of code is changing a particular data structure.

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

 



Rajat Jain <rajatjain@xxxxxxxxxxx> writes:

> [...]  I have a memory location (One of the fields in a kernel data
> structure) and I want to track down the code that changes the value
> of that particular location. Some thing like a "watchpoint".

See the register_wide_hw_breakpoint API.  You could write a small
module that runs early, and gets callbacks when a given address is
modified.


> And this is early while I am still booting up. Can some one tell me
> if it is possible to do so?

(Were it not for the 'while still booting up' part, I'd suggest trying
systemtap's 

        probe kernel.data("SYMBOL").write { }
 or     probe kernel.data(0xDEADBEEF).write { }

probes, but we haven't worked through initramfs'ifying the widget.)


- FChE

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux