Skip to content

Instantly share code, notes, and snippets.

@wtakuo
Last active November 11, 2024 22:51
Show Gist options
  • Save wtakuo/1f400072a50091fb354b5e4349410774 to your computer and use it in GitHub Desktop.
Save wtakuo/1f400072a50091fb354b5e4349410774 to your computer and use it in GitHub Desktop.
To debug xv6 from VScode
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/kernel/kernel",
"cwd": "${workspaceFolder}",
"miDebuggerPath": "/opt/homebrew/bin/riscv64-elf-gdb",
"miDebuggerServerAddress": "127.0.0.1:25501",
"MIMode": "gdb",
"stopAtEntry": true,
"preLaunchTask": "fix_gdbinit",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "fix_gdbinit",
"type": "shell",
"command": "sed -i '' -e '/^target remote/d' ${workspaceFolder}/.gdbinit"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment