diff options
| author | zy <[email protected]> | 2023-11-29 16:02:23 +0800 |
|---|---|---|
| committer | zy <[email protected]> | 2023-11-29 16:02:23 +0800 |
| commit | 13ba531c1a7696b6bad72720e5d6bd055cb170b0 (patch) | |
| tree | fa4c97023718915554d4f9d427d98a26f772e088 /.vscode | |
| parent | 809f581cefe9c9daad8b38cf1fd322583c617b17 (diff) | |
debug kernel
Diffstat (limited to '.vscode')
| -rw-r--r-- | .vscode/c_cpp_properties.json | 9 | ||||
| -rw-r--r-- | .vscode/launch.json | 14 | ||||
| -rw-r--r-- | .vscode/settings.json | 78 | ||||
| -rw-r--r-- | .vscode/tasks.json | 28 |
4 files changed, 45 insertions, 84 deletions
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index d294f8b..daf8467 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,12 +4,12 @@ "name": "Linux", "includePath": [ "${workspaceFolder}/**", - "../linux-5.17.15/include/**", - "../linux-5.17.15/arch/x86/include/**", - "../linux-5.17.15/arch/x86/include/generated/**" + "${workspaceFolder}/linux-5.17.15/include/**", + "${workspaceFolder}/linux-5.17.15/arch/x86/include/**", + "${workspaceFolder}/linux-5.17.15/arch/x86/include/generated/**" ], "forcedInclude": [ - "../linux-5.17.15/include/generated/autoconf.h" + "${workspaceFolder}/linux-5.17.15/include/generated/autoconf.h" ], "defines": [ "__GNUC__", @@ -18,6 +18,7 @@ "__x86_64__", "_GNU_SOURCE" ], + "compileCommands": "${workspaceFolder}/linux-5.17.15/compile_commands.json", "compilerPath": "/usr/bin/gcc", "cStandard": "c89", "compilerArgs": [], diff --git a/.vscode/launch.json b/.vscode/launch.json index 841649c..13b5879 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -31,25 +31,21 @@ ] }, { - "name": "(gdb) linux kernel", + "name": "(gdb) linux Kernel", "type": "cppdbg", "request": "launch", - //"preLaunchTask": "centos7", - // socat pty,link=./rootkit.pty,raw,echo=0 EXEC:"/mnt/c/ProgramData/chocolatey/lib/npiperelay/tools/npiperelay.exe -ep -s //./pipe/rootkit",nofork + "preLaunchTask": "run_qemu", "program": "${workspaceFolder}/linux-5.17.15/vmlinux", - //"miDebuggerServerAddress": "localhost:1234", - //"debugServerPath": "${workspaceFolder}/rootkit.pty", - "miDebuggerPath": "/usr/bin/gdb", - "miDebuggerArgs": "-ex 'set serial baud 115200 target remote ./rootkit.pty'", + "miDebuggerServerAddress": "127.0.0.1:1234", "args": [], "stopAtEntry": true, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", - //"miDebuggerArgs": "-n", + "miDebuggerArgs": "-n", "targetArchitecture": "x64", - "setupCommands": [ // 或许在这里添加的 set serial baud 115200 | target remote ./rootkit.pty + "setupCommands": [ { "text": "set arch i386:x86-64:intel", "ignoreFailures": false diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f0c273..2fd95e4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,75 +1,11 @@ { - "files.associations": { - "hrtimer.h": "c", - "ktime.h": "c", - "typeinfo": "c", - "signal.h": "c", - "module.h": "c", - "watch_module.h": "c", - "kernel.h": "c", - "device.h": "c", - "mm.h": "c", - "fs.h": "c", - "sched.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", - "--background-index", - "--completion-style=detailed", - "--header-insertion=never", - "-log=info" - ], + // "clangd.arguments": [ + // "--compile-commands-dir=${workspaceFolder}/linux-5.17.15", + // "--background-index", + // "--completion-style=detailed", + // "--header-insertion=never", + // "-log=info" + // ], "C_Cpp.clang_format_fallbackStyle": "LLVM", // "C_Cpp.autocomplete": "disabled", // "C_Cpp.codeFolding": "disabled", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c038bb8..99bf698 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -93,6 +93,34 @@ } ], }, + { + "label": "run_qemu", + "type": "shell", + "command": "./run_qemu.sh", + "presentation": { + "echo": true, + "clear": true, + "group": "vm" + }, + "isBackground": true, + "problemMatcher": [ + { + "pattern": [ + { + "regexp": ".", + "file": 1, + "location": 2, + "message": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": ".", + "endsPattern": ".", + } + } + ] + }, ], "version": "2.0.0" }
\ No newline at end of file |
