デバッグセッションでプロセスが同期しなくなった場合 (例えば、合計セットのサブセットに focus コマンドを使用した後 next や実行を進める別のコマンドを使用した場合)、プロセスを元に戻す最も簡単な方法は、すべてのプロセスが到達する場所まで実行を継続することです。次の例は、異なるプロセスがプログラムの異なる場所にあるためにプロセスからの出力が同一でない例を示しています。until (GDB モード) または cont to (IDB モード) コマンドは、プロセスを同期させてメッセージを集約します。
(idb) next (idb) [4:5,12] stopped at [int feedbackToDebugger(int, int, char*):17 0x120006bf4] [0:3,6:11] [3] stopped at [int feedbackToDebugger(int, int, char*):15 0x120006bf0] [4:5,12] 17 int pathSize = 1000; [0:3,6:11] 15 int i = 0; (idb) l (idb) [0:3,6:11] 16 char path[1000]; [4:5,12] 18 char hostname[1000]; [0:3,6:11] 17 int pathSize = 1000; [4:5,12] 19 int hostnameSize = 1000; [0:3,6:11] 18 char hostname[1000]; [4:5,12] 20 [0:3,6:11] 19 int hostnameSize = 1000; [4:5,12] 21 volatile int debuggerAttached = 0; [0:3,6:11] 20 [4:5,12] 22 [0:3,6:11] 21 volatile int debuggerAttached = 0; [4:5,12] 23 gethostname(hostname,hostnameSize); %3 [0:12] [22;24] [0:3,6:11] 23 gethostname(hostname,hostnameSize); [4:5,12] 25 getcwd(path,pathSize); [0:3,6:11] 24 [4:5,12] 26 strcat(path,"/"); [0:3,6:11] 25 getcwd(path,pathSize); [4:5,12] 27 strcat(path,name); [0:3,6:11] 26 strcat(path,"/"); [4:5,12] 28 [0:3,6:11] 27 strcat(path,name); [4:5,12] 29 // Print myid pid into idbAttach.myid [0:3,6:11] 28 [4:5,12] 30 sprintf(filename,"idbAttach.%d",myid); [0:3,6:11] 29 // Print myid pid into idbAttach.myid [4:5,12] 31 file = fopen(filename,"w"); [0:3,6:11] 30 sprintf(filename,"idbAttach.%d",myid); [4:5,12] 32 if (file == NULL) { [0:3,6:11] 31 file = fopen(filename,"w"); [4:5,12] 33 fprintf(stderr,"smg98: can't open %s for %s\n",filename, "w"); [0:3,6:11] 32 if (file == NULL) { [4:5,12] 34 exit(1) [0:3,6:11] 33 fprintf(stderr,"smg98: can't open %s for %s\n",filename, "w"); [4:5,12] 35 } [12] 36 fprintf(file," %ld %ld %s %s\n", myid, getpid(), hostname, path); [12] 37 fclose(file); [12] 38 [4:5] 36 fprintf(file," %ld %ld %s %s\n", myid, getpid(), hostname, path); [0:3,6:11] 34 exit(1); [0:3,6:11] 35 } [4:5] 37 fclose(file); [0:3,6:11] 36 fprintf(file," %ld %ld %s %s\n", myid, getpid(), hostname, path); [4:5] 38 (idb) until 36 [0:13] stopped at [int feedbackToDebugger(int, int, char*):36 0x120006cb8] [0:13] 36 fprintf(file," %ld %ld %s %s\n", myid, getpid(), hostname, path); (idb) next (idb) [0:13] stopped at [int feedbackToDebugger(int, int, char*):37 0x120006d0c] [0:13] 37 fclose(file);