From patchwork Tue Dec 5 07:35:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael McConville X-Patchwork-Id: 24723 Received: (qmail 8041 invoked by alias); 5 Dec 2017 07:35:12 -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 7987 invoked by uid 89); 5 Dec 2017 07:35:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx.kolabnow.com Received: from mx.kolabnow.com (HELO mx.kolabnow.com) (95.128.36.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Dec 2017 07:35:09 +0000 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 39121206 for ; Tue, 5 Dec 2017 08:35:06 +0100 (CET) X-Spam-Score: -0.858 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V0CzcmWY8sYB for ; Tue, 5 Dec 2017 08:35:05 +0100 (CET) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 9927C1B1 for ; Tue, 5 Dec 2017 08:35:05 +0100 (CET) Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 6FE25A34 for ; Tue, 5 Dec 2017 08:35:05 +0100 (CET) From: Michael McConville Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: [PATCH] Probable boolean logic error Message-Id: Date: Tue, 5 Dec 2017 00:35:02 -0700 To: gdb-patches@sourceware.org Unless I’m misunderstanding, these two conditions reduce to “if (true)” in their current form. The most likely explanation is that someone mistakenly typed the wrong boolean operator. 2017-12-04 Michael McConville * mips-linux-tdep.c (mips_linux_in_dynsym_stub): fix boolean typo in two conditions diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index ebdacd981e..6c236e14a1 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -709,15 +709,15 @@ mips_linux_in_dynsym_stub (CORE_ADDR pc) insn = extract_unsigned_integer (p + 4, 4, byte_order); if (n64) { - /* 'daddu t7,ra' or 'or t7, ra, zero'*/ - if (insn != 0x03e0782d || insn != 0x03e07825) + /* 'daddu t7,ra' and 'or t7, ra, zero'*/ + if (insn != 0x03e0782d && insn != 0x03e07825) return 0; } else { - /* 'addu t7,ra' or 'or t7, ra, zero'*/ - if (insn != 0x03e07821 || insn != 0x03e07825) + /* 'addu t7,ra' and 'or t7, ra, zero'*/ + if (insn != 0x03e07821 && insn != 0x03e07825) return 0; }