* APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl.
@ 2021-02-02 12:13 He Leon
2021-02-02 13:47 ` Paul Koning
0 siblings, 1 reply; 3+ messages in thread
From: He Leon @ 2021-02-02 12:13 UTC (permalink / raw)
To: gdb
Hi all,
I meet an issue while debugging APP by gdb.
I have a very simple APP and a very simple Kernel Mode Driver. APP accesses Kernel Mode Driver via IOCTL.
When I debug APP in User Mode by gdb, I found if APP enters and stays inside IOCTL, the APP cannot be interrupted to gdb console by control+C.
The issue is quite easy to be reproduced. I have reproduced it over different versions of kernel or gdb.
Is there such limitation for: gdb doesn't work if APP enters and stays in kernel mode?
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl.
2021-02-02 12:13 APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl He Leon
@ 2021-02-02 13:47 ` Paul Koning
[not found] ` <ME3PR01MB6104A7C20E589FCA43C0B389EEB49@ME3PR01MB6104.ausprd01.prod.outlook.com>
0 siblings, 1 reply; 3+ messages in thread
From: Paul Koning @ 2021-02-02 13:47 UTC (permalink / raw)
To: He Leon; +Cc: gdb
> On Feb 2, 2021, at 7:13 AM, He Leon via Gdb <gdb@sourceware.org> wrote:
>
> Hi all,
>
> I meet an issue while debugging APP by gdb.
>
> I have a very simple APP and a very simple Kernel Mode Driver. APP accesses Kernel Mode Driver via IOCTL.
>
> When I debug APP in User Mode by gdb, I found if APP enters and stays inside IOCTL, the APP cannot be interrupted to gdb console by control+C.
>
> The issue is quite easy to be reproduced. I have reproduced it over different versions of kernel or gdb.
>
> Is there such limitation for: gdb doesn't work if APP enters and stays in kernel mode?
Of course, and that is true for every debugger. Debugger interrupt works by delivering a signal to the process. If the process is in a state where a signal can't be delivered to it (such as in a driver operation which you have coded not to be interruptable) then the signal remains pending until the blocking operation finishes.
You probably need to do some kernel mode debugging to fix your driver first.
paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-03 14:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 12:13 APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl He Leon
2021-02-02 13:47 ` Paul Koning
[not found] ` <ME3PR01MB6104A7C20E589FCA43C0B389EEB49@ME3PR01MB6104.ausprd01.prod.outlook.com>
2021-02-03 14:01 ` Paul Koning
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).