It is has reported in http://sourceware.org/bugzilla/show_bug.cgi?id=1295, it is in IA32 and X86_64 architecture, and now it has been solved. But this problem still exists in IA64 platform. I run "readelf --debug-dump vmlinux" command, there is some information about sys_open function. <1><402067>: Abbrev Number: 81 (DW_TAG_subprogram) DW_AT_sibling : <40213b> DW_AT_external : 1 DW_AT_name : (indirect string, offset: 0x276fb): sys_open DW_AT_decl_file : 1 DW_AT_decl_line : 966 DW_AT_prototyped : 1 DW_AT_type : <3f5c63> DW_AT_low_pc : 0xa00000010011d840 DW_AT_high_pc : 0xa00000010011d9e0 DW_AT_frame_base : 1 byte block: 5c (DW_OP_reg12) <2><40208b>: Abbrev Number: 100 (DW_TAG_formal_parameter) DW_AT_name : (indirect string, offset: 0x3ae3b): filename DW_AT_decl_file : 1 DW_AT_decl_line : 965 DW_AT_type : <3f7249> DW_AT_location : 2 byte block: 90 28 (DW_OP_regx: 40) It shows that filename parameter is put in register r40, but in fact this parameter should be passed by r32 register.
GCC trunk as of last night gets this right. Which version of GCC is this reported against?
gcc version is 3.4.5, it comes from rpm package of RHEL4-U3 distribution for IA64 version. Reading specs from /usr/lib/gcc/ia64-redhat-linux/3.4.5/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --enable-shared --enable-threads=posix --disable- checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind- exceptions --enable-java-awt=gtk --host=ia64-redhat-linux Thread model: posix gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
This doesn't exist in my test. My gcc is 4.1.1.