From patchwork Wed Mar 16 18:54:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 11355 Received: (qmail 114622 invoked by alias); 16 Mar 2016 18:56:14 -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 114610 invoked by uid 89); 16 Mar 2016 18:56:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=interpreted, 23126, Hx-languages-length:1255 X-HELO: e06smtp05.uk.ibm.com Received: from e06smtp05.uk.ibm.com (HELO e06smtp05.uk.ibm.com) (195.75.94.101) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 16 Mar 2016 18:56:03 +0000 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 Mar 2016 18:56:00 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 Mar 2016 18:55:59 -0000 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: arnez@linux.vnet.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id C870B17D805A for ; Wed, 16 Mar 2016 18:56:30 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2GItwAO3408278 for ; Wed, 16 Mar 2016 18:55:59 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2GItwqi030713 for ; Wed, 16 Mar 2016 14:55:58 -0400 Received: from oc1027705133.ibm.com (dyn-9-152-212-180.boeblingen.de.ibm.com [9.152.212.180]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2GItHlf029728; Wed, 16 Mar 2016 14:55:58 -0400 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Yao Qi , "Metzger, Markus T" , =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Date: Wed, 16 Mar 2016 19:54:35 +0100 Message-Id: <1458154517-25441-2-git-send-email-arnez@linux.vnet.ibm.com> In-Reply-To: <1458154517-25441-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1458154517-25441-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16031618-0021-0000-0000-0000065477CB X-IsSubscribed: yes This patch added handling for some syscalls to linux-record.c: https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html But for both `pipe' and `pipe2' the patch lacks a statement after an `if', such that the following `break' is interpreted as the `if'-body instead. This adds the missing (return-) statements for the conditionals. gdb/ChangeLog: * linux-record.c (record_linux_system_call): Add missing return statements to handling of pipe and pipe2 syscalls. --- gdb/linux-record.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/linux-record.c b/gdb/linux-record.c index a40845a..2e86936 100644 --- a/gdb/linux-record.c +++ b/gdb/linux-record.c @@ -354,6 +354,7 @@ record_linux_system_call (enum gdb_syscall syscall, regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest); if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tdep->size_int * 2)) + return -1; break; case gdb_sys_times: @@ -2312,6 +2313,7 @@ Do you want to stop the program?"), regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest); if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest, tdep->size_int * 2)) + return -1; break; case gdb_sys_inotify_init1: