Bug 304721 - Use GDB async mode for GDB 7.0
Summary: Use GDB async mode for GDB 7.0
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 13:29 EST by Marc Khouzam CLA
Modified: 2020-09-04 15:24 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2010-03-04 13:29:37 EST
Daniel Jacobowitz wrote in 
http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg17533.html

"Interrupting things on Windows is a mess.  The fact that for historical reasons, CDT does this by sending an actual C-c or DebugBreak to GDB makes it even worse.

The real solution to this problem is to not interrupt GDB.  Instead, drive GDB in asynchronous mode.  Then send -exec-interrupt.  We've made some big contributions to GDB over the last two years to make this work smoothly."

We should try to use the new GDB 7.0 async mode.
Comment 1 Pedro Alves CLA 2010-03-04 15:18:19 EST
GDB async mode requires target side support, and that needs to
implemented on a per-target basis (target here refers to the part
of GDB that abstracts the underlying debug APIs).

Currently (gdb 7.1), it's implemented on the native linux target, and
on the remote target; The latter means that async mode works against
a Windows gdbserver, as one connects to gdbserver using the remote target.

The native Windows target does not support async mode, yet.
Comment 2 Marc Khouzam CLA 2010-03-04 15:27:26 EST
(In reply to comment #1)
> GDB async mode requires target side support, and that needs to
> implemented on a per-target basis (target here refers to the part
> of GDB that abstracts the underlying debug APIs).
> 
> Currently (gdb 7.1), it's implemented on the native linux target, and
> on the remote target; The latter means that async mode works against
> a Windows gdbserver, as one connects to gdbserver using the remote target.
> 
> The native Windows target does not support async mode, yet.

Thanks Pedro.

So this bug dies here, right?  We wanted it for Windows.

I had started trying it out and I had all kinds of trouble on Linux (with 7.0.1).  Is MI automatically asynchronous?  I mean, when I do -exec-run should I be able to do some commands after or is there some thing like CLI run& that needs to be done.
Comment 3 Pedro Alves CLA 2010-03-05 09:44:59 EST
[reposting using the bugzilla web client; my yesterday's reply by email
(below) doesn't seem to have gotten through somehow.]

> So this bug dies here, right?  We wanted it for Windows.

Dunno the policies here.  You could leave it suspended
and point people here whenever the issue is raised.
It's not implemented today, but I'm sure it will be someday.
These things tend to be implemented faster if some
interested party drives the effort though.  ;-)

> I had started trying it out and I had all kinds of trouble on Linux (with
> 7.0.1).  Is MI automatically asynchronous?  I mean, when I do -exec-run should
> I be able to do some commands after or is there some thing like CLI run& that
> needs to be done.

I see what you mean.  Yes, you're right.  On 7.0 and 7.1,
-exec-run maps directly to  "run", so you'll need to
use CLI's "run&" as a workaround.  This is because
the target non-stop was designed for initially
only cared for -exec-attach, but you know that.  :-)

HEAD (future 7.2) has been fixed already.  -exec-run
behaves the same CLI's "run&" when async is on there.
Comment 4 Marc Khouzam CLA 2010-03-05 10:01:36 EST
(In reply to comment #3)
> [reposting using the bugzilla web client; my yesterday's reply by email
> (below) doesn't seem to have gotten through somehow.]

I don't believe bugzilla has the nice feature of allowing you to reply by email.  You have to go through the web, from what I've seen.

> > So this bug dies here, right?  We wanted it for Windows.
> 
> Dunno the policies here.  You could leave it suspended
> and point people here whenever the issue is raised.
> It's not implemented today, but I'm sure it will be someday.
> These things tend to be implemented faster if some
> interested party drives the effort though.  ;-)

Yep, we'll leave the bug opened, but I just wanted to make sure I properly understood that it won't work on Windows today.  Which you now made clear.

> > I had started trying it out and I had all kinds of trouble on Linux (with
> > 7.0.1).  Is MI automatically asynchronous?  I mean, when I do -exec-run should
> > I be able to do some commands after or is there some thing like CLI run& that
> > needs to be done.

> I see what you mean.  Yes, you're right.  On 7.0 and 7.1,
> -exec-run maps directly to  "run", so you'll need to
> use CLI's "run&" as a workaround.  This is because
> the target non-stop was designed for initially
> only cared for -exec-attach, but you know that.  :-)
> 
> HEAD (future 7.2) has been fixed already.  -exec-run
> behaves the same CLI's "run&" when async is on there.

Great, good to know.  I often get confused about these little details.