public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution
@ 2015-03-03 16:26 simon.marchi at ericsson dot com
  2015-03-03 16:26 ` [Bug gdb/18077] " simon.marchi at ericsson dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: simon.marchi at ericsson dot com @ 2015-03-03 16:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18077

            Bug ID: 18077
           Summary: Using -exec-run with mi-async on results in
                    synchronous execution
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com

Using this simple test program:

    int main()
    {
        for (;;);
        return 0;
    }

And trying these commands:

    $ gdb -nx -i mi a.out
    -gdb-set mi-async on
    -exec-run
    -exec-interrupt --all  <--- It doesn't work, even though it should since we
are in mi-async on mode.


I traced the root of the problem to this line:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/mi/mi-main.c;h=7412f7d8a553ca6739da1480c2e84572f38a8e78;hb=HEAD#l493

At this point, the linux-native run target is not pushed yet. mi_async_p ends
up calling tdefault_can_async, which returns false, so we don't execute
asynchronously.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/18077] Using -exec-run with mi-async on results in synchronous execution
  2015-03-03 16:26 [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution simon.marchi at ericsson dot com
@ 2015-03-03 16:26 ` simon.marchi at ericsson dot com
  2015-03-03 16:27 ` simon.marchi at ericsson dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: simon.marchi at ericsson dot com @ 2015-03-03 16:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18077

--- Comment #1 from Simon Marchi <simon.marchi at ericsson dot com> ---
Created attachment 8164
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8164&action=edit
Test case .exp

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/18077] Using -exec-run with mi-async on results in synchronous execution
  2015-03-03 16:26 [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution simon.marchi at ericsson dot com
  2015-03-03 16:26 ` [Bug gdb/18077] " simon.marchi at ericsson dot com
@ 2015-03-03 16:27 ` simon.marchi at ericsson dot com
  2015-03-03 20:32 ` simon.marchi at ericsson dot com
  2015-03-05  2:51 ` jan.vrany at fit dot cvut.cz
  3 siblings, 0 replies; 5+ messages in thread
From: simon.marchi at ericsson dot com @ 2015-03-03 16:27 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18077

--- Comment #2 from Simon Marchi <simon.marchi at ericsson dot com> ---
Created attachment 8165
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8165&action=edit
Test case .c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/18077] Using -exec-run with mi-async on results in synchronous execution
  2015-03-03 16:26 [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution simon.marchi at ericsson dot com
  2015-03-03 16:26 ` [Bug gdb/18077] " simon.marchi at ericsson dot com
  2015-03-03 16:27 ` simon.marchi at ericsson dot com
@ 2015-03-03 20:32 ` simon.marchi at ericsson dot com
  2015-03-05  2:51 ` jan.vrany at fit dot cvut.cz
  3 siblings, 0 replies; 5+ messages in thread
From: simon.marchi at ericsson dot com @ 2015-03-03 20:32 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18077

--- Comment #3 from Simon Marchi <simon.marchi at ericsson dot com> ---
I added a test case that I made quickly (copied from mi-async.exp). It passes
when I replace the return 0 in tdefault_can_async_p by return 1. It's obviously
not the right solution, but I think it shows what the behaviour should be on
linux-nat.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug gdb/18077] Using -exec-run with mi-async on results in synchronous execution
  2015-03-03 16:26 [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution simon.marchi at ericsson dot com
                   ` (2 preceding siblings ...)
  2015-03-03 20:32 ` simon.marchi at ericsson dot com
@ 2015-03-05  2:51 ` jan.vrany at fit dot cvut.cz
  3 siblings, 0 replies; 5+ messages in thread
From: jan.vrany at fit dot cvut.cz @ 2015-03-05  2:51 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18077

Jan Vrany <jan.vrany at fit dot cvut.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.vrany at fit dot cvut.cz

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-04 21:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 16:26 [Bug gdb/18077] New: Using -exec-run with mi-async on results in synchronous execution simon.marchi at ericsson dot com
2015-03-03 16:26 ` [Bug gdb/18077] " simon.marchi at ericsson dot com
2015-03-03 16:27 ` simon.marchi at ericsson dot com
2015-03-03 20:32 ` simon.marchi at ericsson dot com
2015-03-05  2:51 ` jan.vrany at fit dot cvut.cz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).