From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16374 invoked by alias); 20 Nov 2003 20:20:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16361 invoked from network); 20 Nov 2003 20:20:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 20 Nov 2003 20:20:04 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id hAKKK2H23738 for ; Thu, 20 Nov 2003 15:20:02 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id hAKKK0a27099; Thu, 20 Nov 2003 15:20:00 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id hAKKJxH24697; Thu, 20 Nov 2003 12:19:59 -0800 Message-ID: <3FBD21EF.5010600@redhat.com> Date: Thu, 20 Nov 2003 20:20:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sources.redhat.com Subject: Re: [RFA/testsuite] attach.exp: Add small delay in busy loop... References: <20031118230002.GG1319@gnat.com> <3FBAB89F.3020805@redhat.com> <20031120062549.GD504@gnat.com> In-Reply-To: <20031120062549.GD504@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00428.txt.bz2 Joel Brobecker wrote: > Hello, > > On Tue, Nov 18, 2003 at 04:26:07PM -0800, Michael Snyder wrote: > >>>2003-11-18 J. Brobecker >>> >>> * gdb.base/attach.c: Add small delay in busy loop. >>> * gdb.base/attach.exp: Make some associated adjustments. >>> >>>OK to apply? >> >>Seems to work on Linux. I'd sure like to see that backtrace test, >>though, to confirm that we are able to build a meaningful machine >>state after we attach. > > > Here is a new version of the patch, with the backtraces in. I do have > two FAILs though. The first FAIL comes from the following test: > > gdb_test "backtrace" \ > ".*in nanosleep ().*in small_delay ().*in main ().*" \ > "backtrace after attach2" > > The logs show: > > backtrace > #0 0x400eb3b5 in ?? () from /lib/libc.so.6 > #1 0x08048412 in small_delay () at ./gdb.base/attach.c:18 > #2 0x08048435 in main () at ./gdb.base/attach.c:29 > (gdb) FAIL: gdb.base/attach.exp: backtrace after attach2 > > So the problem is that GDB is unable to find the function name for > frame $0. I think this comes from these warnings while performing > the attach command: > > attach 3671 > Attaching to process 3671 > Reading symbols from /[...]/testsuite/gdb.base/attach...done. > --> Symbols already loaded for /lib/libm.so.6 > --> Symbols already loaded for /lib/libc.so.6 > Symbols already loaded for /lib/ld-linux.so.2 > 0x400eb3b5 in ?? () from /lib/libc.so.6^M > (gdb) PASS: gdb.base/attach.exp: attach2 > > The second FAIL is identical. Probably should explicitly clear the symbol tables between one attach and the next. > There is another thing that I think needs mentioning. I noticed I am > the first one to introduce the use of nanosleep(). I think it's pretty > portable, but I am having doubts. Does anybody know if it's not available > on any platform. How about cygwin for instance? Yeah, I remember having issues with it when I tried to write thread tests. I don't remember where it was missing -- maybe Solaris? I think your concern is valid -- nanosleep is not guaranteed to be available everywhere.