Add an undocumented and possibly ephemeral ".breakpoint" command to the

command-line shell, to call a no-op routine on which it is convenient to 
set a symbolic debugger breakpoint.

FossilOrigin-Name: 8e2363ad76446e863d03ead91fd621e59d5cb495
This commit is contained in:
drh 2012-04-17 09:09:33 +00:00
parent 8c5058bbdb
commit d8621b90c9
3 changed files with 23 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Fix\sa\sbug\sin\sthe\scommand-line\sshell\slogic\sthat\sattempts\sto\scontinue\swith\sa\n".dump"\seven\safter\sencountering\sdatabase\scorruption.
D 2012-04-16T17:22:30.904
C Add\san\sundocumented\sand\spossibly\sephemeral\s".breakpoint"\scommand\sto\sthe\s\ncommand-line\sshell,\sto\scall\sa\sno-op\sroutine\son\swhich\sit\sis\sconvenient\sto\s\nset\sa\ssymbolic\sdebugger\sbreakpoint.
D 2012-04-17T09:09:33.765
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -182,7 +182,7 @@ F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
F src/resolve.c 969ec2bc52db1b068054ecf5ddc74f244102a71d
F src/rowset.c f6a49f3e9579428024662f6e2931832511f831a1
F src/select.c d7b9018b7dd2e821183d69477ab55c39b8272335
F src/shell.c 5d2484bea27d1fb8a733077c436482a06c1d30f2
F src/shell.c 11185a9a4574f363bd4268a2780d37480ae00040
F src/sqlite.h.in 4338f299fc83dada8407358d585c0e240ecb76a3
F src/sqlite3ext.h 6904f4aadf976f95241311fbffb00823075d9477
F src/sqliteInt.h ce7d8404f15db6cbe73cf196d3d6198aaa4e3924
@ -1000,7 +1000,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh a8a0a3babda96dfb1ff51adda3cbbf3dfb7266c2
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P 9efbeb11ae0d480a13ff1353820c12f3a8bff452
R 8554990f6e5abd69d8539d60c8a20e9c
P 020b5e90f950a42299074ff770612b9e68850d95
R b1350dfbc2eb46aaca5347bd8a799d07
U drh
Z 6fed7a84ff8fa569c38ca78c5c084864
Z ed107cd283f4ba98c58e464c44f875e3

View File

@ -1 +1 @@
020b5e90f950a42299074ff770612b9e68850d95
8e2363ad76446e863d03ead91fd621e59d5cb495

View File

@ -1562,6 +1562,15 @@ static void sql_trace_callback(void *pArg, const char *z){
if( f ) fprintf(f, "%s\n", z);
}
/*
** A no-op routine that runs with the ".breakpoint" doc-command. This is
** a useful spot to set a debugger breakpoint.
*/
static void test_breakpoint(void){
static int nCall = 0;
nCall++;
}
/*
** If an input line begins with "." then invoke this routine to
** process that line.
@ -1641,6 +1650,13 @@ static int do_meta_command(char *zLine, struct callback_data *p){
bail_on_error = booleanValue(azArg[1]);
}else
/* The undocumented ".breakpoint" command causes a call to the no-op
** routine named test_breakpoint().
*/
if( c=='b' && n>=3 && strncmp(azArg[0], "breakpoint", n)==0 ){
test_breakpoint();
}else
if( c=='d' && n>1 && strncmp(azArg[0], "databases", n)==0 && nArg==1 ){
struct callback_data data;
char *zErrMsg = 0;