/ Check-in [4257e9b7]
Login

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

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winNativeHeap
Files: files | file ages | folders
SHA1: 4257e9b7ca78feb03df08fde56da947ae64c5c6f
User & Date: mistachkin 2011-08-25 02:02:25
Context
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
01:16
Make sure that SQLITE_FCNTL_SIZE_HINT on Windows does not shrink the file. check-in: d4f6437f user: mistachkin tags: winNativeHeap
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to Makefile.msc.

6
7
8
9
10
11
12

13
14
15
16
17
18
19
..
37
38
39
40
41
42
43

44













45
46
47
48
49
50
51
52
53
54





55

56
57
58
59
60
61
62
...
125
126
127
128
129
130
131





132
133
134
135
136
137
138
...
139
140
141
142
143
144
145




146
147
148
149
150
151
152
# that contains this "Makefile.msc".
#
TOP = .

# Set this non-0 to create and use the SQLite amalgamation file.
#
USE_AMALGAMATION = 1


# Version numbers and release number for the SQLite being compiled.
#
VERSION = 3.7
VERSION_NUMBER = 3007007
RELEASE = 3.7.7

................................................................................
TCC = $(TCC) -I$(TOP)\ext\rtree
!ENDIF

# Define -DNDEBUG to compile without debugging (i.e., for production usage)
# Omitting the define will cause extra debugging code to be inserted and
# includes extra comments when "EXPLAIN stmt" is used.
#

TCC = $(TCC) -DNDEBUG














#
# Prevent warnings about "insecure" runtime library functions being used.
#
TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS

#
# Use native Win32 heap.
#
TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1





# TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1


# The locations of the Tcl header and library files.  Also, the library that
# non-stubs enabled programs using Tcl must link against.  These variables
# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
# prior to running nmake in order to match the actual installed location and
# version on this machine.
#
................................................................................
# END required Windows option

TCC = $(TCC) $(OPT_FEATURE_FLAGS)

# Add in any optional parameters specified on the make commane line
# ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
TCC = $(TCC) $(OPTS)






# libtool compile/link
LTCOMPILE = $(TCC) -Fo$@
LTLIB = lib.exe
LTLINK = $(TCC) -Fe$@

# If a platform was set, force the linker to target that.
................................................................................
# Note that the vcvars*.bat family of batch files typically
# set this for you.  Otherwise, the linker will attempt
# to deduce the binary type based on the object files.
!IF "$(PLATFORM)"!=""
LTLINKOPTS = /MACHINE:$(PLATFORM)
LTLIBOPTS = /MACHINE:$(PLATFORM)
!ENDIF





# nawk compatible awk.
NAWK = gawk.exe

# You should not have to change anything below this line
###############################################################################








>







 







>

>
>
>
>
>
>
>
>
>
>
>
>
>







|


>
>
>
>
>
|
>







 







>
>
>
>
>







 







>
>
>
>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# that contains this "Makefile.msc".
#
TOP = .

# Set this non-0 to create and use the SQLite amalgamation file.
#
USE_AMALGAMATION = 1
DEBUG=0

# Version numbers and release number for the SQLite being compiled.
#
VERSION = 3.7
VERSION_NUMBER = 3007007
RELEASE = 3.7.7

................................................................................
TCC = $(TCC) -I$(TOP)\ext\rtree
!ENDIF

# Define -DNDEBUG to compile without debugging (i.e., for production usage)
# Omitting the define will cause extra debugging code to be inserted and
# includes extra comments when "EXPLAIN stmt" is used.
#
!IF $(DEBUG)==0
TCC = $(TCC) -DNDEBUG
!ENDIF

!IF $(DEBUG)>1
TCC = $(TCC) -DSQLITE_DEBUG
!ENDIF

!IF $(DEBUG)>3
TCC = $(TCC) -DSQLITE_DEBUG_OS_TRACE=1
!ENDIF

!IF $(DEBUG)>4
TCC = $(TCC) -DSQLITE_ENABLE_IOTRACE
!ENDIF

#
# Prevent warnings about "insecure" runtime library functions being used.
#
TCC = $(TCC) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS

#
# Use native Win32 heap instead of malloc/free?
#
TCC = $(TCC) -DSQLITE_WIN32_MALLOC=1

#
# Validate the heap on every call into the native Win32 heap subsystem?
#
!IF $(DEBUG)>2
TCC = $(TCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
!ENDIF

# The locations of the Tcl header and library files.  Also, the library that
# non-stubs enabled programs using Tcl must link against.  These variables
# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
# prior to running nmake in order to match the actual installed location and
# version on this machine.
#
................................................................................
# END required Windows option

TCC = $(TCC) $(OPT_FEATURE_FLAGS)

# Add in any optional parameters specified on the make commane line
# ie.  make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
TCC = $(TCC) $(OPTS)

# Add debug information if enabled.
!IF $(DEBUG)!=0
TCC = $(TCC) -Zi -D_DEBUG
!ENDIF

# libtool compile/link
LTCOMPILE = $(TCC) -Fo$@
LTLIB = lib.exe
LTLINK = $(TCC) -Fe$@

# If a platform was set, force the linker to target that.
................................................................................
# Note that the vcvars*.bat family of batch files typically
# set this for you.  Otherwise, the linker will attempt
# to deduce the binary type based on the object files.
!IF "$(PLATFORM)"!=""
LTLINKOPTS = /MACHINE:$(PLATFORM)
LTLIBOPTS = /MACHINE:$(PLATFORM)
!ENDIF

!IF $(DEBUG)!=0
LTLINKOPTS = $(LTLINKOPTS) /DEBUG
!ENDIF

# nawk compatible awk.
NAWK = gawk.exe

# You should not have to change anything below this line
###############################################################################

Changes to src/sqliteInt.h.

145
146
147
148
149
150
151





152
153
154
155
156
157
158
/*
** Exactly one of the following macros must be defined in order to
** specify which memory allocation subsystem to use.
**
**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()
**     SQLITE_WIN32_MALLOC           // Use Win32 native heap API
**     SQLITE_MEMDEBUG               // Debugging version of system malloc()





**
** (Historical note:  There used to be several other options, but we've
** pared it down to just these two.)
**
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
** the default.
*/







>
>
>
>
>







145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/*
** Exactly one of the following macros must be defined in order to
** specify which memory allocation subsystem to use.
**
**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()
**     SQLITE_WIN32_MALLOC           // Use Win32 native heap API
**     SQLITE_MEMDEBUG               // Debugging version of system malloc()
**
** On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the
** assert() macro is enabled, each call into the Win32 native heap subsystem
** will cause HeapValidate to be called.  If heap validation should fail, an
** assertion will be triggered.
**
** (Historical note:  There used to be several other options, but we've
** pared it down to just these two.)
**
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
** the default.
*/