[PATCH v4] Add support for NetBSD threads in sparc-nat.c

Simon Marchi simark@simark.ca
Tue Mar 17 17:10:30 GMT 2020


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



More information about the Gdb-patches mailing list