8 hours ago
I have compiled kernel 3.13.0-55 on Ubuntu on both AMD and Intel machines. I tried to copy compiled kernel to Intel target but it won't boot with that one. Therefore I have compiled the same version of kernel on that Intel. I can run this kernel on Intel and Intel waits for kgdb to attach to it. I do it on AMD with
target remote /dev/ttyS0
and I am able to step into kernel code over serial connection. I do continue then, Intel continues to run, and I cannot return the control to debugger running on AMD any more. Writing g to /proc/sysrq-trigger halts the Intel but control isn't returned to the AMD gdb.
Is this because it is not EXACTLY same (not copied) version of kernel? If yes, how should I compile correct kernel to be able to debug Intel from AMD? Enable Magic SysRq is set in kernel config.
Though it doesn't work when I try to debug Intel from Amd (both running the same kernel 3.13.11-ckt20 SMP 2015 x86_64 x86_64 x86_64 GNU/Linux ): target - Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz host - AMD FX(tm)-4100 Quad-Core Processor
it works in the opposite direction: target - AMD FX(tm)-4100 Quad-Core Processor host - Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz
Maybe it is related to hardware breakpoints, registers, cpu implementation?