02-12-2018 08:44 PM
I am trying to debug the petalinux kernel I compiled following this tutorial. However, the breakpoints are not always working well. I tried these functions using both hardware and regular breakpoint mode:
After a few tries, I found that all the breakpoints became useless after this boot message: (by stepping over from start_kernel)
Trying to unpack rootfs image as initramfs...
** The breakpoint I set on printk worked well before this message and after that, it didn't get hit anymore, either.
Can someone tell me how to handle this?
02-13-2018 07:55 AM
That is pretty ancient now.
Are all your tools fixed at the release of ISE and SDK this was written for?
If not, then I advise you move into the modern age with Vivado for Zynq rather than struggling with what is now, old tools and flows.
02-13-2018 10:47 AM
Thanks for your reply and sorry for the confusion. All the tools (Vivado, petalinux and XSDK) I am using are 2017.2 version. I found other tutorials for kernel debugging, such as AR# 67767. Actually, they're talking the same procedure and none of them solved my problem.
06-04-2018 10:02 AM
I'm seeing the same problem with 2018.1. Setting a breakpoint in start_kernel works fine, but a lot of other functions do not.. For instance anfc_probe. Its listed in the symbol table
ffffff800860e7d0 l F .text 0000000000000a70 anfc_probe
and the address shows up correctly in the debugger when adding the BP.
I'm guessing this has something to do with it being a built-in module.
12-07-2018 02:02 PM
I've hit the same thing in 2018.1 and 2018.2 (Petalinux version == SDK Version == Vivado version). I can set breakpoints at kernel_start and a few others but a kernel module's _probe function doesn't break.
I've modified the module to make sure the function was exported to the kernel.
I've tried making the breakpoint a hardware, instead of software breakpoint.
I've done this with 32-bit targets (Zynq-7000) and 64-bit targets (ZynqSMP) and same results.
The debugging host machine is the same one used to build the Petalinux image.
I booted via JTAG (petalinux-boot --jtag --kernel)
I get an error message when setting the breakpoint indicating the breakpoint was in multiple files. I verified this is NOT the case at a source code level.
05-02-2019 03:07 AM
I'm facing the same problem. I did not use petalinux but compiled kernel myself.
Breakpoints are working for a while, but after some times they do not trigger anymore, even if the instruction is executed.
Did you find any solutions ?