From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 0) id E794F387703A; Fri, 20 Mar 2020 16:02:05 +0000 (GMT) Resent-From: Christopher Faylor Resent-Date: Fri, 20 Mar 2020 16:02:05 +0000 Resent-Message-ID: <20200320160205.GA31709@server2.sourceware.org> Resent-To: gdb-patches@sourceware.org Received: from gateway22.websitewelcome.com (gateway22.websitewelcome.com [192.185.47.144]) by sourceware.org (Postfix) with ESMTPS id 9E003385F01B for ; Fri, 20 Mar 2020 15:50:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9E003385F01B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 56A89A4E5 for ; Fri, 20 Mar 2020 10:50:48 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id FJv6j2227AGTXFJv6jRprN; Fri, 20 Mar 2020 10:50:48 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wV4KePy8JLlIspPqv9y4/pjMUOFpKI4jjnT7OCiy1l8=; b=C18vPOPnGZ7WCPpbvR4V0mft4F pl+sQVUJgiq/Bd6Hd/hDWaPdTT8JplH2vZ1ad1++6buQe9warGGiOaIKyQD+wOeCf8Jg+IZJEJGmN VA5/6So5c4wlukYi71Fnnu26W; Received: from 97-118-117-21.hlrn.qwest.net ([97.118.117.21]:43056 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jFJv6-000JM8-23; Fri, 20 Mar 2020 09:50:48 -0600 From: Tom Tromey To: Simon Marchi Cc: Kamil Rytarowski , gdb-patches@sourceware.org, tom@tromey.com Subject: Re: [PATCH v4] Disable get_ptrace_pid for NetBSD References: <20200318231651.18045-1-n54@gmx.com> <20200319122844.24558-1-n54@gmx.com> <3bbb5348-a6bb-fac2-3ca1-2a3e8a1eb11e@simark.ca> <6e74c142-d3e7-6fd8-b765-594931be898b@simark.ca> X-Attribution: Tom Date: Fri, 20 Mar 2020 09:50:47 -0600 In-Reply-To: <6e74c142-d3e7-6fd8-b765-594931be898b@simark.ca> (Simon Marchi's message of "Thu, 19 Mar 2020 11:30:24 -0400") Message-ID: <87tv2jkotk.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , X-List-Received-Date: Fri, 20 Mar 2020 16:02:06 -0000 >>>>> "Simon" == Simon Marchi writes: Simon> Ah, it's because ptrace returns long and not int on GNU/Linux. Simon> So when we want to read a 64-bits word from memory, it gets Simon> truncated. gdb_ptrace should return PTRACE_TYPE_RET. FWIW it's also fine to just return long from our wrapper; at least if all known ptrace implementations return some integer type. Simon> In fact, to be consistent, all these gdb_ptrace functions should Simon> be changed to return PTRACE_TYPE_RET (as a separate patch). Now that we have C++ we could probably get rid of these autoconf checks and just use the template instantiation or overloading tricks. Tom