Hello,

I'm trying to write an Ada application that uses the Sqlite library.
The application will compile and run until the end of the application
where it will hang, using near 100% CPU.

When I cntrl+c it while running in GDB, it shows:
Program received signal SIGINT, Interrupt.
0x6e015096 in cyggcc_s-1!__deregister_frame_info_bases () from
/usr/bin/cyggcc_s-1.dll

The same application in C exits just fine.

I generated the Ada bindings using
> gcc -fdump-ada-spec /usr/include/sqlite3.h

and my application is as follows
-----------------------------
with sqlite3_h;
with system;
with text_io;
with Interfaces.C.Strings;

procedure test is

  Db : System.Address;
  Name : Interfaces.C.Strings.chars_ptr :=
      Interfaces.C.Strings.New_String ("./test.db");
  ret : interfaces.c.int;

begin

  ret := sqlite3_h.sqlite3_open (Name, Db'address);
  ret := sqlite3_h.sqlite3_close (Db);

  Interfaces.C.Strings.Free (Name);

  text_io.put_line ("Done");

end test;
-----------------------------

Compile using
> gnatmake ./test.adb -largs -lsqlite3

Running the application will print out "Done" and then hang with 100%
CPU.  Not sure if this is a bug with cygwin or gcc.

Any suggestions/help would be greatly appreciated!

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to