From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-06v.sys.comcast.net (resqmta-ch2-06v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:38]) by sourceware.org (Postfix) with ESMTPS id B3DFB3987C3B for ; Tue, 2 Feb 2021 13:47:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B3DFB3987C3B Received: from resomta-ch2-06v.sys.comcast.net ([69.252.207.102]) by resqmta-ch2-06v.sys.comcast.net with ESMTP id 6uoLlpethsjoS6w1OlT40X; Tue, 02 Feb 2021 13:47:10 +0000 Received: from pkoning.akdesign.com ([73.60.223.101]) by resomta-ch2-06v.sys.comcast.net with ESMTPSA id 6w1LlECOTRxAF6w1NlHfBN; Tue, 02 Feb 2021 13:47:10 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduledrgedtgdehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpedvtdevjeeuhefhiedvteffjeeuffehkefgudeutdevffefkeeijeelfeevuefhgeenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehpkhhonhhinhhgrdgrkhguvghsihhgnhdrtghomhdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtoheplhgvohhnrdhhvgesmhhsnhdrtghomhdprhgtphhtthhopehguggssehsohhurhgtvgifrghrvgdrohhrgh X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: APP cannot be interrupted to gdb console by contrl+c, if APP enters into kernel mode via ioctl. From: Paul Koning In-Reply-To: Date: Tue, 2 Feb 2021 08:47:07 -0500 Cc: "gdb@sourceware.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: He Leon X-Mailer: Apple Mail (2.3445.104.17) X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2021 13:47:14 -0000 > On Feb 2, 2021, at 7:13 AM, He Leon via Gdb = wrote: >=20 > Hi all, >=20 > I meet an issue while debugging APP by gdb. >=20 > I have a very simple APP and a very simple Kernel Mode Driver. APP = accesses Kernel Mode Driver via IOCTL. >=20 > 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. >=20 > The issue is quite easy to be reproduced. I have reproduced it over = different versions of kernel or gdb. >=20 > 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