diff -ruN kozos22/i386-stub.c kozos23/i386-stub.c --- kozos22/i386-stub.c Sat Nov 24 14:39:50 2007 +++ kozos23/i386-stub.c Sat Nov 24 17:45:25 2007 @@ -986,7 +986,7 @@ { case 'L': { - int startflag, doneflag, countmax, count = 1, i; + int startflag, doneflag, countmax, count, i; unsigned int threadid[2]; kz_thread *thp; @@ -1008,6 +1008,9 @@ } } + count = 1; + if (doneflag) count = 0; + ptr = remcomOutBuffer; *ptr++ = 'q'; *ptr++ = 'M'; @@ -1048,16 +1051,8 @@ mode = hexToIntN(&ptr, 4); threadid[0] = hexToIntN(&ptr, 4); threadid[1] = hexToIntN(&ptr, 4); - if (threadid[1] == 0xffffffff) - { - /* - * 何を返すべきかちょっと不明なので,とりあえず - * カレントスレッドを返す. - */ - thp = gen_thread; /* current を返すべきか? 不明... */ - } else { - thp = (kz_thread *)threadid[1]; - } + + thp = (kz_thread *)threadid[1]; ptr = remcomOutBuffer; *ptr++ = 'Q'; @@ -1125,8 +1120,11 @@ if (hexToInt(&ptr, &val)) { if (rev) val = -val; + if (val == -1) + { + break; + } stub_restore_regs(gen_thread); - if (val == -1) val = (int)current; gen_thread = (kz_thread *)val; stub_store_regs(gen_thread); strcpy (remcomOutBuffer, "OK");