[meta-xilinx] debugging kernel modules
Martin Townsend
martin.townsend at xsilon.com
Wed Feb 5 03:45:30 PST 2014
Hi,
Sorry if this isn't the right forum but does anyone know how (and if
it's possible) to debug kernel modules using the xilinx tools? I have
managed to build the kernel with debug sysmbols and can happily step
through code within the kernel using XMD + mb-gdb on a host PC. If I
then load the symbols for my kernel module with add-symbol-file and then
try and set a breakpoint gdb says it's set the break point but has hung
and XMD reports lots of "Data TLB miss exceptions" as shown below.
Error:
ERROR: The following exception occured during read operation - Data
TLB miss exception.
Exception Address Register (EAR): 0xf213af28
Error:
ERROR: The following exception occured during read operation - Data
TLB miss exception.
Exception Address Register (EAR): 0xf213af2c
Error:
ERROR: The following exception occured during read operation - Data
TLB miss exception.
Exception Address Register (EAR): 0xf213af30
Error:
ERROR: The following exception occured during read operation - Data
TLB miss exception.
Exception Address Register (EAR): 0xf213af34
Error:
It looks like it is trying to find an address that is valid to set the
break point on.
When stepping through kernel code it looks like it's using physical
addresses, ie 0xc00xxxxxx. I assume My kernel module is using virtual
addresses hence the 0xf213xxxx addresses. This would explain the Data
TLB miss exception.
If my module causes a panic so there's an address in the backtrace, I
can then set breakpoints in my kernel module, view variables etc as I
suppose the virtual memory range for my module is now valid with the MMU.
I'm using mb-gdb and XMD from 2103.3 SDK.
Any help appreciated,
Martin.
More information about the meta-xilinx
mailing list