On Mon, Mar 11, 2013 at 5:21 PM, Bert Huijben <b...@qqmail.nl> wrote:
> > -----Original Message----- > > From: ... On Behalf Of Dominique Devienne > > Except I can't debug it... 'Cause I'm primarily on Windows, which has a > > well-known limitation in the way it stores Debug Information (uses 16-bit > > integer for the line number, so limited to ~64K lines, whereas the > > amalgamation is much larger). > > Since Visual C++ 2005 the limit in PDB files was increased to 24 bit. You > might still get a warning for compatibility with older tools, but the 'well > known limitation' was resolved over 8 years ago; 4 major compiler > versions ago. > Perhaps you can enlighten me more about this, as now that I have taken the time to double-check this, I'm still seeing the Visual Studio 10 debugger incorrectly stepping into the sqlite3.c file: C:\Users\DDevienne\sqlite\135k>cl /nologo /Zi /Od /Fesqlite3-135k sqlite3.c shell.c sqlite3.c shell.c Generating Code... C:\Users\DDevienne\sqlite\135k>.\sqlite3-135k.exe SQLite version 3.7.16 2013-03-13 00:13:25 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> select 1; Here's the stack trace: > sqlite3-135k.exe!sqlite3_complete(const char * zSql) Line 47510 C sqlite3-135k.exe!process_input(callback_data * p, _iobuf * in) Line 2724 + 0x41 bytes C sqlite3-135k.exe!main(int argc, char * * argv) Line 3189 + 0xc bytes C sqlite3-135k.exe!__tmainCRTStartup() Line 278 + 0x12 bytes C kernel32.dll!000000007785652d() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!0000000077a8c521() And here's line 47510: ** 64 4 Incremental vacuum mode Which is part of a big comment starting line 47433: /************** Begin file btreeInt.h ****************************************/ /* ** 2004 April 6 If I now look inside file sqlite3.c (which has 138,109 lines), line 113,046 is in fact the true location of sqlite3_complete(): SQLITE_API int sqlite3_complete(const char *zSql){ And surprise 113,046 - 47,510 = 65536, which happens to be 2^16... Now I repeat the same thing in the 32K amalgamation (I've suppressed /nologo to show I'm using VS10): C:\Users\DDevienne\sqlite\135k>cd ..\32k C:\Users\DDevienne\sqlite\32k>del *.exe *.ilk *.pdb *.obj C:\Users\DDevienne\sqlite\32k>cl /Zi /Od /Fesqlite3-32k sqlite3-all.c shell.c Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64 Copyright (C) Microsoft Corporation. All rights reserved. sqlite3-all.c shell.c Generating Code... Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. /debug /out:sqlite3-32k.exe sqlite3-all.obj shell.obj C:\Users\DDevienne\sqlite\32k>.\sqlite3-32k.exe SQLite version 3.7.16 2013-03-13 00:13:25 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> select 1; And here's the stack trace, which this times takes me to sqlite3-4.c, on line 18,300, which happens to be the first line *inside* sqlite3_complete() > sqlite3-32k.exe!sqlite3_complete(const char * zSql) Line 18300 C sqlite3-32k.exe!process_input(callback_data * p, _iobuf * in) Line 2724 + 0x41 bytes C sqlite3-32k.exe!main(int argc, char * * argv) Line 3189 + 0xc bytes C sqlite3-32k.exe!__tmainCRTStartup() Line 278 + 0x12 bytes C kernel32.dll!000000007785652d() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!0000000077a8c521() F10 takes me to 18,332, etc... It's actually the first time I "step" into the method :) Long story short, I'm definitely seeing a 64k line Visual Studio debugger limitation. Perhaps you are right about PDBs, and it's a VS limitation. Perhaps I'm missing a magic command line switch. I'm no expert... I'd be very happy to learn how to work-around that VS limitation, if a work-around exists (beside DRH's thoughtful 32K amalgamation). Thanks, --DD _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users