Last active
November 11, 2024 22:51
-
-
Save wtakuo/1f400072a50091fb354b5e4349410774 to your computer and use it in GitHub Desktop.
To debug xv6 from VScode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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 | |
} | |
] | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// 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