The traditional method (which I use most of the time) is to simply add printk to the appropriate sections of the code, and then read the code and fix the whole problem as soon as you narrow it down. I believe that this is usually what the developers of the MOST kernel do (of course, all 6 of my colleagues in my team and five six who work in another group). [I work with Linux on a PC, not on Android devices, but essentially it's the same kernel ...]
I'm sure kgdb can be used in some way, but it relies on having the right port (like serial or ethernet) to connect the debugger through, the serial number is hard to find on modern PCs and doesn't exist on everything in mobile phones. Ethernet will be fine, but most mobile phones (and other Android platforms) tend to only have Wi-Fi, and as I understand it, a whole other piece of software is needed on top of a regular IP stack to work properly. I do not believe kgdb supports Wi-Fi.
Sorry, I canβt give you a better answer. [I see from your links that you definitely did not find a good answer ...]
Edit: However, perhaps this will help at least sometimes: http://bootloader.wikidot.com/android:kgdb
source share