diff options
author | drh <drh@noemail.net> | 2014-09-06 03:16:28 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-09-06 03:16:28 +0000 |
commit | 44ee1dc84393aaae0cf82f741eab77a7a1f11668 (patch) | |
tree | 5d225a376b98320a98cf6884eb5481ca34e2b20e /src/test_malloc.c | |
parent | 6b9da128565cfbaf61f5ded79bc71ec25443828b (diff) | |
download | sqlite-44ee1dc84393aaae0cf82f741eab77a7a1f11668.tar.gz sqlite-44ee1dc84393aaae0cf82f741eab77a7a1f11668.zip |
Add the sqlite3_memdebug_title_count global variable, used during debugging
to count the number of invocations of test_memdebug_settitle. By examining
this variable in the debugger after a segfault, one can then set a breakpoint
on test_memdebug_settitle that will fire just before the problem.
FossilOrigin-Name: 27e3ca3e0f1da54e3527704a8601bb9003b086bf
Diffstat (limited to 'src/test_malloc.c')
-rw-r--r-- | src/test_malloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test_malloc.c b/src/test_malloc.c index 900a8ac40..b937cea7c 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -696,6 +696,12 @@ static int test_memdebug_pending( return TCL_OK; } +/* +** The following global variable keeps track of the number of tests +** that have run. This variable is only useful when running in the +** debugger. +*/ +static int sqlite3_memdebug_title_count = 0; /* ** Usage: sqlite3_memdebug_settitle TITLE @@ -713,6 +719,7 @@ static int test_memdebug_settitle( int objc, Tcl_Obj *CONST objv[] ){ + sqlite3_memdebug_title_count++; if( objc!=2 ){ Tcl_WrongNumArgs(interp, 1, objv, "TITLE"); return TCL_ERROR; |