Neha Karanjkar
Neha Karanjkar

Reputation: 3500

How to interrupt an infinite loop running in qemu+gdb?

I am using qemu to emulate a sparc V8 machine and using this as a remote target for gdb to debug a modified bootloader program. There is a bug in the program that causes it to run in an infinite loop.

My plan is to interrupt qemu a number of times to see which region of code is causing the execution in an infinite loop. How to interrupt qemu by pressing a key to examine the processor state?

Once interrupted, I know how to examine the registers etc using gdb, but I don't know how to interrupt qemu in the first place. I could not find this info after googling. Thanks for any hints.

Upvotes: 2

Views: 1654

Answers (1)

Ctrl + C works as others mentioned, just as it does on regular userland processes.

Tested with the minimal setup explained on this answer: How to debug the Linux kernel with GDB and QEMU?

Upvotes: 1

Related Questions