Re: [sqlite] [SQLite]Basic query
Thank you everyone! I'll try to solve this case with your replies! Thanks, 2014年12月9日火曜日、Richard Hippさんは書きました: > On Mon, Dec 8, 2014 at 12:20 PM, Scott Robison > > wrote: > > > On Dec 8, 2014 2:10 AM, "Shinichiro Yoshioka" > > > wrote: > > > > > > Hi, > > > > > > I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. > > > But although the compiling was successfully finished, even if I set > break > > > point > > > on the source code, I can't trace the working line in sqlite3.c > > correctly. > > > > As someone else said, the problem is that the Visual C++ debugger doesn't > > play nice with files in excess of 64KiB lines. When I had this need a > > couple years ago, I carefully split the sqlite3.c file into several > pieces > > and compiled them separately. > > > > > From the canonical SQLite source code you can type "make sqlite3-all.c" and > it will generate a version of the amalgamation that #includes a handful of > separate files (named sqlite3-N.c for N=1,2,3,), each less than 32K > lines in size. > > drh@bella:~/sqlite/bld$ make sqlite3-all.c > tclsh /home/drh/sqlite/sqlite/tool/split-sqlite3c.tcl > drh@bella:~/sqlite/bld$ wc sqlite3-*.c > 32314 165952 1228350 sqlite3-1.c > 30892 145495 1098859 sqlite3-2.c > 32729 144742 1091870 sqlite3-3.c > 32481 150359 1198841 sqlite3-4.c > 23259 100070 768733 sqlite3-5.c > 32 2371518 sqlite3-all.c > 151707 706855 5388171 total > > Include all these files in your project, but compile against just > sqlite3-all.c. > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
On Mon, Dec 8, 2014 at 12:20 PM, Scott Robison wrote: > On Dec 8, 2014 2:10 AM, "Shinichiro Yoshioka" > wrote: > > > > Hi, > > > > I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. > > But although the compiling was successfully finished, even if I set break > > point > > on the source code, I can't trace the working line in sqlite3.c > correctly. > > As someone else said, the problem is that the Visual C++ debugger doesn't > play nice with files in excess of 64KiB lines. When I had this need a > couple years ago, I carefully split the sqlite3.c file into several pieces > and compiled them separately. > > >From the canonical SQLite source code you can type "make sqlite3-all.c" and it will generate a version of the amalgamation that #includes a handful of separate files (named sqlite3-N.c for N=1,2,3,), each less than 32K lines in size. drh@bella:~/sqlite/bld$ make sqlite3-all.c tclsh /home/drh/sqlite/sqlite/tool/split-sqlite3c.tcl drh@bella:~/sqlite/bld$ wc sqlite3-*.c 32314 165952 1228350 sqlite3-1.c 30892 145495 1098859 sqlite3-2.c 32729 144742 1091870 sqlite3-3.c 32481 150359 1198841 sqlite3-4.c 23259 100070 768733 sqlite3-5.c 32 2371518 sqlite3-all.c 151707 706855 5388171 total Include all these files in your project, but compile against just sqlite3-all.c. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
On Dec 8, 2014 2:10 AM, "Shinichiro Yoshioka" wrote: > > Hi, > > I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. > But although the compiling was successfully finished, even if I set break > point > on the source code, I can't trace the working line in sqlite3.c correctly. As someone else said, the problem is that the Visual C++ debugger doesn't play nice with files in excess of 64KiB lines. When I had this need a couple years ago, I carefully split the sqlite3.c file into several pieces and compiled them separately. SDR ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
Hi Shinichiro, If opening the database failed with sqlite3_open() != SQLITE_OK, it is probably best to check the return code and error message using sqlite3_errmsg(). It will give a strong hint. Debugging into the sqlite3 code itself never worked for me. Make sure that - the directory the database file redsides in exists - the the user executing the program has the permission to read/write in the directory and the database file This is not really the answer to your question, but you can probably solve your problem without debugging into sqlite. Martin. Am 08.12.2014 10:55, schrieb Shinichiro Yoshioka: Hi, Clemens and Martin, Thank you for your prompt responses. How exactly are you using SQLite in your program? If you are not using the SQLite C API (sqlite3_* functions) directly, I'm using sqlite APIs for calling from C source code directly. which Version of VC++ do you use? I'm using Visual studio express 2010. why do you want to debug into the sqlite.c file? Since opening database API is failed, I'm trying to figure out the cause. The file sqlite.c is just another source file for your compiler; optimizations would occcur only if you set them in your compiler options. Yeah.. I completely agree with you, but I can't find such setting in VC++ property, So I'm asking this query... Thanks, 2014-12-08 18:14 GMT+09:00 Clemens Ladisch : Shinichiro Yoshioka wrote: I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c correctly. How exactly are you using SQLite in your program? If you are not using the SQLite C API (sqlite3_* functions) directly, it is likely that there is a second copy of the SQLite library inside that other database driver. Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
Hi, Clemens and Martin, Thank you for your prompt responses. >How exactly are you using SQLite in your program? If you are not using >the SQLite C API (sqlite3_* functions) directly, I'm using sqlite APIs for calling from C source code directly. >which Version of VC++ do you use? I'm using Visual studio express 2010. >why do you want to debug into the sqlite.c file? Since opening database API is failed, I'm trying to figure out the cause. >The file sqlite.c is just another source file for your compiler; optimizations would occcur > only if you set them in your compiler options. Yeah.. I completely agree with you, but I can't find such setting in VC++ property, So I'm asking this query... Thanks, 2014-12-08 18:14 GMT+09:00 Clemens Ladisch : > Shinichiro Yoshioka wrote: > > I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. > > But although the compiling was successfully finished, even if I set break > > point > > on the source code, I can't trace the working line in sqlite3.c > correctly. > > How exactly are you using SQLite in your program? If you are not using > the SQLite C API (sqlite3_* functions) directly, it is likely that there > is a second copy of the SQLite library inside that other database driver. > > > Regards, > Clemens > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
Hi Shinichiro, which Version of VC++ do you use? As far as I know, older versions do not support debugging source files with more than 65535 lines. Also, why do you want to debug into the sqlite.c file? The file sqlite.c is just another source file for your compiler; optimizations would occcur only if you set them in your compiler options. HTH Martin Am 08.12.2014 10:10, schrieb Shinichiro Yoshioka: Hi, I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c correctly. I suspected that the sqlite3.c was optimized, but there is no opiton like that. Always the active line doesn't match to source code in debug mode. Is the code optimized automatically? if so, how can I deactivate it? If anyone knows above phenomenon, then could you please answer me?? Thanks, ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [SQLite]Basic query
Shinichiro Yoshioka wrote: > I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. > But although the compiling was successfully finished, even if I set break > point > on the source code, I can't trace the working line in sqlite3.c correctly. How exactly are you using SQLite in your program? If you are not using the SQLite C API (sqlite3_* functions) directly, it is likely that there is a second copy of the SQLite library inside that other database driver. Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] [SQLite]Basic query
Hi, I'm about to use sqlite-amalgamation(sqlite3.c) on Visual C++. But although the compiling was successfully finished, even if I set break point on the source code, I can't trace the working line in sqlite3.c correctly. I suspected that the sqlite3.c was optimized, but there is no opiton like that. Always the active line doesn't match to source code in debug mode. Is the code optimized automatically? if so, how can I deactivate it? If anyone knows above phenomenon, then could you please answer me?? Thanks, ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users