From: Tudor Popescu <popescu.m.tudor@gmail.com>
To: gdb@sourceware.org
Subject: GDB doesn't interrupt target
Date: Wed, 18 Dec 2019 14:20:00 -0000 [thread overview]
Message-ID: <CAHrp7QA5yjKqv5zfheG-TaFG6KPsVg2TZj=CCjMcSQ349LLVPA@mail.gmail.com> (raw)
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 "–interpreter 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?
next reply other threads:[~2019-12-18 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 14:20 Tudor Popescu [this message]
2019-12-18 14:59 ` Pedro Alves
2019-12-18 15:49 ` Jonah Graham
[not found] ` <CAHrp7QDmyiyyXtpcA_XSN41=eZM3eT3vwhuY5e9WTCqHGD_k1g@mail.gmail.com>
2019-12-19 14:22 ` Pedro Alves
2019-12-19 14:47 ` Jonah Graham
2019-12-20 15:37 ` Tudor Popescu
2019-12-20 16:23 ` Jonah Graham
2019-12-23 14:37 ` Tudor Popescu
2019-12-23 16:32 ` Jonah Graham
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='CAHrp7QA5yjKqv5zfheG-TaFG6KPsVg2TZj=CCjMcSQ349LLVPA@mail.gmail.com' \
--to=popescu.m.tudor@gmail.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