From 98c1b462e33c5c074f8610a56d1b4ef93e7d5b84 Mon Sep 17 00:00:00 2001 From: TheClonerx Date: Thu, 9 Jan 2020 21:27:54 -0300 Subject: [PATCH] Added vscode build task and gdb debugging --- .vscode/launch.json | 40 ++++++++++++++++++++++++++-------------- .vscode/tasks.json | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json index dc2434c..671fdcb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,15 +1,27 @@ { - "version": "0.2.0", - "configurations": [ - { - "type": "gdb", - "request": "attach", - "name": "Attach to gdbserver", - "executable": "./build/os.bin", - "target": ":1234", - "remote": true, - "cwd": "${workspaceRoot}", - "valuesFormatting": "parseText" - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + "name": "(gdb) Launch", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/isodir/boot/os.bin", + "args": [ + "--command=debug.dbg" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "setup_disk" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..8e4b228 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,35 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "make", + "args": [ + "build" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always" + }, + "problemMatcher": [ + "$gcc" + ] + }, + { + "label": "setup_disk", + "type": "shell", + "command": "make", + "args": [ + "setup_disk" + ], + "dependsOn": "build", + "presentation": { + "reveal": "always", + } + } + ] +}