Reputation: 608
I would like to verify if my sqlite3 binary is compiled with HAVE_USLEEP
option.
The compilation option is referred here and here.
I wanted to check it with PRAGMA compile_options;
but It does not return HAVE_USLEEP
on any of my compilation attempts.
To compile the sqlite I run:
export CFLAGS="-DHAVE_USLEEP"
./configure
make
which gives me a lot of output ending with libtool report which appears to include the -DHAVE_USLEEP
libtool: link: gcc -DHAVE_USLEEP -DSQLITE_OS_UNIX=1 ....
configure
also reports usleep
present.
However the session with the compiled binary is as follows:
user@pc:~/Downloads/sqlite$ ./sqlite3
SQLite version 3.31.0 2020-01-07 09:06:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> PRAGMA compile_options;
COMPILER=gcc-4.8.4
ENABLE_DBSTAT_VTAB
ENABLE_FTS4
ENABLE_JSON1
ENABLE_RTREE
ENABLE_STMTVTAB
ENABLE_UNKNOWN_SQL_FUNCTION
HAVE_ISNAN
THREADSAFE=1
sqlite>
I've tried both -DHAVE_USLEEP
and -DHAVE_USLEEP=1
.
At this point I don't know how to approach this - the DHAVE_USLEEP
appears to be passed to the libtool
but the option is missing from the report. I've either compiled it without the option (somehow), or the PRAGMA compiled_options
does not return the DHAVE_USLEEP
. I'm looking for a way to differentiate the states to be able to debug it further.
Thanks for any idea regarding this.
Upvotes: 5
Views: 816
Reputation: 61
here's how
python3
REPL and leave it openin another terminal,
ps aux | grep python3
sudo gdb -p <PID>
disass __sleep
.
if you can't find the __sleep function, try this gdb command
info functions
and try to find a function with "sleep" in it then disass <function_name_you_found>
Upvotes: 0
Reputation: 52589
Just see if the symbol exists in the sqlite library:
$ nm /path/to/your/libsqlite3.a | grep usleep
U usleep
Upvotes: 1