This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Gnat with sqlite Ada bindings - 100% CPU problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]