Skip to contentSkip to conversation

KGDB: I cannot stop execution by using "ctrl+c"

DISCUSSION colin 2 participants 3 messages Nov 3, 2004 – Nov 12, 2004 MIPS

lore
Share & tools
lore

colin

author
#0 lore raw

Hi all,
When using gdb to debug Linux kernel, I found that it cannot be stopped temporarily by using "ctrl+c".
After the first strike of "ctrl+c", nothing happen.
After the second, Linux kernel will show these messages:
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n)
If choose yes, kernel will totally stop and it goes back to gdb shell. How can I stop kernel temporarily and then resume it?

Thanks and regards,
Colin

#1 lore raw

Hello Colin,

Quoted 9 lines · colin

When using gdb to debug Linux kernel, I found that it cannot be stopped temporarily by using "ctrl+c".
After the first strike of "ctrl+c", nothing happen.
After the second, Linux kernel will show these messages:
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n)
If choose yes, kernel will totally stop and it goes back to gdb shell. How can I stop kernel temporarily and then resume it?

You should use the following command in GDB:

set remotebreak 1

After that it will start to behave as you expect it to, i.e. it will interrupt the kernel as soon as you press CTRL-C.

Happy hacking,
Vladimir

author
#2 lore raw

Hi Vladimir,
It still cannot work using "set remotebreak 1".

Regards,
Colin

----- Original Message -----
From: "Vladimir A. Gurevich" <[email protected]>
To: "colin" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, November 03, 2004 11:21 PM
Subject: Re: KGDB: I cannot stop execution by using "ctrl+c"

Quoted 23 lines

Hello Colin,

Quoted 9 lines · colin

When using gdb to debug Linux kernel, I found that it cannot be stopped temporarily by using "ctrl+c".
After the first strike of "ctrl+c", nothing happen.
After the second, Linux kernel will show these messages:
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n)
If choose yes, kernel will totally stop and it goes back to gdb shell. How can I stop kernel temporarily and then resume it?

You should use the following command in GDB:

set remotebreak 1

After that it will start to behave as you expect it to, i.e. it will interrupt the kernel as soon as you press CTRL-C.

Happy hacking,
Vladimir