[gvd-devel] bug report

David C. Hoos, Sr. david.c.hoos.sr@ada95.com
Sun, 1 Apr 2001 17:21:44 -0500


I encountered the following bug when running the program
for which source code appears at the end of this message.

The program was stopped, waiting for a character to be
typed (as indicated by the prompt), and I selected
Data -> Threads from the menu, and the bug immediately
appeared.

I tried it also with GVD 1.1.0, except that I selected
Data -> Tasks, and got a similar result.

!!! already running a Wait command!!
Bug detected in GVD
Please report with the contents of the file /home/epiu/.gvd/log
the following information:
Version: 1.0.2
Exception name: CONSTRAINT_ERROR
Message: debugger-gdb-ada.adb:871
Call stack traceback locations:
0x8121f94 0x814129f 0x814ed64 0x8197f5d 0x40169063 0x4016b2d0 0x4029e81d
0x4029dc90 0x4029bd93 0x402d0dd6 0x402786e9 0x40277a69 0x40270cc7 0x4029dcc9
0x4029bd93 0x402d0c8a 0x40270c20 0x4026fe78 0x4031a539 0x4034b184 0x4034b74f
0x4034b8ef 0x4026f7b7 0x819e4bc

and a description as complete as possible (including sources) to reproduce the
bug
audrey.ada95.com/epiu [epiu] 139 > cat ~/.gvd/log
[1] <- "(gdb) "
[1] -> "file /home/epiu/frank/mytest\n"
[1] <- "Reading symbols from /home/epiu/frank/mytest...done.\n"
       "(gdb) "
[1] -> "run \n"
[1] <- "Starting program: /home/epiu/frank/mytest \n"
[1] <- "PA_TEST(MAIN)\n"
[1] <- "[New Thread 8753 (manager thread)]\n"
       "[New Thread 8752 (initial thread)]\n"
[1] <- "[New Thread 8754]\n"
[1] <- "TEST\n"
       "TTSK_TEST.INIT\n"
       "Enter a character and press ENTER, please\n"
[1] <- "Quit\n"
       "(gdb) "
[1] -> "set confirm off\n"
[1] <- "(gdb) "
audrey.ada95.com/epiu [epiu] 140 >

-- Begin source code
-----------
package PA_TEST is

  task type TTSK_TEST is
    entry INIT;
    entry DO_STUFF;
    entry DIE;
  end;

end PA_TEST;
---------
with TEXT_IO;
package body PA_TEST is

  task body TTSK_TEST
  is
    RUNNING : BOOLEAN := FALSE;
  begin

    accept INIT do
      TEXT_IO.PUT_LINE ("TTSK_TEST.INIT");
      RUNNING := TRUE;
    end INIT;

    while RUNNING  loop
      select
        accept DO_STUFF do
          TEXT_IO.PUT_LINE ("TTSK_TEST.DO_STUFF");
        end DO_STUFF;

      or
        accept DIE do
          TEXT_IO.PUT_LINE("TTSK_TEST.DIE");
          RUNNING := FALSE;
        end DIE;

      or
        delay 0.0; -- In order to "fall through" select statement.

      end select;

--   Business logic
--   ----"--------
--   ----"--------

    end loop;

    TEXT_IO.PUT_LINE("PA_TEST(Terminates)");
  end;
begin
  TEXT_IO.PUT_LINE("PA_TEST(MAIN)");
end PA_TEST;
---------
with PA_TEST, TEXT_IO;
procedure MYTEST is
  A_TASK : PA_TEST.TTSK_TEST;
  WAIT : STRING(1..1);
begin
  TEXT_IO.PUT_LINE("TEST");

  A_TASK.INIT;

  TEXT_IO.PUT_LINE ("Enter a character and press ENTER, please");
  TEXT_IO.GET(WAIT);

  A_TASK.DIE;

end MYTEST;
-------
-- End source code