From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 1EAC7393741B for ; Tue, 17 Mar 2020 17:10:31 +0000 (GMT) Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8A6EF1E5FD; Tue, 17 Mar 2020 13:10:30 -0400 (EDT) Subject: Re: [PATCH v4] Add support for NetBSD threads in sparc-nat.c To: Kamil Rytarowski , gdb-patches@sourceware.org References: <20200317164603.10840-1-n54@gmx.com> <10f3399c-84ee-4cc8-b9fe-a3057fc070eb@simark.ca> From: Simon Marchi Message-ID: <3329d58a-86cf-1f73-188d-ca2306954354@simark.ca> Date: Tue, 17 Mar 2020 13:10:30 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: Tue, 17 Mar 2020 17:10:31 -0000 On 2020-03-17 1:07 p.m., Kamil Rytarowski wrote: > On 17.03.2020 17:59, Simon Marchi wrote: >> I tried to build this using a sparc-linux cross-compiler, and I think we need >> to adjust gdb_ptrace to account for the various possible arguments types. The >> following version of the function builds fine with sparc64-linux-gnu-gcc, can you >> try it with NetBSD? >> >> static PTRACE_TYPE_RET >> gdb_ptrace (PTRACE_TYPE_ARG1 request, ptid_t ptid, PTRACE_TYPE_ARG4 addr) > > Does it work for you if you use PTRACE_TYPE_ARG3? addr is the 3rd argument. > > PTRACE_TYPE_ARG4 is int on BSDs. Err yes sorry, it should be PTRACE_TYPE_ARG3, my bad. Simon