diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 4c5fd3e..d9c7c87 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,7 +4,9 @@ "name": "Linux", "includePath": [ "${workspaceFolder}/**", - "${workspaceFolder}/labcodes_answer/**/" + // "${workspaceFolder}/labcodes_answer/**/", + // 由于按顺序搜索,所以如果这样的话搜索到lab1_result中的同名头文件就不会引用到lab2_result中的同名头文件导致错误 + "${workspaceFolder}/labcodes_answer/lab2_result/kern/mm/" ], "defines": [], "compilerPath": "/usr/bin/gcc", diff --git a/.vscode/launch.json b/.vscode/launch.json index c50d81b..927fca1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "program": "bin/kernel", "args": [], "stopAtEntry": false, - "cwd": "${workspaceFolder}/labcodes_answer/lab1_result", + "cwd": "${workspaceFolder}/labcodes_answer/lab2_result", "environment": [], "externalConsole": false, "MIMode": "gdb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c69f21a..ffc8a37 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -9,7 +9,7 @@ "env": { "DISPLAY": ":0", }, - "cwd": "${workspaceFolder}/labcodes_answer/lab1_result" + "cwd": "${workspaceFolder}/labcodes_answer/lab2_result" }, "problemMatcher": [ diff --git a/labcodes_answer/lab2_result/Makefile b/labcodes_answer/lab2_result/Makefile index a06dbf3..69905f6 100644 --- a/labcodes_answer/lab2_result/Makefile +++ b/labcodes_answer/lab2_result/Makefile @@ -202,7 +202,7 @@ endif # files for grade script targets: $(TARGETS) - +all: $(TARGETS) .DEFAULT_GOAL := targets QEMUOPTS = -hda $(UCOREIMG) @@ -217,7 +217,8 @@ qemu-nox: targets $(V)$(QEMU) -serial mon:stdio $(QEMUOPTS) -nographic TERMINAL := gnome-terminal - +gdb: $(UCOREIMG) + $(V)$(QEMU) -S -s -parallel stdio -hda $< -serial null debug: $(UCOREIMG) $(V)$(QEMU) -S -s -parallel stdio $(QEMUOPTS) -serial null & $(V)sleep 2