]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add an undocumented and possibly ephemeral ".breakpoint" command to the
authordrh <drh@noemail.net>
Tue, 17 Apr 2012 09:09:33 +0000 (09:09 +0000)
committerdrh <drh@noemail.net>
Tue, 17 Apr 2012 09:09:33 +0000 (09:09 +0000)
command-line shell, to call a no-op routine on which it is convenient to
set a symbolic debugger breakpoint.

FossilOrigin-Name: 8e2363ad76446e863d03ead91fd621e59d5cb495

manifest
manifest.uuid
src/shell.c

index dd970aa6371b84e7d5c6dc710228ef61baee787d..5d4be74e07fb3492d4601c03bc3f3cd8969a5474 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index 09a6bb90fb01426f654af1158bdd0d1ba5a46fe4..849339b16d96468597feff0a3d46f99f515b6036 100644 (file)
@@ -1 +1 @@
-020b5e90f950a42299074ff770612b9e68850d95
\ No newline at end of file
+8e2363ad76446e863d03ead91fd621e59d5cb495
\ No newline at end of file
index b4c21ad38b9aa139bdf424df237284872063f56e..2607e680de67028218df834c2c008b846c2fc6b2 100644 (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;