From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22959 invoked by alias); 19 Apr 2016 14:54:58 -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 22935 invoked by uid 89); 19 Apr 2016 14:54:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=bump, Hx-languages-length:1474 X-HELO: mail-pf0-f170.google.com Received: from mail-pf0-f170.google.com (HELO mail-pf0-f170.google.com) (209.85.192.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 Apr 2016 14:54:56 +0000 Received: by mail-pf0-f170.google.com with SMTP id n1so7613987pfn.2 for ; Tue, 19 Apr 2016 07:54:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=YGAZMTxHlSWwVANJq33gS0sOy6pBBUJV45myqCRxtLI=; b=gDdPhknYIquOzCanVN9/IpIe+IqznjOQMQEIx757fmOnyJqU87chxtovYcJW1nK4Qw 2Q+uN4dgNtG6qYQVxsAtY7A+dz50IRoIVsGDaPJJsRf8e6SPdspr8rKWEMvG90choOGY evt24D3YdpYpg1ISduiOuvTDRyf7a1IH4/eAMPB9BhzcpttWyYvNrOMz2j4AmzdN04F9 UiAQYsNgRjIoxdtEzW4JVjtZJMpatXamIvgxYzf80oE/L25B3BYVorc/h0hNbfYAGMgd 1WGAJdyt6VPSkkeu1EIqQ9bIxtJ8jfuheNG6js32XAkFcrSanlUzdCeQCdDHzEEnwlOw 0HvQ== X-Gm-Message-State: AOPr4FWbNqO0plB3iiUyysL6k3RkmbwxT6hr0u8QIvKfoo+VpsAjZd88loiDk5wz/ldQSA== X-Received: by 10.98.32.211 with SMTP id m80mr4636530pfj.3.1461077695033; Tue, 19 Apr 2016 07:54:55 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id y3sm70256927par.2.2016.04.19.07.54.52 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 19 Apr 2016 07:54:54 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 3/7] Force to insert software single step breakpoint References: <1458749384-19793-1-git-send-email-yao.qi@linaro.org> <1458749384-19793-4-git-send-email-yao.qi@linaro.org> <570BB52F.7@redhat.com> Date: Tue, 19 Apr 2016 14:54:00 -0000 In-Reply-To: <570BB52F.7@redhat.com> (Pedro Alves's message of "Mon, 11 Apr 2016 15:31:11 +0100") Message-ID: <8660vdk5sk.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00448.txt.bz2 Pedro Alves writes: > Another scenario occurred to me: > > - Thread A is software single-stepping. > - Thread B hits single-step breakpoint of thread A. > - We pause all threads and set thread B stepping past the > single-step breakpoint of thread A. > > But if the single-step breakpoint is for another thread, then > we won't actually manage to have thread B step past it, resulting > in spurious re-hits and no-guaranteed forward progress. See > e.g., non-stop-fair-events.exp: > > # On software single-step targets that don't support displaced > # stepping, threads keep hitting each others' single-step > # breakpoints, and then GDB needs to pause all threads to step > # past those. The end result is that progress in the main > # thread will be slower and it may take a bit longer for the > # signal to be queued; bump the timeout. > > Sounds like we may need to look at the single-step breakpoint's thread=20 > id, and only insert it if it is for the thread that is going to be=20 > doing the step-over? We may need to record that in step_over_info and=20 > pass more info to stepping_past_instruction_at. I think this is about any thread specific breakpoint, instead of only single-step breakpoint (single-step breakpoint is thread specific too). If we are doing step-over for thread A, do we need to insert any breakpoints specific to other threads? (my answer is No). --=20 Yao (=E9=BD=90=E5=B0=A7)