From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23580 invoked by alias); 5 Sep 2011 09:19:48 -0000 Received: (qmail 23570 invoked by uid 22791); 5 Sep 2011 09:19:47 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Sep 2011 09:19:31 +0000 Received: (qmail 16725 invoked from network); 5 Sep 2011 09:19:29 -0000 Received: from unknown (HELO ?192.168.0.101?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Sep 2011 09:19:29 -0000 Message-ID: <4E64941F.7090109@codesourcery.com> Date: Mon, 05 Sep 2011 11:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [patch] Use displaced stepping regardless of SW single step References: <4E63830D.9060604@codesourcery.com> In-Reply-To: <4E63830D.9060604@codesourcery.com> Content-Type: multipart/mixed; boundary="------------010004070406080004060700" 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/msg00077.txt.bz2 This is a multi-part message in MIME format. --------------010004070406080004060700 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Content-length: 2068 On 09/04/2011 09:54 PM, Yao Qi wrote: > Regression tested on x86_64-unknown-linux-gnu with displaced stepping > "auto" and "on" respectively. No extra failures, but there are two > PASSes changed to KFAILs, > > -PASS: gdb.cp/annota2.exp: watch triggered on a.x > +KFAIL: gdb.cp/annota2.exp: watch triggered on a.x (PRMS: gdb/38) > -PASS: gdb.cp/annota3.exp: watch triggered on a.x > +KFAIL: gdb.cp/annota3.exp: watch triggered on a.x (PRMS: gdb/38) > > I am not familiar with this case, so can't tell this is caused by my patch. > I made a mistake when comparing gdb.sum, and I run testsuite again this morning, and get something different on x86_64-pc-linux-gnu, - When displaced stepping is set to "auto", no regression. - When displaced stepping is set to "on", there are some new fails, * FAIL: gdb.base/ending-run.exp: step to end of run The test case doesn't match the output, while the output is correct. * FAIL: gdb.base/gdb1555.exp: Step into shared lib function FAIL: gdb.base/gdb1555.exp: Next while in a shared lib function FAIL: gdb.base/gnu-ifunc.exp: step FAIL: gdb.base/gnu-ifunc.exp: continue to break-at-nextcall FAIL: gdb.base/gnu-ifunc.exp: continue to breakpoint: nextcall gnu_ifunc FAIL: gdb.base/gnu-ifunc.exp: nextcall gnu_ifunc skipped These fails are caused by SIGSEGV in gdb, which shows some potential bugs in x86 displaced stepping. * FAIL: gdb.base/watch-vfork.exp: Watchpoint triggers after vfork (sw) FAIL: gdb.threads/pending-step.exp: next in multiple threads with breakpoints (timeout) They are similar to the problems (#4 and #5) I found on arm (posted http://sourceware.org/ml/gdb-patches/2011-08/msg00609.html), and I'll post other patches to fix them. > -&& (tp->control.trap_expected > - || (step&& gdbarch_software_single_step_p (gdbarch))) > +&& (tp->control.trap_expected || step)) There is an extra ")" added by mistake when I am adding changelog entry for this patch. Here is the right one. -- Yao (齐尧) --------------010004070406080004060700 Content-Type: text/x-patch; name="0015-use-disp-step-regardless-of-sw-single-step.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0015-use-disp-step-regardless-of-sw-single-step.patch" Content-length: 774 gdb/ * infrun.c (resume): Use displaced stepping regardless of supporting software single step. --- gdb/infrun.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index 7886cce..40e1d71 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1733,8 +1733,7 @@ a command like `return' or `jump' to continue execution.")); event, displaced stepping breaks the vfork child similarly as single step software breakpoint. */ if (use_displaced_stepping (gdbarch) - && (tp->control.trap_expected - || (step && gdbarch_software_single_step_p (gdbarch))) + && (tp->control.trap_expected || step) && sig == TARGET_SIGNAL_0 && !current_inferior ()->waiting_for_vfork_done) { -- 1.7.0.4 --------------010004070406080004060700--