title: What is the gdbserver used when running linux kernel on qemu?
body: <p>I am new to kernel debugging using gdb. Few days back I read that we can turn on KGDB which is a gdb server running in the kernel . We can connect to this gdbserver on kernel using the gdb client on host machine used for development.</p>
  <p>Today I came across a different solution where we run the kernel on a virtual environment on qemu. There we do not turn on the KGDB still we can connect to the qemu using gdb client. I think &quot;gdbstub&quot; acts as the gdbserver here and gdb client connects to QEMU and not the kernel. Is my understanding correct? This setup is somewhat similar to using a JTAG to control the cpu rather than the kernel. Is this correct?</p>