Hi all, AIX folks while attempting to debug 64-bit programs using the call command are unable to receive and send the correct return value and parameter info in the program. The issue can be replicated in the below program:- #include long longit (long a) { printf ("long val = %ld \n", a); return a; } int intit (int a) { printf ("int val = %d \n", a); return a; } int main () { intit (27); longit (33); } The output before the patch is Reading symbols from /home/xyz/gdb_tests/callfuncs... (gdb) b main Breakpoint 1 at 0x10000780: file /home/xyz/gdb_tests/callfuncs.c, line 19. (gdb) r Starting program: /home/xyz/gdb_tests/callfuncs BFD: /usr/lib/libc.a(/usr/lib/libc.a(shr_64.o)): wrong auxtype 0xff for storage class 0x2 BFD: /usr/lib/libc.a(/usr/lib/libc.a(shr_64.o)): wrong auxtype 0xff for storage class 0x6b Breakpoint 1, main () at /home/xyz/gdb_tests/callfuncs.c:19 19 intit (27); (gdb) call intit (21) int val = 0 $1 = 0 (gdb) q The output should have been 21 but is not. The output after applying this patch:- Reading symbols from /home/XYZ/gdb_tests/callfuncs... (gdb) b main Breakpoint 1 at 0x100005f0: file /home/XYZ/gdb_tests/callfuncs.c, line 19. (gdb) r Starting program: /home/XYZ/gdb_tests/callfuncs Breakpoint 1, main () at /home/XYZ/gdb_tests/callfuncs.c:19 19 intit (27); (gdb) call intit (21) int val = 21 $1 = 21 (gdb) q Why does this happen?? The issue is that when a user attempts to test the return type or print statements via the call "FUNC_NAME (parameter A, parameter B)" command, any input be it parameter A or B is taken in little endian format from the GDB cache. But AIX is using Big endian format. For example, if we have a value 21 as type long then the higher 32 bits [ which is 0 in number 21] were stored in lower 32 bits and lower 32 bits [ represent 21 in the number 21] is stored in higher 32 bits. Please find attached the patch. [See:- 0001-Fix-call-functions-command-bug-in-64-bit-programs.patch] In the patch I have written comments on further details. Kindly let us know if this solution works, if not let us know a better way to handle the same. Have a nice day ahead. Thanks and regards, Aditya.