public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/10236] New: asyncronous execution becomes unusable if you single step to the end of an executable
@ 2009-06-03 22:37 richard dot j dot ward1 at gmail dot com
  2009-06-03 22:55 ` [Bug gdb/10236] " pedro at codesourcery dot com
  2009-06-03 22:57 ` pedro at codesourcery dot com
  0 siblings, 2 replies; 3+ messages in thread
From: richard dot j dot ward1 at gmail dot com @ 2009-06-03 22:37 UTC (permalink / raw)
  To: gdb-prs

The following terminal dump explains the problem very well:
$ echo 'main(int,char**){retur^C   
$ echo 'int main(int,char**){return 0;}'>bug.cpp
$ gcc -g bug.cpp
$ gdb a.out  
GNU gdb (GDB) 6.8.50.20090106-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) set target-async 1
(gdb) b main
Breakpoint 1 at 0x80483a2: file bug.cpp, line 1.
(gdb) run &
Starting program: /home/richard/a.out 
(gdb) 
Breakpoint 1, main () at bug.cpp:1
1	int main(int,char**){return 0;}
n
0xb7e72775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
(gdb) n
Single stepping until exit from function __libc_start_main, 
which has no line number information.

Program exited normally.
(gdb) run
Starting program: /home/richard/a.out 
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0xb7e874b0: Input/output error.

>From here, whatever I try, that error repeats whenever you try to 'run' or 'run
&' forcing a restart of the debugger. and losing of all breakpoints, etc.

-- 
           Summary: asyncronous execution becomes unusable if you single
                    step to the end of an executable
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: richard dot j dot ward1 at gmail dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10236

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/10236] asyncronous execution becomes unusable if you single step to the end of an executable
  2009-06-03 22:37 [Bug gdb/10236] New: asyncronous execution becomes unusable if you single step to the end of an executable richard dot j dot ward1 at gmail dot com
@ 2009-06-03 22:55 ` pedro at codesourcery dot com
  2009-06-03 22:57 ` pedro at codesourcery dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pedro at codesourcery dot com @ 2009-06-03 22:55 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2009-06-03 22:55 -------
Subject: Re:  New: asyncronous execution becomes unusable if you single step to the end of an executable

Thanks.  I can reproduce this in current mainline.  longjmp
breakpoints are being left behind:

(gdb) set target-async 1
(gdb) r&
Starting program: /home/pedro/gdb/sspaces/build/gdb/a.out
(gdb)
Breakpoint 1, main () at bug.c:1
1       int main(int,char**){return 0;}
Current language:  auto; currently c++
maint info breakpoints
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x0000000000400543 in main at bug.c:1
        breakpoint already hit 1 time
-1      shlib events   keep y   0x00007ffff7dee990 <_dl_debug_state>
        breakpoint already hit 2 times
(gdb) n
0x00007ffff73021c4 in __libc_start_main () from /lib/libc.so.6
(gdb)
Single stepping until exit from function __libc_start_main,
which has no line number information.

Program exited normally.
(gdb) maint info breakpoints
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x0000000000400543 in main at bug.c:1
        breakpoint already hit 1 time
-1      shlib events   keep y   0x00007ffff7dee990 <_dl_debug_state>
        breakpoint already hit 2 times
0       longjmp        keep y   0x00007ffff7315eb0 <siglongjmp> thread 1
        stop only in thread 1
0       longjmp        keep y   0x00007ffff7315eb0 <siglongjmp> thread 1
        stop only in thread 1
0       longjmp        keep y   0x00007ffff7315eb0 <siglongjmp> thread 1
        stop only in thread 1
0       step resume    dstp y   0x00007ffff73021cb <__libc_start_main+251> thread 1
        stop only in thread 1
(gdb) r
Starting program: /home/pedro/gdb/sspaces/build/gdb/a.out
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x7ffff7315eb0: Input/output error.

(gdb) 

Sounds like something is wrong with cleaning up after threads that
had continuations on them (step_1_continuation is responsible for
clearing longjmp breakpoints).  I do wonder if replacing opaque
continuations with state flags wouldn't be better...


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10236

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/10236] asyncronous execution becomes unusable if you single step to the end of an executable
  2009-06-03 22:37 [Bug gdb/10236] New: asyncronous execution becomes unusable if you single step to the end of an executable richard dot j dot ward1 at gmail dot com
  2009-06-03 22:55 ` [Bug gdb/10236] " pedro at codesourcery dot com
@ 2009-06-03 22:57 ` pedro at codesourcery dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pedro at codesourcery dot com @ 2009-06-03 22:57 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Target Milestone|6.8                         |6.9
            Version|archer                      |6.50


http://sourceware.org/bugzilla/show_bug.cgi?id=10236

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2009-06-03 22:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 22:37 [Bug gdb/10236] New: asyncronous execution becomes unusable if you single step to the end of an executable richard dot j dot ward1 at gmail dot com
2009-06-03 22:55 ` [Bug gdb/10236] " pedro at codesourcery dot com
2009-06-03 22:57 ` pedro at codesourcery dot com

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