Hi Ulrich and GDB community members, Thank you for the feedback. Please find attached the patch. See:- 0001-Fix-for-call-feature-having-9th-function-parameter-a.patch >>+ write_memory (sp + 24 + (ii * wordsize), >I think this needs to be 6 * wordsize instead of 24 here too. This is done. Thanks. >>+ if (wordsize == 8 && >+ (type->code () == TYPE_CODE_INT >I'm not sure the "wordsize == 8" check is correct here. It's of course >a question of how the 32-bit AIX ABI is defined, but for parameters in >registers, we do the extension on 32-bit too. So it seems likely to me >that we need to do it for parameters in memory as well. This also done. Hope all is good now. Kindly push the patch if there are not more changes. Let me know if any more. Have a nice day ahead. By the way, pasted the outputs below. Thanks and regards, Aditya. 32 bit output with patch:- Reading symbols from /home/aditya/gdb_tests/nine_parameter_func... (gdb) b main Breakpoint 1 at 0x1000078c: file /home/aditya/gdb_tests/nine_parameter_func.c, line 27. (gdb) r Starting program: /home/aditya/gdb_tests/nine_parameter_func Breakpoint 1, main () at /home/aditya/gdb_tests/nine_parameter_func.c:27 27 const float register f3 = 19.0; (gdb) list 22 printf ("j = %d \n", j); 23 return (int)(d); 24 } 25 int main () 26 { 27 const float register f3 = 19.0; 28 const int register i1 = 700; 29 printf("%f \n", f3 + i1); 30 b (); 31 a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19) 812.000000 9th para = 9 , 10th para = 983 j = 9 $1 = 1041 (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 25) 812.000000 9th para = 9 , 10th para = 983 j = 9 $2 = 1047 (gdb) 64 bit output with patch:- Breakpoint 1, main () at /home/aditya/gdb_tests/nine_parameter_func.c:27 27 const float register f3 = 19.0; (gdb) lsit Undefined command: "lsit". Try "help". (gdb) list 22 printf ("j = %d \n", j); 23 return (int)(d); 24 } 25 int main () 26 { 27 const float register f3 = 19.0; 28 const int register i1 = 700; 29 printf("%f \n", f3 + i1); 30 b (); 31 a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19); (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 19) 812.000000 9th para = 9 , 10th para = 983 j = 9 $1 = 1041 (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 25) 812.000000 9th para = 9 , 10th para = 983 j = 9 $2 = 1047 (gdb) call a (1, 2, 3, 4, 5, 6, 7, 8, 9, 983, 30) 812.000000 9th para = 9 , 10th para = 983 j = 9 $3 = 1052 (gdb) From: Ulrich Weigand Date: Friday, 25 August 2023 at 9:27 PM To: gdb-patches@sourceware.org , Aditya Kamath1 Cc: Sangamesh Mallayya Subject: Re: [PATCH] Fix for call feature having nine parameters or more in AIX Aditya Kamath1 wrote: >Hope this looks good now. Kindly let me know. If not kindly push these changes. Just a few comments remaining: >+ space += ((len - argbytes + wordsize -1) & -wordsize); Please use "- 1" instead of "-1" everywhere here. >+ write_memory (sp + 24 + (ii * wordsize), I think this needs to be 6 * wordsize instead of 24 here too. >+ if (wordsize == 8 && >+ (type->code () == TYPE_CODE_INT >+ || type->code () == TYPE_CODE_ENUM >+ || type->code () == TYPE_CODE_BOOL >+ || type->code () == TYPE_CODE_CHAR )) >+ { I'm not sure the "wordsize == 8" check is correct here. It's of course a question of how the 32-bit AIX ABI is defined, but for parameters in registers, we do the extension on 32-bit too. So it seems likely to me that we need to do it for parameters in memory as well. Bye, Ulrich