0

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.

Jams.Liu
  • 493
  • 1
  • 4
  • 13
  • You'll need to provide a [mcve] to make this an answerable question suitable for StackOverflow. Good luck. – shellter Aug 07 '23 at 14:36
  • 1
    Related question: https://stackoverflow.com/questions/30190050/what-is-the-base-address-register-bar-in-pcie – jxh Aug 07 '23 at 15:25

0 Answers0