From 2ae757f034445c74ca9a1e7c01e70fea2e9fc688 Mon Sep 17 00:00:00 2001 From: elliotthenne Date: Wed, 30 Jun 2021 14:14:02 -0700 Subject: [PATCH 1/3] debug files --- .vscode/launch.json | 29 +++++++++++++++++++++++++++++ .vscode/tasks.json | 27 +++++++++++++++++++++++++++ examples/gdb.sh | 1 + examples/go.sh | 2 +- 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 examples/gdb.sh diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..6fdc4b269 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // 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": "gcc-9 - Build and debug speed tester", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/examples/speed_tester/build/app/speed_tester", + "args": ["-l", "0", "-n", "3", "--proc-type=secondary", "--", "-r", "1", "--", "-d", "1", "-c", "16000"], + "stopAtEntry": false, + "cwd": "${fileDirname}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + //"preLaunchTask": "C/C++: gcc-9 build active file", + "miDebuggerPath": "${workspaceFolder}/examples/gdb.sh" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..af54f1753 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc-9 build active file", + "command": "/usr/bin/gcc-9", + "args": [ + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/examples/gdb.sh b/examples/gdb.sh new file mode 100644 index 000000000..1664fabeb --- /dev/null +++ b/examples/gdb.sh @@ -0,0 +1 @@ +pkexec /usr/bin/gdb "$@" diff --git a/examples/go.sh b/examples/go.sh index 8bcb99221..8c8fb6071 100755 --- a/examples/go.sh +++ b/examples/go.sh @@ -19,4 +19,4 @@ then exit 1 fi -../start_nf.sh $NF_DIR "$@" +bash -x ../start_nf.sh $NF_DIR "$@" From 85ecb0d118ff67c087f5b02a2ec65a650cec9bf7 Mon Sep 17 00:00:00 2001 From: elliotthenne Date: Wed, 30 Jun 2021 14:32:50 -0700 Subject: [PATCH 2/3] restored old go.sh file --- examples/go.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/go.sh b/examples/go.sh index 8c8fb6071..8bcb99221 100755 --- a/examples/go.sh +++ b/examples/go.sh @@ -19,4 +19,4 @@ then exit 1 fi -bash -x ../start_nf.sh $NF_DIR "$@" +../start_nf.sh $NF_DIR "$@" From 7d4bc26b7e7cf089bc50949117c6f8f59bc5550b Mon Sep 17 00:00:00 2001 From: elliotthenne <63778310+elliotthenne@users.noreply.github.com> Date: Tue, 6 Jul 2021 16:39:15 -0700 Subject: [PATCH 3/3] Update launch.json --- .vscode/launch.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6fdc4b269..1a354774b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "version": "0.2.0", "configurations": [ { - "name": "gcc-9 - Build and debug speed tester", + "name": "gcc-9 - Debug speed tester", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/examples/speed_tester/build/app/speed_tester", @@ -22,8 +22,7 @@ "ignoreFailures": true } ], - //"preLaunchTask": "C/C++: gcc-9 build active file", "miDebuggerPath": "${workspaceFolder}/examples/gdb.sh" } ] -} \ No newline at end of file +}