From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qkSkNQtyHWDVJAAAWB0awg (envelope-from ) for ; Fri, 05 Feb 2021 11:27:55 -0500 Received: by simark.ca (Postfix, from userid 112) id CD9171EFCB; Fri, 5 Feb 2021 11:27:55 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3D04F1E939 for ; Fri, 5 Feb 2021 11:27:55 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9226F39F4412; Fri, 5 Feb 2021 16:27:54 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8DCD63861039 for ; Fri, 5 Feb 2021 16:27:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8DCD63861039 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EE5CDB12B; Fri, 5 Feb 2021 16:27:49 +0000 (UTC) Subject: Re: [PATCH][gdb/breakpoints] Fix segfault for catch syscall -1 To: Tom Tromey References: <20210202081351.GA28768@delia> <87wnvm4imc.fsf@tromey.com> From: Tom de Vries Message-ID: <1f1a65db-ffaa-ad5a-8e8d-468595e860ac@suse.de> Date: Fri, 5 Feb 2021 17:27:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <87wnvm4imc.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2/5/21 4:52 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> PR breakpoints/27313 > Tom> * break-catch-syscall.c (catch_syscall_split_args): Reject negative > Tom> syscall numbers. > > Looks good. > Thank you for doing this. > > Tom> + if (syscall_number < 0) > Tom> + error (_("Unknown syscall number '%d'."), syscall_number); > > Does syscall_number==0 make sense? Apparently: ... (gdb) catch syscall 0 Catchpoint 1 (syscall 'read' [0]) ... Thanks, - Tom