If I write an application, which mmap pcie device's bar space to user space. like below:
fd = open("pcie bar");
bar_addr = mmap(fd, size, 0);
*(uint32_t *)bar_addr = val;
In actual scene, the code is a small piece of big application. How to find the location where the 'bar_addr' is write?
I know gdb watchpoint can watch memory address, and do a test, find that gdb watchpoint can't watch pcie bar address.