From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20085 invoked by alias); 11 May 2016 10:41:20 -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 20061 invoked by uid 89); 11 May 2016 10:41:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=alright, cancelled, dance X-HELO: mail-pf0-f175.google.com Received: from mail-pf0-f175.google.com (HELO mail-pf0-f175.google.com) (209.85.192.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 11 May 2016 10:41:18 +0000 Received: by mail-pf0-f175.google.com with SMTP id c189so17998192pfb.3 for ; Wed, 11 May 2016 03:41:17 -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=3METX4+BTf65HJllpE8xZjjjU5c+i/Eukdnifyd1pWI=; b=NM+0vR5szRwVOQYzd2dafy32EiFtqNZFsQ5UuuZ8gfjkwYw16y0uTAL2FSX14VYV8X 9w7AtaeiL3OIVxJLSbMSXNLPU5jt0lS+gxlQudWV/Q53HK8YVgGx8FdPvrH/WWlTJeD0 Gi8aTZo+uOMR4DUZOqrHOYqLOdm2zuNM8i2JbFu3PMonWIWys7AlE71QHt+bLSDaxHQw A9FuJp2m6d/2fyeLNIM26lFPqigPcl3c6PWx3YAsdN2cGpHso3UrT7t1AhjW1WRFFksW J0ewFLC434qT7elHSB3Ry6Y9Zc7yqcOoYz/D5qzJA2CN3lNiOQnfCMn6c1VD3T2vp9d9 wiiA== X-Gm-Message-State: AOPr4FX3VMqGH6MZKOe5f8DYcqXKOQCvs6dpW/7cqTInwIQAbGOWD/hODl9Ck9KT1hWhBA== X-Received: by 10.98.86.24 with SMTP id k24mr3675443pfb.87.1462963275908; Wed, 11 May 2016 03:41:15 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id z6sm11148242pfz.11.2016.05.11.03.41.13 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 11 May 2016 03:41:15 -0700 (PDT) From: Yao Qi To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [RFC 2/3] use reinsert breakpoint for vCont;s References: <1462530736-25117-1-git-send-email-yao.qi@linaro.org> <1462530736-25117-3-git-send-email-yao.qi@linaro.org> Date: Wed, 11 May 2016 10:41:00 -0000 In-Reply-To: <1462530736-25117-3-git-send-email-yao.qi@linaro.org> (Yao Qi's message of "Fri, 6 May 2016 11:32:15 +0100") Message-ID: <8660ukev20.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-05/txt/msg00177.txt.bz2 Yao Qi writes: > + > + if (!step_over_finished && !can_hardware_single_step ()) > + { > + /* If the thread resumed by resume_step hits the reinsert > + breakpoint, delete the reinsert breakpoint for it. */ > + if (current_thread->last_resume_kind =3D=3D resume_step) > + delete_reinsert_breakpoints (current_thread); > + else > + { > + /* If the thread resumed by other kind, like > + resume_continue, hits the breakpoint (either > + reinsert breakpoint or GDB breakpoint), delete > + all reinsert breakpoints if it hits non-reinsert > + breakpoints, otherwise, leave reinsert breakpoint there > + and step over it. */ > + if (non_reinsert_breakpoint_inserted_here (event_child->stop_pc)) > + delete_reinsert_breakpoints (NULL); > + } > + } > } > else > { > /* We have some other signal, possibly a step-over dance was in > progress, and it should be cancelled too. */ > step_over_finished =3D finish_step_over (event_child); > + > + if (!step_over_finished && !can_hardware_single_step ()) > + delete_reinsert_breakpoints (NULL); > } >=20=20 > /* We have all the data we need. Either report the event to GDB, or > @@ -3568,6 +3590,8 @@ linux_wait_1 (ptid_t ptid, >=20=20 > /* Alright, we're going to report a stop. */ >=20=20 > + delete_reinsert_breakpoints (NULL); > + The SIGILL is caused by removing these reinsert breakpoints when threads are still running. I adjust the code removing reinsert breakpoints when threads stop, the SIGILL goes away. --=20 Yao (=E9=BD=90=E5=B0=A7)