summaryrefslogtreecommitdiff
path: root/.vscode
diff options
context:
space:
mode:
authorzy <[email protected]>2023-11-27 03:18:51 -0500
committerzy <[email protected]>2023-11-27 03:18:51 -0500
commita56fa77dc824132c8df064c3398414ffaa0eedc6 (patch)
treeb5daaf3e20c3883e3d31dcf8e068b22a40305a88 /.vscode
parent308734c364ee4d1bd33f122429837b9d174038d7 (diff)
debug ucli
Diffstat (limited to '.vscode')
-rw-r--r--.vscode/launch.json26
-rw-r--r--.vscode/settings.json53
-rw-r--r--.vscode/tasks.json67
3 files changed, 144 insertions, 2 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 54cbfab..841649c 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,6 +5,32 @@
"version": "0.2.0",
"configurations": [
{
+ "name": "(gdb) ucli",
+ "type": "cppdbg",
+ "request": "launch",
+ "program": "${workspaceFolder}/source/ucli/ucli",
+ "args": [],
+ "stopAtEntry": false,
+ "cwd": "${fileDirname}",
+ "environment": [],
+ "externalConsole": false,
+ "MIMode": "gdb",
+ "preLaunchTask": "make ucli",
+ "postDebugTask": "make clean ucli",
+ "setupCommands": [
+ {
+ "description": "为 gdb 启用整齐打印",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ },
+ {
+ "description": "将反汇编风格设置为 Intel",
+ "text": "-gdb-set disassembly-flavor intel",
+ "ignoreFailures": true
+ }
+ ]
+ },
+ {
"name": "(gdb) linux kernel",
"type": "cppdbg",
"request": "launch",
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 78dd7ab..5f0c273 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -11,7 +11,57 @@
"mm.h": "c",
"fs.h": "c",
"sched.h": "c",
- "monitor_user.h": "c"
+ "monitor_user.h": "c",
+ "libunwind.h": "c",
+ "libunwind-x86_64.h": "c",
+ "libdwfl.h": "c",
+ "libunwind-ptrace.h": "c",
+ "unwind.h": "c",
+ "*.tcc": "cpp",
+ "fstream": "cpp",
+ "array": "cpp",
+ "deque": "cpp",
+ "string": "cpp",
+ "unordered_map": "cpp",
+ "vector": "cpp",
+ "string_view": "cpp",
+ "initializer_list": "cpp",
+ "atomic": "cpp",
+ "cctype": "cpp",
+ "clocale": "cpp",
+ "cmath": "cpp",
+ "cstdarg": "cpp",
+ "cstddef": "cpp",
+ "cstdint": "cpp",
+ "cstdio": "cpp",
+ "cstdlib": "cpp",
+ "cwchar": "cpp",
+ "cwctype": "cpp",
+ "exception": "cpp",
+ "algorithm": "cpp",
+ "functional": "cpp",
+ "iterator": "cpp",
+ "map": "cpp",
+ "memory": "cpp",
+ "memory_resource": "cpp",
+ "numeric": "cpp",
+ "optional": "cpp",
+ "random": "cpp",
+ "set": "cpp",
+ "system_error": "cpp",
+ "tuple": "cpp",
+ "type_traits": "cpp",
+ "utility": "cpp",
+ "iosfwd": "cpp",
+ "istream": "cpp",
+ "limits": "cpp",
+ "new": "cpp",
+ "ostream": "cpp",
+ "sstream": "cpp",
+ "stdexcept": "cpp",
+ "streambuf": "cpp",
+ "cinttypes": "cpp",
+ "kprobes.h": "c"
},
"clangd.arguments": [
"--compile-commands-dir=${workspaceFolder}/linux-5.17.15",
@@ -20,6 +70,7 @@
"--header-insertion=never",
"-log=info"
],
+ "C_Cpp.clang_format_fallbackStyle": "LLVM",
// "C_Cpp.autocomplete": "disabled",
// "C_Cpp.codeFolding": "disabled",
// "C_Cpp.configurationWarnings": "disabled",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index d33a6a8..c038bb8 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -27,7 +27,72 @@
}
}
]
- }
+ },
+ // 编译 ucli
+ {
+ "label": "make ucli",
+ "type": "shell",
+ "command": "make",
+ "args": [
+ "-C",
+ "${workspaceFolder}/source/ucli"
+ ],
+ "presentation": {
+ "echo": true,
+ "clear": true,
+ "group": "build"
+ },
+ "problemMatcher": [
+ {
+ "pattern": [
+ {
+ "regexp": ".",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }
+ ],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": ".",
+ "endsPattern": ".",
+ }
+ }
+ ],
+ },
+ // clean ucli
+ {
+ "label": "make clean ucli",
+ "type": "shell",
+ "command": "make",
+ "args": [
+ "clean",
+ "-C",
+ "${workspaceFolder}/source/ucli"
+ ],
+ "presentation": {
+ "echo": true,
+ "clear": true,
+ "group": "build"
+ },
+ "problemMatcher": [
+ {
+ "pattern": [
+ {
+ "regexp": ".",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }
+ ],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": ".",
+ "endsPattern": ".",
+ }
+ }
+ ],
+ },
],
"version": "2.0.0"
} \ No newline at end of file