From 232b85c9cf338ebe6239388580f44317294afc70 Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Tue, 23 Aug 2022 16:10:52 +0200 Subject: [PATCH] Move the debugging options from make to .vscode/ --- .vscode/launch.json | 23 +++++++++++++++++++++++ .vscode/tasks.json | 24 ++++++++++++++++++++++++ Makefile | 5 ----- 3 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3d8372a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2022 Andrea Pappacoda + * SPDX-License-Identifier: ISC + */ + +{ + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "expressions": "native", + "request": "launch", + "name": "Debug", + "preLaunchTask": "compile", + "program": "${workspaceFolder}/${workspaceFolderBasename}", + "args": ["example"], + "cwd": "${workspaceFolder}", + "env": { + "ASAN_OPTIONS": "detect_leaks=0" + } + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..813018c --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2022 Andrea Pappacoda + * SPDX-License-Identifier: ISC + */ + +{ + "version": "2.0.0", + "tasks": [ + { + "label": "compile", + "type": "process", + "command": "make", + "args": [ + "CC=cc", + "CFLAGS=-std=c89 -Wall -Wextra -Wpedantic -g3 -fsanitize=address -fno-omit-frame-pointer", + "LDFLAGS=-fsanitize=address" + ], + "presentation": { + "reveal": "silent", + "focus": false + } + } + ] +} diff --git a/Makefile b/Makefile index 2ba2090..0508a45 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,5 @@ .POSIX: -# Compilation stuff (mostly for development, I'll remove these later) -CC = cc -CFLAGS = -std=c89 -Wall -Wextra -Wpedantic -fsanitize=address -g -LDFLAGS = -fsanitize=address - # Paths PREFIX = /usr/local BINDIR = bin -- 2.45.2