This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
BUG? gdb, non-stop && c -a
On 07/20, Oleg Nesterov wrote:
>
> Using the same test-case, I did
Another oddity. Again, the same test-case but I guess any mt program
can be used.
(gdb) set non-stop
(gdb) file test1
(gdb) target extended-remote :2000
(gdb) attach 18245
(gdb) info threads
2 Thread 18245.18246 0x000000375fad65cb in read () from /lib64/libc.so.6
* 1 Thread 18245.18245 0x00000033af60e57d in pause () from /lib64/libpthread.so.0
So far everything is OK. But,
(gdb) help c
...
To continue all stopped threads in non-stop mode, use the -a option.
(gdb) c -a
Continuing.
this sends "vCont;c:p4745.4746" but not "vCont;c:p4745.-1" as I'd expect.
More, it resumes thread 2 while thread 1 is selected.
gdbserver resumes 18246 (sub-thread) correctly. Let's press ^C,
^CQuit
(gdb)
gdb sends "Hgp4745.4745, this selects the main thread 1. It was already
stopped, the sub-thread continues to run.
(gdb) c -a
Continuing.
Now it sends "vCont;c:p4745.4745" and resumes the main thread. But
now gdb doesn't react to ^C and "hangs". (no, SIGINT is not blocked).
Bug?
Oleg.