Hi folks,

I am using qemu and gdb to debug the Linux kernel. I wanted to stop one thread 
while letting other threads continue running. I found that there is a command 
called non-stop in gdb which can help me achieve my goal. The details of 
non-stop mode in gdb are shown in 
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Non_002dStop-Mode.html

Here is my command to run qemu with the kernel image:

sudo qemu-system-x86_64 -smp 4 -m 8G
-drive 
if=ide,index=0,format=qcow2,file=./CentOS-7-x86_64-GenericCloud-2003.qcow2
-nographic -enable-kvm
-device e1000,netdev=net0 -netdev user,id=net0
-s -S

On another terminal, I run "gdb vmlinux". Then I followed what the tutorial 
said to enable non-stop mode:
(gdb) set target-async 1
(gdb) set non-stop on
(gdb) target remote:1234
Remote debugging using :1234
Non-stop mode requested, but the remote does not support non-stop.

It seems that qemu does not support non-stop mode. Do I need to do something 
extra to enable non-stop mode in gdb and qemu? If it is not supported, how 
could I stop one thread while letting other threads continue running in gdb ?


Reply via email to