Kernel debugging AGX Xavier

Can you advice how to get kernel debug info for AGX Xavier? I found the link below but if says

Applies to: Jetson TX2 series devices only

Does it apply for Xavier as well?

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3231/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/debugging_kgdb.html

I have not tested this in a long time, but the steps in the URL would be correct for the most part. The part which differs is in the installation of the debug kernel and/or modules. Basically, whatever is shown done to the kernel is the same on the NX. I would say try it, but set the kernel for an alternate boot entry to select via serial console at boot time rather than replacing the kernel (and check the NX docs for instructions rather than using the TX2 kernel update docs).

Note that if you add an extra duplicate entry in “/boot/extlinux/extlinux.conf”, and use an alternate kernel Image filename (e.g., “Image-kgdb”), use a different CONFIG_LOCALVERSION so that you have a new uname -r (and thus modules go to a new “/lib/modules/$(uname -r)/” location) that it should be possible to do this without any flashing and you could still boot to the original kernel if your attempt does not work.

Also, the “APPEND” key/value pair in extlinux.conf should allow adding the extra arguments, e.g., where it mentions adding “ kgdbwait”.

Thanks @linuxdev