From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24022 invoked by alias); 30 Jul 2013 19:49:22 -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 24013 invoked by uid 89); 30 Jul 2013 19:49:22 -0000 X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 19:49:21 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJnDsh032118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jul 2013 15:49:13 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJnBrt018529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 30 Jul 2013 15:49:12 -0400 From: Tom Tromey To: Yao Qi Cc: Subject: Re: [PATCH 1/3] New test case for PR12929. References: <1337939766-1579-1-git-send-email-yao@codesourcery.com> <1337939766-1579-2-git-send-email-yao@codesourcery.com> Date: Tue, 30 Jul 2013 19:49:00 -0000 In-Reply-To: <1337939766-1579-2-git-send-email-yao@codesourcery.com> (Yao Qi's message of "Fri, 25 May 2012 17:56:04 +0800") Message-ID: <87a9l3ltft.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00795.txt.bz2 >>>>> "Yao" == Yao Qi writes: Yao> * gdb.python/py-sync-interp.c: New. Yao> * gdb.python/py-sync-interp.exp: New. Yao> +# This test case is copied from PR14135. Yao> +# http://sourceware.org/bugzilla/show_bug.cgi?id=14135 Yao> + Yao> +set testfile "py-sync-interp" Yao> +set srcfile ${testfile}.c Yao> +set binfile ${objdir}/${subdir}/${testfile} standard_testfile Yao> +# Test command 'where' is executed when command 'attach' is done, otherwise Yao> +# function 'sleep' may not show up in backtrace. Yao> + Yao> +gdb_test_sequence "python gdb.execute(\"attach $testpid\"); gdb.execute(\"where\")" \ Yao> + "attach and where" { Yao> + "\[\r\n\]#.* in sleep \\(\\) " Yao> + "\[\r\n\]#.* in foo1 \\(\\) at " Yao> + "\[\r\n\]#.* in foo2 \\(\\) at " Yao> + "\[\r\n\]#.* in foo3 \\(\\) at " Yao> + "\[\r\n\]#.* in main \\(\\) at " Yao> +} I applied this patch to my branch, to see what would happen. On my system (x86-64 Fedora 18, with glibc debuginfo installed), I see this backtrace in the log: python gdb.execute("attach 11985"); gdb.execute("where") 0x0000003e422bb4e0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81 81 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) #0 0x0000003e422bb4e0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81 #1 0x0000003e422bb3a1 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137 #2 0x00000000004005da in foo1 () at ../../../archer/gdb/testsuite/gdb.python/py-sync-interp.c:26 #3 0x00000000004005e5 in foo2 () at ../../../archer/gdb/testsuite/gdb.python/py-sync-interp.c:32 #4 0x00000000004005f0 in foo3 () at ../../../archer/gdb/testsuite/gdb.python/py-sync-interp.c:38 #5 0x00000000004005fb in main () at ../../../archer/gdb/testsuite/gdb.python/py-sync-interp.c:45 This yielded a FAIL: FAIL: gdb.python/py-sync-interp.exp: attach and where (pattern 1) Tom