[Nexus 5 Q&A, Help & Troubleshooting] int80:
FYI, if someone gives me the right response, I will paypal $50 in their account. This is how desperate I am.

I have spent a week trying to enable kernel level debugging over the serial jack port and have got nowhere. Every time I enable them, I get a number of errors. I've gone through endless tutorials and books on the subject, but nothing seems to work properly.

This is the kprobe self test at boot time:

[ 6.502088] Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM
[ 6.508480] Modules linked in:
[ 6.511517] CPU: 0 Not tainted (3.4.0-geaa8415 #1)
[ 6.516675] PC is at kprobe_arm_test_cases+0x520/0x18bac
[ 6.521931] LR is at 0x7
[ 6.524484] pc : [<c010e59c>] lr : [<00000007>] psr: 00000013
[ 6.524486] sp : ee04fdf8 ip : 21522d52 fp : 21522a52
[ 6.535939] r10: 21522b52 r9 : 21522852 r8 : 21522952
[ 6.541118] r7 : 21522652 r6 : 21522752 r5 : 21522452 r4 : 21522552
[ 6.547658] r3 : 21522252 r2 : 21522352 r1 : 21522052 r0 : 21522152
[ 6.554136] Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 6.561461] Control: 10c5787d Table: 0000406a DAC: 00000015
[ 6.567159]
[ 6.567160] PC: 0xc010e51c:
[ 6.571409] e51c 6c646e61 31720965 72202c34 72202c30 202c3331 206c736c 00343172 00000001
[ 6.579570] e53c f00f00ff 00000e01 00000008 00002000 000c000c e320f000 d000ee1d e320f000
[ 6.587729] e55c ebfffcfd ebfffcf6 09646e61 2c323172 2c637020 34317220 6f72202c 31722072
[ 6.595889] e57c 00000034 00000e01 f00f00ff 00000e01 00000007 00002000 000c000c e7f001f8
[ 6.604051] e59c e00fce7e e7f001f8 ebfffceb ebfffce4 09646e61 2c343172 2c307220 2c637020
[ 6.612209] e5bc 6c736c20 34317220 00000000 00000001 f00f00ff 00000e01 00000008 00002000
[ 6.620368] e5dc 000c000c e320f000 e000ee1f e320f000 ebfffcd9 ebfffcd2 65646e61 30720971
[ 6.628529] e5fc 7220202c 202c3131 66783023 00000035 00000b01 12345678 00002000 000c000c

KGDB boot time test:

[ 198.615183] WARNING: at drivers/misc/kgdbts.c:813 run_simple_test+0x11c/0x29c()
[ 198.622441] Modules linked in:
[ 198.625482] [<c010e414>] (unwind_backtrace+0x0/0x144) from [<c0a4b118>] (dump_stack+0x20/0x24)
[ 198.634077] [<c0a4b118>] (dump_stack+0x20/0x24) from [<c0194138>] (warn_slowpath_common+0x5c/0x74)
[ 198.643048] [<c0194138>] (warn_slowpath_common+0x5c/0x74) from [<c019417c>] (warn_slowpath_null+0x2c/0x34)
[ 198.652685] [<c019417c>] (warn_slowpath_null+0x2c/0x34) from [<c0510f3c>] (run_simple_test+0x11c/0x29c)
[ 198.662058] [<c0510f3c>] (run_simple_test+0x11c/0x29c) from [<c0510be4>] (kgdbts_put_char+0x30/0x38)
[ 198.671174] [<c0510be4>] (kgdbts_put_char+0x30/0x38) from [<c01feae0>] (put_packet+0xa8/0x120)
[ 198.679737] [<c01feae0>] (put_packet+0xa8/0x120) from [<c01ff51c>] (gdb_serial_stub+0x348/0x1060)
[ 198.688620] [<c01ff51c>] (gdb_serial_stub+0x348/0x1060) from [<c01fe028>] (kgdb_cpu_enter+0x318/0x6a4)
[ 198.697911] [<c01fe028>] (kgdb_cpu_enter+0x318/0x6a4) from [<c01fe5a0>] (kgdb_handle_exception+0x94/0x1b0)
[ 198.707545] [<c01fe5a0>] (kgdb_handle_exception+0x94/0x1b0) from [<c010d84c>] (kgdb_compiled_brk_fn+0x38/0x40)
[ 198.717528] [<c010d84c>] (kgdb_compiled_brk_fn+0x38/0x40) from [<c01000fc>] (do_undefinstr+0xfc/0x20c)
[ 198.726816] [<c01000fc>] (do_undefinstr+0xfc/0x20c) from [<c0a5da28>] (__und_svc+0x48/0x60)
[ 198.735114] Exception stack(0xee04fe78 to 0xee04fec0)

Also, I compiled my own kernel and enabled module loading, but when I try and load my own module I get this error:

127|root@hammerhead:/data/local/tmp # insmod ./kgdboc.ko

insmod: init_module './kgdboc.ko' failed (Function not implemented)

My question is, has anyone got this working? There must be a way of doing it, or else there would be no point in having it in the kernel.

Does anyone know how to enable/initialise the FIQ debugger? I really don't want to go down the printk path.

Thanks