跳转至

Lab: Data Lab

Abstract

Info

Lab0 实验环境搭建

vscode 环境配置

参考链接

配置IntelliSense实现完美跳转

  1. 安装 bear

  2. 在xv6目录下执行make clean && bear -- make qemu ,将会生成一个 compile_commands.json

  3. 将 compile_commands.json 移动到 .vscode目录下

  4. 在.vscode目录下中为c_cpp_properties.json添加

运行用户程序

  1. 在vscode终端下的DEBUG CONSOLE下输入
# 这里的 _ls是需要调试的用户程序
-exec file ./user/_ls
"compileCommands": "${workspaceFolder}/.vscode/compile_commands.json"

调试指南

常见问题

  1. qemu-system-riscv64: -gdb tcp::26000: Failed to find an available port: Address already in use

解放方法:

1
2
3
lsof -i :26000

kill -9 <PID>

Chapter 3 Page tables