Hi Simon and Ulrich, Thank you for the feedback for this patch series. Please see my comments. Addressing the same I am sending a 4 patch v4 series. >> On this page I see: >> >> For ptracex or ptrace64: If the debuggee is a 32-bit process, the >> options that refer to GPRs or SPRs fail with errno = EIO >> >> And I see that in the patch, you call ptrace64 to read registers >> (PTT_READ_GPRS) for 32 bit processes. How does that work? > > I think Simon is correct here. For GPRS access, I understand only > the following options are supported: > > ptrace: 32- or 64-bit GDB, 32-bit inferior > ptracex: 32-bit GDB, 64-bit inferior > ptrace64: 64-bit GDB, 64-bit inferior > > As I understand, the current set of indirections is intended to > cover that space - for a 32-bit inferior, you call ptrace, and > for a 64-bit inferior you call either ptracex or ptrace64, > depending on whether GDB is built as 64-bit. >Ideally, we wouldn't just guess. Do you run the testsuite on AIX? If >so, you should be able to run it in a mode that builds the test programs >as 32-bit programs. For example: > $ make check RUNTESTFLAGS='--target_board "unix/-m32" Yes, I missed this in the documentation. Ulrich and you are right. Appreciate the same for correcting me. I have addressed this and ran the test cases in 32 bit and 64-bit mode on AIX to make sure the changes are functionally correct. >> Why do you think we can simplify this? I guess we could make >> possibly make the assumption that GDB itself is always built >> as 64-bit these days, but then we still have to select between >> ptrace and ptrace64 at the least … >I think that requiring GDB to be built as 64-bit program would be >reasonable (if so, you should add a static check in the source for that). Yes, from GDB - 13 we are building GDB on AIX as 64-bit application only. We can adjust the code now with this information. I have done some clean up due to this. Have a nice day ahead. Thanks and regards, Aditya.