public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Paul Koning <paulkoning@comcast.net>
To: He Leon <Leon.He@msn.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl.
Date: Tue, 2 Feb 2021 08:47:07 -0500	[thread overview]
Message-ID: <D2BF7348-EBB5-4CA7-9FF0-51572F90E525@comcast.net> (raw)
In-Reply-To: <ME3PR01MB61043A7A2467138DC84E7B63EEB59@ME3PR01MB6104.ausprd01.prod.outlook.com>



> 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


  reply	other threads:[~2021-02-02 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 12:13 He Leon
2021-02-02 13:47 ` Paul Koning [this message]
     [not found]   ` <ME3PR01MB6104A7C20E589FCA43C0B389EEB49@ME3PR01MB6104.ausprd01.prod.outlook.com>
2021-02-03 14:01     ` Paul Koning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D2BF7348-EBB5-4CA7-9FF0-51572F90E525@comcast.net \
    --to=paulkoning@comcast.net \
    --cc=Leon.He@msn.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).