From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16796 invoked by alias); 14 Sep 2011 11:55:21 -0000 Received: (qmail 16786 invoked by uid 22791); 14 Sep 2011 11:55:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Sep 2011 11:55:07 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R3o3W-0006KZ-CV from pedro_alves@mentor.com for gdb-patches@sourceware.org; Wed, 14 Sep 2011 04:55:06 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Sep 2011 12:55:04 +0100 From: Pedro Alves To: Yao Qi Subject: Re: [patch 2/2] Displaced stepping across fork/vfork : test case Date: Wed, 14 Sep 2011 12:32:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: gdb-patches@sourceware.org References: <4E6C06E4.7010302@codesourcery.com> <201109121559.03294.pedro@codesourcery.com> <4E708B7E.3040701@codesourcery.com> In-Reply-To: <4E708B7E.3040701@codesourcery.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201109141255.02766.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00254.txt.bz2 On Wednesday 14 September 2011 12:09:50, Yao Qi wrote: > > Very recent kernels will allow choosing the syscall instruction > > in the vsyscall page. It'll be better to make the test > > skip on !x86-linux at the top, and then, change the test > > to look for all alternatives of the syscall insn. > > > > I read some pages on vsyscall, and thought we can fetch the value of > AT_SYSINFO in auxv to get the address of __kernel_vsyscall. However, > another simpler way comes up in my mind is to set possible syscall insn > to $syscall_insn like this, > > set syscall_insn "(int|syscall|sysenter)" > > If we match either of them in instruction stream, we are sure program > will enter to syscall, so we don't have to worry about vsyscall page. Yes, exactly what I meant. Thanks. > + "continue to marker ($syscall)" > +} > +disp_step_cross_syscall "fork" > +disp_step_cross_syscall "vfork" There may be some fail/passes done from within gdb.exp procedures that won't get that $syscall diferenciator, thus we can end up with more than one UNTESTED/FAIL/PASS with the same message on gdb.sum/gdb.log. It'd be better to use $pf_prefix instead (grep for uses in the testsuite). We need to do something for systems that can't set a breakpoint in the vsyscall page though (mine can't). The test is surely failing there. In the vfork test: > + global = 1; Is the variable used for anything? Otherwise, this looks okay to me. -- Pedro Alves