From patchwork Thu Mar 17 08:55:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 11361 Received: (qmail 55299 invoked by alias); 17 Mar 2016 08:55:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 55285 invoked by uid 89); 17 Mar 2016 08:55:07 -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=Hx-languages-length:896, 2016-03-17 X-HELO: mail-pf0-f173.google.com Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 17 Mar 2016 08:55:06 +0000 Received: by mail-pf0-f173.google.com with SMTP id x3so111765774pfb.1 for ; Thu, 17 Mar 2016 01:55:06 -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:subject:date:message-id; bh=fDA0+2jziuNQSOBNnIOTAKVJQL2WusH7lo/cDf1lVUA=; b=CWFBvSfky5f1UkMkd3bRDFnREz4v6tP0DrZaJV+01mKy2PGxIQqvOI1S2oCS/vHzpp LbHf6xArypxpoHeX21NCu+AVge4LQtxU6aB50b074e93zfdo1A/B5uFnWY3l0/FhkD/6 Dq6cstCBNO0YuwkB0Y2uOMYNCDGFVg6YU7tpW/PLbIKZZj9deQ5IrG14jLdXHyPG8dDH TD7t2uplolxqRUDlzvrQ9v2wKmaj4pW1Upd7dj7lirQkjvpb2CI4YhfQycClgtbUg62B 65eNt4cLVRuON4ADJU01f7EC1nh0O6cCicvWntIzz73z0NkYTRZYaAUpyH3DClhPHriy vV4w== X-Gm-Message-State: AD7BkJJJGqDB//SePIrkLsYeZkTj1RgmegvdTfWkvbi02IgiYR6q8NCEUz3mP6HFwXrmiQ== X-Received: by 10.66.118.108 with SMTP id kl12mr10795709pab.151.1458204904990; Thu, 17 Mar 2016 01:55:04 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id o7sm11427581pfa.37.2016.03.17.01.55.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Mar 2016 01:55:04 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Remove redundant WIFSTOPPED check Date: Thu, 17 Mar 2016 08:55:00 +0000 Message-Id: <1458204900-22253-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes WIFSTOPPED is checked linux_wstatus_maybe_breakpoint, so WIFSTOPPED in "WIFSTOPPED (wstat) && linux_wstatus_maybe_breakpoint (wstat)" is redundant. This patch removes WIFSTOPPED check. gdb/gdbserver: 2016-03-17 Yao Qi * linux-low.c (linux_low_filter_event): Remove redundant WIFSTOPPED check together with linux_wstatus_maybe_breakpoint. --- gdb/gdbserver/linux-low.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 3ba3949..e0887a6 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -2443,7 +2443,7 @@ linux_low_filter_event (int lwpid, int wstat) } } - if (WIFSTOPPED (wstat) && linux_wstatus_maybe_breakpoint (wstat)) + if (linux_wstatus_maybe_breakpoint (wstat)) { if (save_stop_reason (child)) have_stop_pc = 1;