From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42535 invoked by alias); 18 Dec 2019 14:20:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 42527 invoked by uid 89); 18 Dec 2019 14:20:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=launched, ctrl-c, ctrlc, 7111 X-HELO: mail-io1-f48.google.com Received: from mail-io1-f48.google.com (HELO mail-io1-f48.google.com) (209.85.166.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2019 14:20:50 +0000 Received: by mail-io1-f48.google.com with SMTP id n21so574594ioo.10 for ; Wed, 18 Dec 2019 06:20:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=dx1/8DCchgluCM8/U6RUh3FJN/32iorYGx+Vqi3iP/w=; b=t62TN4UXOLxtiCgFG/7FbvfjPYK+Exxd8BaG0rT7qkRMjlrB1ubehykyUU7jTLYM6t vXJQaKfPPDArCWQMRlt7ikRCKCLeNjjX6siNvV/BgG8I7y/98d11fqjW8ZXVkT5u/HKw AVK/LZ7Ruz/pUDsWRowzVm/rINAZI3h0oWZLbWWO3s0ULICXskIPYvJTuILOVlUYmYpe +agN7z5rMAK8hc2kTMUu1ysxee59j+ZPnHI3wgSCpEWSk0rlG5FVr8wkTUNxDNb8jSCH S+sP3mNXjBb64tu+ESD04HOPXesiDyFspLrhhKVFhw6SMOIjm348YpXXClzTnwHa4UzR ue0w== MIME-Version: 1.0 From: Tudor Popescu Date: Wed, 18 Dec 2019 14:20:00 -0000 Message-ID: Subject: GDB doesn't interrupt target To: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-12/txt/msg00031.txt.bz2 Hello, I am using an eclipse-based IDE and a gdb/gdbserver combination for aarch64 targets. GDB version we use is 8.2.1 on a Linux host. Main problem is GDB doesn't interrupt the target when Ctrl-C is sent to eclipse's Debugger Console. Same thing happens when using kill -2 on pidof(gdb), or when pressing suspend button in eclipse. As far as I can tell, GDB 8.2.1 is launched with 2 interpreters: console and mi2. The actual arguments are: --interpreter mi2 -q --interpreter console -ex "new-ui mi /dev/pts/5" -ex "set pagination off" -ex "show version" The old GDB 7.11.1 we used, received only "=E2=80=93interpreter mi2 --nx" as arguments and everything related to target interrupt was working as expected. >From my investigation, the behavior described above is somehow related to the terminal management (and also target_terminal::is_ours()). Looks like when eclipse is involved, target_pass_ctrlc() is never called. My understanding is that we need target_terminal::is_ours() to return false in order to interrupt the target. But this never happens on my setup. What I need, is a way to interrupt the target while target is running. Also, I would like to understand what is causing the above mentioned behavior. I know that GDB 7.12+ introduced some changes to support a prettier Debugger Console in eclipse and this seems to impact somehow the interrupt functionality in my case. So the main question is how do I make GDB 8.2.1 behave like GDB 7.11.1 when it comes to target interrupting (e.g. Ctrl+C)? Are there any special arguments that need to be passed to GDB?