From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1820 invoked by alias); 20 Jul 2010 14:04:25 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 1708 invoked by uid 22791); 20 Jul 2010 14:04:24 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Tue, 20 Jul 2010 14:04:00 -0000 From: Oleg Nesterov To: Jan Kratochvil Cc: archer@sourceware.org Subject: BUG? gdb, non-stop && c -a Message-ID: <20100720140136.GA18643@redhat.com> References: <20100718174851.GA15528@redhat.com> <20100716205147.GA26313@redhat.com> <20100719160127.GA13331@host1.dyn.jankratochvil.net> <20100720131615.GA17450@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100720131615.GA17450@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2010-q3/txt/msg00041.txt.bz2 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.