with System; with Text_Io; procedure A_Test is Command : constant String := "echo Hello World &" & Ascii.Nul; Status : Integer; --------------------------------- -- System shell command interface --------------------------------- function Shell_Cmd (Command : in System.Address) return Integer; pragma Import (C, Shell_Cmd, "system"); ------------------ -- Start 2 threads ------------------ task Task1 is entry Start_Task; end Task1; task Task2 is entry Start_Task; end Task2; task body Task1 is begin select -- Task 1 accept Start_Task; or terminate; end select; end Task1; task body Task2 is begin select -- Task 2 accept Start_Task; or terminate; end select; end Task2; procedure My_Routine is begin Text_Io.Put_Line ("Program successful"); end My_Routine; begin Status := Shell_Cmd (Command'Address); -------------------------------------------------------------- -- From "gvd" set break point on line below by selecting line. -- Run program by clicking "Run" button, some warnings are -- logged and process goes into limbo. -- -- Note, it appears to work if you "gdb" command line to set -- break point as follows: "b My_Routine". -- However, it does NOT work using "b 50". -- Turns out that "gdb" works intermittently, only. -- -- Another interesting anomoly is that the process never seems -- to quit when run from "gvd" or "gdb" and no break points, -- but does run to completion without the debugger. -------------------------------------------------------------- My_Routine; end A_Test;