From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111558 invoked by alias); 9 Sep 2015 16:09:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 111547 invoked by uid 89); 9 Sep 2015 16:09:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Sep 2015 16:09:07 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1ZZhvj-0003Tb-MJ from Sandra_Loosemore@mentor.com ; Wed, 09 Sep 2015 09:09:03 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Wed, 9 Sep 2015 09:09:03 -0700 Message-ID: <55F05975.4030207@codesourcery.com> Date: Wed, 09 Sep 2015 16:09:00 -0000 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches , Yao Qi Subject: Re: [RFC] fix gdb.threads/non-stop-fair-events.exp timeouts References: <55E9CCCD.7060604@codesourcery.com> <55EF0D11.2020200@redhat.com> In-Reply-To: <55EF0D11.2020200@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-09/txt/msg00136.txt.bz2 On 09/08/2015 10:30 AM, Pedro Alves wrote: > > Yeah, I've seen this before with a local series I use for debugging > software single-step things that implements software single-stepping > on x86. I just re-tried it now after rebasing that series to > current mainline, and I still see the time outs against gdbserver. > > AFAICS, nios2 is a software single-step target that does not implement > displaced stepping either. I had a patch for this that I had > never posted. See attached. > Hmmm, these two patches are not working for me. The trouble is that this part: > +gdb_test_multiple "si" $msg { > + -re "displaced pc to.*$gdb_prompt $" { > + set displaced_stepping_enabled 1 > + } > + -re ".*$gdb_prompt $" { > + } > +} is causing the target to step from main to pthread_self, which is in a different file. This causes the subsequent breakpoint commands to fail, and things go south from there: Breakpoint 1, main () at /scratch/sandra/nios2-linux-trunk/src/gdb-trunk/gdb/testsuite/gdb.threads/non-stop-fair-events.c:76 76 pthread_kill (pthread_self (), 0); (gdb) handle SIGUSR1 print nostop pass Signal Stop Print Pass to program Description SIGUSR1 No Yes Yes User defined signal 1 (gdb) PASS: gdb.threads/non-stop-fair-events.exp: handle SIGUSR1 print nostop pass print num_threads $1 = 10 (gdb) PASS: gdb.threads/non-stop-fair-events.exp: get num_threads set debug displaced 1 (gdb) PASS: gdb.threads/non-stop-fair-events.exp: set debug displaced 1 si 0x00002720 in pthread_self () at pthread_self.c:27 27 } (gdb) set debug displaced 0 (gdb) PASS: gdb.threads/non-stop-fair-events.exp: set debug displaced 0 delete breakpoints Delete all breakpoints? (y or n) y (gdb) info breakpoints No breakpoints or watchpoints. (gdb) print got_sig = 0 $2 = 0 (gdb) PASS: gdb.threads/non-stop-fair-events.exp: signal_thread=2: print got_sig = 0 break 63 No line 63 in the current file. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) FAIL: gdb.threads/non-stop-fair-events.exp: signal_thread=2: setting breakpoint at 63 break 88 No line 88 in the current file. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) FAIL: gdb.threads/non-stop-fair-events.exp: signal_thread=2: setting breakpoint at 88 -Sandra