资料来源:
1.南京大学操作系统课程第18课:https://www.bilibili.com/medialist/play/202224425?from=space&business=space_collection&business_id=192498&desc=0 下方的评论: https://zhuanlan.zhihu.com/p/501901665 https://www.bilibili.com/video/BV1Lv411g7EV/?spm_id_from=333.824.b_636f6d6d656e74.32
{ "version": "0.2.0", "configurations": [ { "name": "debug xv6", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/kernel/kernel", "args": [], "stopAtEntry": true, "cwd": "${workspaceFolder}", "miDebuggerServerAddress": "localhost:25000", "miDebuggerPath": "/usr/bin/gdb-multiarch", "environment": [], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "pretty printing", "text": "-enable-pretty-printing", "ignoreFailures": true } ], "logging": { "engineLogging": true, "programOutput": true, }, "preLaunchTask": "xv6build", } ] }
// xv6-riscv/.vscode/tasks.json { "version": "2.0.0", "tasks": [ { "label": "xv6build", "type": "shell", "isBackground": true, "command": "make qemu-gdb", "problemMatcher": [ { "pattern": [ { "regexp": ".", "file": 1, "location": 2, "message": 3 } ], "background": { "beginsPattern": ".*Now run 'gdb' in another window.", // 要对应编译成功后,一句echo的内容. 此处对应 Makefile Line:170 "endsPattern": "." } } ] } ] }