Respected Ulrich and community members, Please find attached the patch. (See: 0001-Fix-attach-twice.c-testcase-for-AIX.patch) >- It doesn't seem really useful to introduce the PTRACE_FUNC macro; >just put the #ifdef _AIX directly in place instead. We now have this. >- In addition to the fifth argument, your patch also changes ptrace to >ptrace64 - is that necessary? If not, it seems leaving it as ptrace > would be less surprising. Yes it is. Thank you for reminding me. As per this document (https://www.ibm.com/docs/en/aix/7.2?topic=p-ptrace-ptracex-ptrace64-subroutine) we will need to keep it as ptrace64 if we execute in 64 bit mode. So I have taken care of the same in this version of the patch. Kindly let me know if this version is okay. Have a nice day ahead. Thanks and regards, Aditya. From: Ulrich Weigand Date: Thursday, 25 January 2024 at 4:59 PM To: gdb-patches@sourceware.org , Aditya Kamath1 Cc: Sangamesh Mallayya Subject: Re: [PATCH] Fix attach-twice.c testcase for AIX. Aditya Kamath1 wrote: >This is a small fix to resolve the attach-twice untested test case in AIX. >Currently we are getting an error > >gdb/testsuite/gdb.base/attach-twice.c:43:7: error: too few arguments to function 'ptrace' > >which is why this testcase is untested. In AIX, we use 5 arguments for ptrace. I see. I guess the change is reasonable, however: - It doesn't seem really useful to introduce the PTRACE_FUNC macro; just put the #ifdef _AIX directly in place instead. - In addition to the fifth argument, your patch also changes ptrace to ptrace64 - is that necessary? If not, it seems leaving it as ptrace would be less surprising. Bye, Ulrich