1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

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
This commit is contained in:
drh
2014-09-06 03:16:28 +00:00
parent 6b9da12856
commit 44ee1dc843
3 changed files with 15 additions and 8 deletions

View File

@@ -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;