Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jonah Graham <jonah@kichwacoders.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tudor Popescu <popescu.m.tudor@gmail.com>,
	GDB Development <gdb@sourceware.org>
Subject: Re: GDB doesn't interrupt target
Date: Wed, 18 Dec 2019 15:49:00 -0000	[thread overview]
Message-ID: <CAPmGMvhN_i6Qm7fKoNFOq0Cp1qy6e=HJvHajLnJSdbePoyf7Lg@mail.gmail.com> (raw)
In-Reply-To: <c308e9cb-038f-015a-fff9-0712d41406a9@redhat.com>

On Wed, 18 Dec 2019 at 09:59, Pedro Alves <palves@redhat.com> wrote:

> On 12/18/19 2:20 PM, Tudor Popescu wrote:
> > What I need, is a way to interrupt the target while target is running.
>

The way to do this is press the "Suspend" button in the toolbar in Eclipse,
or typing the "interrupt" command in the Debugger Console. If these don't
both work for you, there may be a bug in CDT. Please raise a bug against
CDT on https://bugs.eclipse.org/bugs/enter_bug.cgi?product=CDT and I will
look at it. Please be sure to include where you got your Eclipse from - if
it is from a vendor they may be the one with the issue and you should
probably be in touch with them first.


> > 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.
>

Yes, this is the case. The GDB folk did some great work so that a fully
fledged GDB console can be integrated in an IDE and that is what CDT does
with GDB >= 7.12 on Linux hosts.


> >
> > 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?
>

You would have to change how GDB is integrated into CDT rather than
changing GDB. However I hope the above answers mean you don't need that.


>
> So what _do_ you see when you "kill -2" gdb?  Do you see a "Quit" being
> printed?
> I.e., the GDB console is accepting commands while the target is running?
>
> I assume Eclipse sends "set mi-async on" or "set target-async on" nowadays.
>
>
CDT uses -gdb-set target-async on



> The right way to interrupt the target is to send -exec-interrupt via the
> MI channel.
>
>
That is what CDT does .

I hope that helps,
Jonah


~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


  reply	other threads:[~2019-12-18 15:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 14:20 Tudor Popescu
2019-12-18 14:59 ` Pedro Alves
2019-12-18 15:49   ` Jonah Graham [this message]
     [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='CAPmGMvhN_i6Qm7fKoNFOq0Cp1qy6e=HJvHajLnJSdbePoyf7Lg@mail.gmail.com' \
    --to=jonah@kichwacoders.com \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    --cc=popescu.m.tudor@gmail.com \
    /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