Thread "out-of-synch" 错误

本文探讨了在Eclipse中进行代码调试时遇到的代码不同步通知问题,并解释了其可能的原因,包括虚拟机不支持热更新等情况。文章还提供了解决方案,如重新部署项目或重启Tomcat和Eclipse。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

debug一段代码的时候eclipse里出现:

    The out of synch notification in the debug view means that the code in the VM
is not the same as the code in the workspace.
At this time, our resolution is at the type level. If a type has changed in
the workspace but that change is not present in the stack frame displayed in
the debug view, we show that it is "out of synch." Stack frames may get out
of synch in three ways - the VM doesn't support hot code replace (HCR), a
particular attempt at HCR has failed (not all VMs support all redefinitions),
or the HCR succeeded but the VM was unable to pop the frame running old code.
This last case can occur, for example, when the type in which a main method
resides is successfully changed. The main method will display "out of synch"
because the VM cannot pop the main method from the stack until the program
exits.
    We cannot know what code is executing in a running thread, so the best that
we can do is to say that a running thread "may be out of synch" after an HCR
fails. That is, it may or may not be running the code which wasn't updated.

可能是机器内存太小的原因,解决方法,重新发布工程,不行就重启tomcat和eclipse。

tianhangsong@ubuntu:~/NachOS-4.1/code/build.linux$ make depend g++ -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -M ../lib/bitmap.cc ../lib/debug.cc ../lib/hash.cc ../lib/libtest.cc ../lib/list.cc ../lib/sysdep.cc ../machine/interrupt.cc ../machine/stats.cc ../machine/timer.cc ../machine/console.cc ../machine/machine.cc ../machine/mipssim.cc ../machine/translate.cc ../machine/network.cc ../machine/disk.cc ../threads/alarm.cc ../threads/kernel.cc ../threads/main.cc ../threads/scheduler.cc ../threads/synch.cc ../threads/synchlist.cc ../threads/thread.cc ../userprog/addrspace.cc ../userprog/exception.cc ../userprog/synchconsole.cc ../filesys/directory.cc ../filesys/filehdr.cc ../filesys/filesys.cc ../filesys/pbitmap.cc ../filesys/openfile.cc ../filesys/synchdisk.cc ../network/post.cc > makedep ed - Makefile.dep < eddep rm eddep makedep tianhangsong@ubuntu:~/NachOS-4.1/code/build.linux$ make g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../lib/bitmap.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../lib/debug.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../lib/libtest.cc ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] "7", "8", "9", "10", "11", "12", "13", "14"}; ^ ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../lib/libtest.cc:59:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../lib/sysdep.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/interrupt.cc ../machine/interrupt.cc:29:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] static char *intLevelNames[] = { "off", "on"}; ^ ../machine/interrupt.cc:29:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] "network recv"}; ^ ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/interrupt.cc:32:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/stats.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/timer.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/console.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/machine.cc ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] "illegal instruction" }; ^ ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/machine.cc:19:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/mipssim.cc In file included from ../machine/mipssim.cc:22:0: ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] }; ^ ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.h:227:7: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ../machine/mipssim.cc: In member function ‘void Machine::OneInstruction(Instruction*)’: ../machine/mipssim.cc:139:56: warning: array subscript has type ‘char’ [-Wchar-subscripts] struct OpString *str = &opStrings[instr->opCode]; ^ ../machine/mipssim.cc:158:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] sum = registers[instr->rs] + registers[instr->rt]; ^ ../machine/mipssim.cc:158:50: warning: array subscript has type ‘char’ [-Wchar-subscripts] sum = registers[instr->rs] + registers[instr->rt]; ^ ../machine/mipssim.cc:159:28: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (!((registers[instr->rs] ^ registers[instr->rt]) & SIGN_BIT) && ^ ../machine/mipssim.cc:159:51: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (!((registers[instr->rs] ^ registers[instr->rt]) & SIGN_BIT) && ^ ../machine/mipssim.cc:160:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] ((registers[instr->rs] ^ sum) & SIGN_BIT)) { ^ ../machine/mipssim.cc:164:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = sum; ^ ../machine/mipssim.cc:168:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] sum = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:169:28: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (!((registers[instr->rs] ^ instr->extra) & SIGN_BIT) && ^ ../machine/mipssim.cc:174:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = sum; ^ ../machine/mipssim.cc:178:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:178:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:182:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] + registers[instr->rt]; ^ ../machine/mipssim.cc:182:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] + registers[instr->rt]; ^ ../machine/mipssim.cc:182:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] + registers[instr->rt]; ^ ../machine/mipssim.cc:186:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] & registers[instr->rt]; ^ ../machine/mipssim.cc:186:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] & registers[instr->rt]; ^ ../machine/mipssim.cc:186:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] & registers[instr->rt]; ^ ../machine/mipssim.cc:190:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] & (instr->extra & 0xffff); ^ ../machine/mipssim.cc:190:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] & (instr->extra & 0xffff); ^ ../machine/mipssim.cc:194:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] == registers[instr->rt]) ^ ../machine/mipssim.cc:194:49: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] == registers[instr->rt]) ^ ../machine/mipssim.cc:201:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (!(registers[instr->rs] & SIGN_BIT)) ^ ../machine/mipssim.cc:206:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] > 0) ^ ../machine/mipssim.cc:211:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] <= 0) ^ ../machine/mipssim.cc:218:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] & SIGN_BIT) ^ ../machine/mipssim.cc:223:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] != registers[instr->rt]) ^ ../machine/mipssim.cc:223:49: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] != registers[instr->rt]) ^ ../machine/mipssim.cc:228:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rt] == 0) { ^ ../machine/mipssim.cc:232:45: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[LoReg] = registers[instr->rs] / registers[instr->rt]; ^ ../machine/mipssim.cc:232:68: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[LoReg] = registers[instr->rs] / registers[instr->rt]; ^ ../machine/mipssim.cc:233:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[HiReg] = registers[instr->rs] % registers[instr->rt]; ^ ../machine/mipssim.cc:233:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[HiReg] = registers[instr->rs] % registers[instr->rt]; ^ ../machine/mipssim.cc:238:43: warning: array subscript has type ‘char’ [-Wchar-subscripts] rs = (unsigned int) registers[instr->rs]; ^ ../machine/mipssim.cc:239:43: warning: array subscript has type ‘char’ [-Wchar-subscripts] rt = (unsigned int) registers[instr->rt]; ^ ../machine/mipssim.cc:258:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[NextPCReg] + 4; ^ ../machine/mipssim.cc:260:31: warning: array subscript has type ‘char’ [-Wchar-subscripts] pcAfter = registers[instr->rs]; ^ ../machine/mipssim.cc:265:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:279:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:297:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = instr->extra << 16; ^ ../machine/mipssim.cc:301:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:313:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:341:41: warning: array subscript has type ‘char’ [-Wchar-subscripts] nextLoadValue = registers[instr->rt]; ^ ../machine/mipssim.cc:365:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:393:41: warning: array subscript has type ‘char’ [-Wchar-subscripts] nextLoadValue = registers[instr->rt]; ^ ../machine/mipssim.cc:421:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[HiReg]; ^ ../machine/mipssim.cc:425:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[LoReg]; ^ ../machine/mipssim.cc:429:40: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[HiReg] = registers[instr->rs]; ^ ../machine/mipssim.cc:433:40: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[LoReg] = registers[instr->rs]; ^ ../machine/mipssim.cc:437:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] Mult(registers[instr->rs], registers[instr->rt], TRUE, ^ ../machine/mipssim.cc:437:48: warning: array subscript has type ‘char’ [-Wchar-subscripts] Mult(registers[instr->rs], registers[instr->rt], TRUE, ^ ../machine/mipssim.cc:442:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] Mult(registers[instr->rs], registers[instr->rt], FALSE, ^ ../machine/mipssim.cc:442:48: warning: array subscript has type ‘char’ [-Wchar-subscripts] Mult(registers[instr->rs], registers[instr->rt], FALSE, ^ ../machine/mipssim.cc:447:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = ~(registers[instr->rs] | registers[instr->rt]); ^ ../machine/mipssim.cc:447:46: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = ~(registers[instr->rs] | registers[instr->rt]); ^ ../machine/mipssim.cc:447:69: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = ~(registers[instr->rs] | registers[instr->rt]); ^ ../machine/mipssim.cc:451:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] | registers[instr->rt]; ^ ../machine/mipssim.cc:451:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] | registers[instr->rt]; ^ ../machine/mipssim.cc:451:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] | registers[instr->rt]; ^ ../machine/mipssim.cc:455:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] | (instr->extra & 0xffff); ^ ../machine/mipssim.cc:455:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] | (instr->extra & 0xffff); ^ ../machine/mipssim.cc:460:23: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 1, registers[instr->rt])) ^ ../machine/mipssim.cc:460:64: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 1, registers[instr->rt])) ^ ../machine/mipssim.cc:466:23: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 2, registers[instr->rt])) ^ ../machine/mipssim.cc:466:64: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 2, registers[instr->rt])) ^ ../machine/mipssim.cc:471:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] << instr->extra; ^ ../machine/mipssim.cc:471:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] << instr->extra; ^ ../machine/mipssim.cc:475:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] << ^ ../machine/mipssim.cc:475:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] << ^ ../machine/mipssim.cc:476:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] & 0x1f); ^ ../machine/mipssim.cc:480:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] < registers[instr->rt]) ^ ../machine/mipssim.cc:480:48: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] < registers[instr->rt]) ^ ../machine/mipssim.cc:481:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = 1; ^ ../machine/mipssim.cc:483:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = 0; ^ ../machine/mipssim.cc:487:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (registers[instr->rs] < instr->extra) ^ ../machine/mipssim.cc:488:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = 1; ^ ../machine/mipssim.cc:490:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = 0; ^ ../machine/mipssim.cc:494:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] rs = registers[instr->rs]; ^ ../machine/mipssim.cc:497:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = 1; ^ ../machine/mipssim.cc:499:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = 0; ^ ../machine/mipssim.cc:503:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] rs = registers[instr->rs]; ^ ../machine/mipssim.cc:504:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] rt = registers[instr->rt]; ^ ../machine/mipssim.cc:506:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = 1; ^ ../machine/mipssim.cc:508:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = 0; ^ ../machine/mipssim.cc:512:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] >> instr->extra; ^ ../machine/mipssim.cc:512:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] >> instr->extra; ^ ../machine/mipssim.cc:516:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] >> ^ ../machine/mipssim.cc:516:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rt] >> ^ ../machine/mipssim.cc:517:26: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] & 0x1f); ^ ../machine/mipssim.cc:521:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rt]; ^ ../machine/mipssim.cc:523:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = tmp; ^ ../machine/mipssim.cc:527:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rt]; ^ ../machine/mipssim.cc:528:30: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp >>= (registers[instr->rs] & 0x1f); ^ ../machine/mipssim.cc:529:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = tmp; ^ ../machine/mipssim.cc:533:28: warning: array subscript has type ‘char’ [-Wchar-subscripts] diff = registers[instr->rs] - registers[instr->rt]; ^ ../machine/mipssim.cc:533:51: warning: array subscript has type ‘char’ [-Wchar-subscripts] diff = registers[instr->rs] - registers[instr->rt]; ^ ../machine/mipssim.cc:534:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (((registers[instr->rs] ^ registers[instr->rt]) & SIGN_BIT) && ^ ../machine/mipssim.cc:534:50: warning: array subscript has type ‘char’ [-Wchar-subscripts] if (((registers[instr->rs] ^ registers[instr->rt]) & SIGN_BIT) && ^ ../machine/mipssim.cc:535:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] ((registers[instr->rs] ^ diff) & SIGN_BIT)) { ^ ../machine/mipssim.cc:539:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = diff; ^ ../machine/mipssim.cc:543:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] - registers[instr->rt]; ^ ../machine/mipssim.cc:543:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] - registers[instr->rt]; ^ ../machine/mipssim.cc:543:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] - registers[instr->rt]; ^ ../machine/mipssim.cc:548:23: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 4, registers[instr->rt])) ^ ../machine/mipssim.cc:548:64: warning: array subscript has type ‘char’ [-Wchar-subscripts] (registers[instr->rs] + instr->extra), 4, registers[instr->rt])) ^ ../machine/mipssim.cc:553:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:585:33: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = registers[instr->rt]; ^ ../machine/mipssim.cc:588:58: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xff000000) | ((registers[instr->rt] >> 8) & ^ ../machine/mipssim.cc:592:58: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xffff0000) | ((registers[instr->rt] >> 16) & ^ ../machine/mipssim.cc:596:58: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xffffff00) | ((registers[instr->rt] >> 24) & ^ ../machine/mipssim.cc:612:27: warning: array subscript has type ‘char’ [-Wchar-subscripts] tmp = registers[instr->rs] + instr->extra; ^ ../machine/mipssim.cc:644:55: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xffffff) | (registers[instr->rt] << 24); ^ ../machine/mipssim.cc:647:53: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xffff) | (registers[instr->rt] << 16); ^ ../machine/mipssim.cc:650:51: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = (value & 0xff) | (registers[instr->rt] << 8); ^ ../machine/mipssim.cc:653:33: warning: array subscript has type ‘char’ [-Wchar-subscripts] value = registers[instr->rt]; ^ ../machine/mipssim.cc:675:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] ^ registers[instr->rt]; ^ ../machine/mipssim.cc:675:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] ^ registers[instr->rt]; ^ ../machine/mipssim.cc:675:67: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rd] = registers[instr->rs] ^ registers[instr->rt]; ^ ../machine/mipssim.cc:679:21: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] ^ (instr->extra & 0xffff); ^ ../machine/mipssim.cc:679:44: warning: array subscript has type ‘char’ [-Wchar-subscripts] registers[instr->rt] = registers[instr->rs] ^ (instr->extra & 0xffff); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/translate.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/network.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../machine/disk.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/alarm.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/kernel.cc ../threads/kernel.cc: In member function ‘void Kernel::Initialize()’: ../threads/kernel.cc:93:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] currentThread = new Thread("main"); ^ ../threads/kernel.cc: In member function ‘void Kernel::ThreadSelfTest()’: ../threads/kernel.cc:152:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] semaphore = new Semaphore("test", 0); ^ ../threads/kernel.cc: In member function ‘void Kernel::NetworkTest()’: ../threads/kernel.cc:208:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] char *data = "Hello there!"; ^ ../threads/kernel.cc:209:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] char *ack = "Got it!"; ^ In file included from ../threads/synchlist.h:49:0, from ../threads/kernel.cc:14: ../threads/synchlist.cc: In instantiation ofSynchList<T>::SynchList() [with T = int]’: ../threads/kernel.cc:158:20: required from here ../threads/synchlist.cc:26:10: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] lock = new Lock("list lock"); ^ ../threads/synchlist.cc:27:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] listEmpty = new Condition("list empty cond"); ^ ../threads/synchlist.cc: In instantiation of ‘void SynchList<T>::SelfTest(T) [with T = int]’: ../threads/kernel.cc:159:25: required from here ../threads/synchlist.cc:120:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] Thread *helper = new Thread("ping"); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/main.cc ../threads/main.cc:59:8: warning: extra tokens at end of #endif directive [enabled by default] #endif TUT ^ In file included from ../threads/main.cc:41:0: ../lib/copyright.h:23:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] static char *copyright = "Copyright (c) 1992-1993 The Regents of the University of California. All rights reserved."; ^ ../threads/main.cc: In function ‘int main(int, char**)’: ../threads/main.cc:182:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] char *debugArg = ""; ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/scheduler.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/synch.cc ../threads/synch.cc: In member function ‘void Semaphore::SelfTest()’: ../threads/synch.cc:138:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] Thread *helper = new Thread("ping"); ^ ../threads/synch.cc:141:35: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] ping = new Semaphore("ping", 0); ^ ../threads/synch.cc: In constructor ‘Lock::Lock(char*)’: ../threads/synch.cc:161:40: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] semaphore = new Semaphore("lock", 1); // initially, unlocked ^ ../threads/synch.cc: In member function ‘void Condition::Wait(Lock*)’: ../threads/synch.cc:250:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] waiter = new Semaphore("condition", 0); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../threads/thread.cc ../threads/thread.cc: In member function ‘void Thread::SelfTest()’: ../threads/thread.cc:430:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] Thread *t = new Thread("forked thread"); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../userprog/addrspace.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../userprog/exception.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../userprog/synchconsole.cc ../userprog/synchconsole.cc: In constructor ‘SynchConsoleInput::SynchConsoleInput(char*)’: ../userprog/synchconsole.cc:23:33: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] lock = new Lock("console in"); ^ ../userprog/synchconsole.cc:24:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] waitFor = new Semaphore("console in", 0); ^ ../userprog/synchconsole.cc: In constructor ‘SynchConsoleOutput::SynchConsoleOutput(char*)’: ../userprog/synchconsole.cc:79:34: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] lock = new Lock("console out"); ^ ../userprog/synchconsole.cc:80:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] waitFor = new Semaphore("console out", 0); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/directory.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/filehdr.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/filesys.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/pbitmap.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/openfile.cc g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../filesys/synchdisk.cc ../filesys/synchdisk.cc: In constructor ‘SynchDisk::SynchDisk()’: ../filesys/synchdisk.cc:30:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] semaphore = new Semaphore("synch disk", 0); ^ ../filesys/synchdisk.cc:31:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] lock = new Lock("synch disk lock"); ^ g++ -ftemplate-depth-100 -Wno-deprecated -g -Wall -fpermissive -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -DFILESYS_STUB -DRDATA -DSIM_FIX -DTUT -Dx86 -DLINUX -DCHANGED -m32 -c ../network/post.cc ../network/post.cc: In constructor ‘PostOfficeInput::PostOfficeInput(int)’: ../network/post.cc:155:60: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] messageAvailable = new Semaphore("message available", 0); ^ ../network/post.cc:162:43: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] Thread *t = new Thread("postal worker"); ^ ../network/post.cc: In constructor ‘PostOfficeOutput::PostOfficeOutput(double)’: ../network/post.cc:268:50: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] messageSent = new Semaphore("message sent", 0); ^ ../network/post.cc:269:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] sendLock = new Lock("message send lock"); ^ In file included from ../threads/synchlist.h:49:0, from ../network/post.h:34, from ../network/post.cc:20: ../threads/synchlist.cc: In instantiation ofSynchList<T>::SynchList() [with T = Mail*]’: ../network/post.cc:52:38: required from here ../threads/synchlist.cc:26:10: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] lock = new Lock("list lock"); ^ ../threads/synchlist.cc:27:15: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] listEmpty = new Condition("list empty cond"); ^ /lib/cpp -P -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -Dx86 -DLINUX ../threads/switch.s > swtch.s as -o switch.o swtch.s swtch.s: Assembler messages: swtch.s:7: 错误: invalid instruction suffix for `push' swtch.s:9: 错误: invalid instruction suffix for `push' swtch.s:10: 错误: operand type mismatch for `call' swtch.s:11: 错误: operand type mismatch for `call' swtch.s:12: 错误: operand type mismatch for `call' swtch.s:14: 错误: invalid instruction suffix for `pop' Makefile:342: recipe for target 'switch.o' failed make: *** [switch.o] Error 1
05-12
# Makefile for GeekOS kernel, userspace, and tools # Copyright (c) 2004,2005 David H. Hovemeyer <daveho@cs.umd.edu> # $Revision: 1.45 $ # This is free software. You are permitted to use, # redistribute, and modify it as specified in the file "COPYING". # Required software to build GeekOS: # - GNU Make (http://www.gnu.org/software/make) # - gcc 2.95.2 generating code for target (i386/ELF) and host platforms # - nasm (http://nasm.sourceforge.net) # - Perl5, AWK (any version), egrep # # Cygwin (http://cygwin.com) may be used to build GeekOS. # Make sure that gcc, binutils, nasm, and perl are installed. # NOTES: # - This makefile has been written carefully to work correctly # with the -j (parallel make) option. I regularly use "make -j 2" # to speed the build process on 2 processor systems. PROJECT_ROOT := .. VPATH := $(PROJECT_ROOT)/src # Figure out if we're compiling with cygwin, http://cygwin.com SYSTEM_NAME := $(shell uname -s) ifeq ($(findstring CYGWIN,$(SYSTEM_NAME)),CYGWIN) SYM_PFX := _ EXTRA_C_OPTS := -DNEED_UNDERSCORE -DGNU_WIN32 EXTRA_NASM_OPTS := -DNEED_UNDERSCORE NON_ELF_SYSTEM := yes EXTRA_CC_USER_OPTS := -Dmain=geekos_main endif # ---------------------------------------------------------------------- # Configuration - # Various options specifying how GeekOS should be built, # what source files to build, which user programs to build, # etc. This is generally the only section of the makefile # that will need to be modified. # ---------------------------------------------------------------------- # List of targets to build by default. # These targets encompass everything needed to boot # and run GeekOS. ALL_TARGETS := fd.img # Kernel source files KERNEL_C_SRCS := idt.c int.c trap.c irq.c io.c \ keyboard.c screen.c timer.c \ mem.c crc32.c \ gdt.c tss.c segment.c \ bget.c malloc.c \ synch.c kthread.c \ main.c # Kernel object files built from C source files KERNEL_C_OBJS := $(KERNEL_C_SRCS:%.c=geekos/%.o) # Kernel assembly files KERNEL_ASM_SRCS := lowlevel.asm # Kernel object files build from assembler source files KERNEL_ASM_OBJS := \ $(KERNEL_ASM_SRCS:%.asm=geekos/%.o) # All kernel object files KERNEL_OBJS := $(KERNEL_C_OBJS) \ $(KERNEL_ASM_OBJS) # Common library source files. # This library is linked into both the kernel and user programs. # It provides string functions and generic printf()-style # formatted output. COMMON_C_SRCS := fmtout.c string.c memmove.c # Common library object files. COMMON_C_OBJS := $(COMMON_C_SRCS:%.c=common/%.o) # Base address of kernel KERNEL_BASE_ADDR := 0x00010000 # Kernel entry point function KERNEL_ENTRY = $(SYM_PFX)Main # ---------------------------------------------------------------------- # Tools - # This section defines programs that are used to build GeekOS. # ---------------------------------------------------------------------- # Uncomment if cross compiling #TARGET_CC_PREFIX := i386-elf- # Target C compiler. gcc 2.95.2 or later should work. TARGET_CC := $(TARGET_CC_PREFIX)gcc # Host C compiler. This is used to compile programs to execute on # the host platform, not the target (x86) platform. On x86/ELF # systems, such as Linux and FreeBSD, it can generally be the same # as the target C compiler. HOST_CC := gcc # Target linker. GNU ld is probably to only one that will work. TARGET_LD := $(TARGET_CC_PREFIX)ld # Target archiver TARGET_AR := $(TARGET_CC_PREFIX)ar # Target ranlib TARGET_RANLIB := $(TARGET_CC_PREFIX)ranlib # Target nm TARGET_NM := $(TARGET_CC_PREFIX)nm # Target objcopy TARGET_OBJCOPY := $(TARGET_CC_PREFIX)objcopy # Nasm (http://nasm.sourceforge.net) NASM := nasm # Tool to build PFAT filesystem images. BUILDFAT := tools/builtFat.exe # Perl5 or later PERL := perl # Pad a file so its size is a multiple of some unit (i.e., sector size) PAD := $(PERL) $(PROJECT_ROOT)/scripts/pad # Create a file filled with zeroes. ZEROFILE := $(PERL) $(PROJECT_ROOT)/scripts/zerofile # Calculate size of file in sectors NUMSECS := $(PERL) $(PROJECT_ROOT)/scripts/numsecs # ---------------------------------------------------------------------- # Definitions - # Options passed to the tools. # ---------------------------------------------------------------------- # Flags used for all C source files GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) CC_GENERAL_OPTS := $(GENERAL_OPTS) -Werror # Flags used for kernel C source files CC_KERNEL_OPTS := -g -DGEEKOS -I$(PROJECT_ROOT)/include # Flags user for kernel assembly files NASM_KERNEL_OPTS := -I$(PROJECT_ROOT)/src/geekos/ -f elf $(EXTRA_NASM_OPTS) # Flags used for common library and libc source files CC_USER_OPTS := -I$(PROJECT_ROOT)/include -I$(PROJECT_ROOT)/include/libc \ $(EXTRA_CC_USER_OPTS) # Flags passed to objcopy program (strip unnecessary sections from kernel.exe) OBJCOPY_FLAGS := -R .dynamic -R .note -R .comment # ---------------------------------------------------------------------- # Rules - # Describes how to compile the source files. # ---------------------------------------------------------------------- # Compilation of kernel C source files geekos/%.o : geekos/%.c $(TARGET_CC) -c $(CC_GENERAL_OPTS) $(CC_KERNEL_OPTS) $< -o geekos/$*.o # Compilation of kernel assembly source files geekos/%.o : geekos/%.asm $(NASM) $(NASM_KERNEL_OPTS) $< -o geekos/$*.o geekos/%.o : geekos/%.S $(TARGET_CC) -c $(CC_GENERAL_OPTS) $(CC_KERNEL_OPTS) $< -o geekos/$*.o # Compilation of common library C source files common/%.o : common/%.c $(TARGET_CC) -c $(CC_GENERAL_OPTS) $(CC_USER_OPTS) $< -o common/$*.o # ---------------------------------------------------------------------- # Targets - # Specifies files to be built # ---------------------------------------------------------------------- # Default target - see definition of ALL_TARGETS in Configuration section all : $(ALL_TARGETS) # Standard floppy image - just boots the kernel fd.img : geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin cat geekos/fd_boot.bin geekos/setup.bin geekos/kernel.bin > $@ # Floppy boot sector (first stage boot loader). geekos/fd_boot.bin : geekos/setup.bin geekos/kernel.bin $(PROJECT_ROOT)/src/geekos/fd_boot.asm $(NASM) -f bin \ -I$(PROJECT_ROOT)/src/geekos/ \ -DNUM_SETUP_SECTORS=`$(NUMSECS) geekos/setup.bin` \ -DNUM_KERN_SECTORS=`$(NUMSECS) geekos/kernel.bin` \ $(PROJECT_ROOT)/src/geekos/fd_boot.asm \ -o $@ # Setup program (second stage boot loader). geekos/setup.bin : geekos/kernel.exe $(PROJECT_ROOT)/src/geekos/setup.asm $(NASM) -f bin \ -I$(PROJECT_ROOT)/src/geekos/ \ -DENTRY_POINT=0x`egrep 'Main$$' geekos/kernel.syms |awk '{print $$1}'` \ $(PROJECT_ROOT)/src/geekos/setup.asm \ -o $@ $(PAD) $@ 512 # Loadable (flat) kernel image. geekos/kernel.bin : geekos/kernel.exe $(TARGET_OBJCOPY) $(OBJCOPY_FLAGS) -S -O binary geekos/kernel.exe geekos/kernel.bin $(PAD) $@ 512 # The kernel executable and symbol map. geekos/kernel.exe : $(KERNEL_OBJS) $(COMMON_C_OBJS) $(TARGET_LD) -o geekos/kernel.exe -Ttext $(KERNEL_BASE_ADDR) -e $(KERNEL_ENTRY) \ $(KERNEL_OBJS) $(COMMON_C_OBJS) $(TARGET_NM) geekos/kernel.exe > geekos/kernel.syms # Clean build directories of generated files clean : for d in geekos common libc user tools; do \ (cd $$d && rm -f *); \ done # Build header file dependencies, so source files are recompiled when # header files they depend on are modified. depend : $(GENERATED_LIBC_SRCS) $(TARGET_CC) -M $(CC_GENERAL_OPTS) $(CC_KERNEL_OPTS) \ $(KERNEL_C_SRCS:%.c=$(PROJECT_ROOT)/src/geekos/%.c) \ | $(PERL) -n -e 's,^(\S),geekos/$$1,;print' \ > depend.mak $(TARGET_CC) -M $(CC_GENERAL_OPTS) $(CC_USER_OPTS) \ $(COMMON_C_SRCS:%.c=$(PROJECT_ROOT)/src/common/%.c) \ | $(PERL) -n -e 's,^(\S),common/$$1,;print' \ >> depend.mak # By default, there are no header file dependencies. depend.mak : touch $@ include depend.mak 在哪里修改
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值