[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #1 from joel at gcc dot gnu dot org 2009-09-20 15:20 --- Should have included command line. This is for arch=r3900. mips-rtems4.10-gnatmake --RTS=. -fstack-check -v -O -gnatws -O2 -I/users/joel/test-gcc/gcc-svn/gcc/testsuite/ada/acats/work-jmr3904/support a85013b.adb -bargs -Mgnat_main -largs -B/users/joel/test-gcc/install-svn/mips-rtems4.10/jmr3904/lib/ -specs bsp_specs -qrtems -march=r3900 -Wa,-xgot -G0 /users/joel/test-gcc/gcc-svn/gcc/testsuite/ada/acats/work-jmr3904/rtems_init.o -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #2 from laurent at guerby dot net 2009-09-20 15:33 --- Ada code in s-taprop-posix.adb Result := pthread_attr_init (Attributes'Access); pragma Assert (Result = 0 or else Result = ENOMEM); if Result /= 0 then Succeeded := False; return; end if; Could you breakpoint on pthread_attr_init and see what's going on from there (what is passed to and returned by RTEMS)? May be the break 07 is just what pragma Assert does. -- laurent at guerby dot net changed: What|Removed |Added CC||laurent at guerby dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #3 from joel at gcc dot gnu dot org 2009-09-20 15:56 --- The debug information is weak since optimization hides a lot. But it looks like Page_Size might be 0. (gdb) c Continuing. ,.,. A85013B ACATS 2.5 88-01-01 00:00:00 A85013B CHECK THAT A SUBPROGRAM CAN BE RENAMED WITHIN ITS OWN BODY AND THAT THE NEW NAME CAN BE USED IN A RENAMING DECLARATION. Breakpoint 3, pthread_attr_init (attr=0x880b6c78) at /users/joel/test-gcc/rtems/c/src/../../cpukit/posix/src/pthreadattrinit.c:28 28if ( !attr ) (gdb) s 31*attr = _POSIX_Threads_Default_attributes; (gdb) 32 return 0; (gdb) system.task_primitives.operations.create_task (t=0x881a2e90, wrapper=(system.address) 0x8800c7c8, stack_size=value optimized out, priority=122) at s-taprop.adb:967 967 if Result /= 0 then Current language: auto The current source language is auto; currently ada. (gdb) p Result $1 = value optimized out (gdb) s 960 Adjusted_Stack_Size := Adjusted_Stack_Size + Page_Size - 1; (gdb) p Adjusted_Stack_Size $2 = value optimized out (gdb) s 974 (Attributes'Access, PTHREAD_CREATE_DETACHED); (gdb) s pthread_attr_setdetachstate (attr=0x880b6c78, detachstate=0) at /users/joel/test-gcc/rtems/c/src/../../cpukit/posix/src/pthreadattrsetdetachstate.c:26 26if ( !attr || !attr-is_initialized ) Current language: auto The current source language is auto; currently c. (gdb) s 29switch ( detachstate ) { (gdb) 32attr-detachstate = detachstate; (gdb) 33return 0; (gdb) system.task_primitives.operations.create_task (t=0x881a2e90, wrapper=(system.address) 0x8800c7c8, stack_size=value optimized out, priority=122) at s-taprop.adb:962 962 Adjusted_Stack_Size - Adjusted_Stack_Size mod Page_Size; Current language: auto The current source language is auto; currently ada. (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #4 from laurent at guerby dot net 2009-09-20 16:28 --- from s-osinte-rtems.adb: function Get_Page_Size return size_t is begin return 0; end Get_Page_Size; May be this value wasn't used before... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #6 from joel at gcc dot gnu dot org 2009-09-20 16:46 --- Every s-osinte*.ads which has Get_Page_Size includes a comment about 0 being valid to return and indicate that Page_Size does not matter. -- Returns the size of a page, or 0 if this is not relevant on this target Either every OS's interface has a wrong claim in its comments or someone violated this assumption. Before I paper over this on RTEMS, I would appreciate someone making a comment on the general requirements. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #7 from charlet at gcc dot gnu dot org 2009-09-20 16:58 --- Get_Page_Size should indeed now not be a dummy value and cannot be 0. I'll take care of updating the comments in s-osinte*.ads when I get a chance -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #8 from laurent at guerby dot net 2009-09-20 16:59 --- Given s-taprop-posix code it's obvious that Page_Size cannot be zero: -- Round stack size as this is required by some OSes (Darwin) Adjusted_Stack_Size := Adjusted_Stack_Size + Page_Size - 1; Adjusted_Stack_Size := Adjusted_Stack_Size - Adjusted_Stack_Size mod Page_Size; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #9 from joel at gcc dot gnu dot org 2009-09-20 17:12 --- Thanks for the quick response. I am in the process of adding getpagesize() to RTEMS. We already had sysconf(_SC_PAGESIZE) and returned 4096. I will change the s-osinte-rtems.ad* to use that and post a patch when it is tested. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419
[Bug ada/41419] [450 regression] many new ACATs failures (breakpoint instruction in object)
--- Comment #10 from joel at gcc dot gnu dot org 2009-09-20 19:40 --- Created an attachment (id=18619) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18619action=view) RTEMS Get_Page_Size should no longer return 0 With this patch only 1 ACATS failed. Is it OK to commit? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419