/ Check-in [40185923]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add comments for the various debug levels. When debugging, disable optimizations. Prevent the win32lock tests from spinning forever.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winNativeHeap
Files: files | file ages | folders
SHA1: 401859236b0d97bde82b11f32efce6eb9d490941
User & Date: mistachkin 2011-08-25 04:09:12
Context
2011-08-26
01:32
Allow the Win32 native heap flags to be overridden at compile-time. check-in: 1c2ecec8 user: mistachkin tags: winNativeHeap
2011-08-25
04:09
Add comments for the various debug levels. When debugging, disable optimizations. Prevent the win32lock tests from spinning forever. check-in: 40185923 user: mistachkin tags: winNativeHeap
02:02
In the MSVC makefile, support several levels of debugging, each one building on the previous. Also, add comment about the SQLITE_WIN32_MALLOC_VALIDATE macro. check-in: 4257e9b7 user: mistachkin tags: winNativeHeap
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

     6      6   # that contains this "Makefile.msc".
     7      7   #
     8      8   TOP = .
     9      9   
    10     10   # Set this non-0 to create and use the SQLite amalgamation file.
    11     11   #
    12     12   USE_AMALGAMATION = 1
    13         -DEBUG=0
           13  +
           14  +# Set this to one of the following values to enable various debugging
           15  +# features.  Each level includes the debugging options from the previous
           16  +# levels.  Currently, the recognized values for DEBUG are:
           17  +#
           18  +# 0 == NDEBUG: Disables assert() and other runtime diagnostics.
           19  +# 1 == Disables NDEBUG and all optimizations and then enables PDBs.
           20  +# 2 == SQLITE_DEBUG: Enables various diagnostics messages and code.
           21  +# 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
           22  +# 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
           23  +# 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
           24  +#
           25  +DEBUG = 0
    14     26   
    15     27   # Version numbers and release number for the SQLite being compiled.
    16     28   #
    17     29   VERSION = 3.7
    18     30   VERSION_NUMBER = 3007007
    19     31   RELEASE = 3.7.7
    20     32   
................................................................................
   147    159   
   148    160   TCC = $(TCC) $(OPT_FEATURE_FLAGS)
   149    161   
   150    162   # Add in any optional parameters specified on the make commane line
   151    163   # ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
   152    164   TCC = $(TCC) $(OPTS)
   153    165   
   154         -# Add debug information if enabled.
   155         -!IF $(DEBUG)!=0
   156         -TCC = $(TCC) -Zi -D_DEBUG
          166  +# If debugging is enabled, disable all optimizations and enable PDBs.
          167  +!IF $(DEBUG)>0
          168  +TCC = $(TCC) -Od -Zi -D_DEBUG
   157    169   !ENDIF
   158    170   
   159    171   # libtool compile/link
   160    172   LTCOMPILE = $(TCC) -Fo$@
   161    173   LTLIB = lib.exe
   162    174   LTLINK = $(TCC) -Fe$@
   163    175   
................................................................................
   166    178   # set this for you.  Otherwise, the linker will attempt
   167    179   # to deduce the binary type based on the object files.
   168    180   !IF "$(PLATFORM)"!=""
   169    181   LTLINKOPTS = /MACHINE:$(PLATFORM)
   170    182   LTLIBOPTS = /MACHINE:$(PLATFORM)
   171    183   !ENDIF
   172    184   
   173         -!IF $(DEBUG)!=0
          185  +# If debugging is enabled, enable PDBs.
          186  +!IF $(DEBUG)>0
   174    187   LTLINKOPTS = $(LTLINKOPTS) /DEBUG
   175    188   !ENDIF
   176    189   
   177    190   # nawk compatible awk.
   178    191   NAWK = gawk.exe
   179    192   
   180    193   # You should not have to change anything below this line

Changes to test/win32lock.test.

    65     65           regsub {\d+} $::log # x
    66     66           set x
    67     67         } {{delayed #ms for lock/sharing conflict}}
    68     68       }
    69     69     }
    70     70     if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break
    71     71     incr delay1 25
           72  +  if {$delay1 > 12500} {
           73  +    puts "Timed out waiting for \"ok\" and \"error\" results."
           74  +    break
           75  +  }
    72     76     sqlite3_sleep 10
    73     77   }
    74     78   
    75     79   do_test win32lock-2.0 {
    76     80     file_control_win32_av_retry db -1 -1
    77     81   } {0 10 25}
    78     82   do_test win32lock-2.1 {
................................................................................
   109    113           regsub {\d+} $::log # x
   110    114           set x
   111    115         } {{delayed #ms for lock/sharing conflict}}
   112    116       }
   113    117     }
   114    118     if {[llength $win32_lock_ok] && [llength $win32_lock_error]} break
   115    119     incr delay1 1
          120  +  if {$delay1 > 500} {
          121  +    puts "Timed out waiting for \"ok\" and \"error\" results."
          122  +    break
          123  +  }
   116    124     sqlite3_sleep 10
   117    125   }
   118    126   
   119    127   file_control_win32_av_retry db 10 25
   120    128   sqlite3_test_control_pending_byte $old_pending_byte
   121    129   sqlite3_shutdown
   122    130   test_sqlite3_log 
   123    131   sqlite3_initialize
   124    132   finish_test