Code: Select all
{
"label": "remote gdbserver",
"type":"shell",
"command": "sshpass",
"options": {"cwd": "${workspaceFolder}"},
"args": [
"-p",
"luckfox",
"ssh",
"root@cyclops",
"cd /root && LD_LIBRARY_PATH=/oem/usr/lib:/oem/lib gdbserver :1234 ./cyc"
],
"problemMatcher": [
"$tsc"
],
"presentation": {
"reveal": "always"
},
"group": "test"
}
Code: Select all
{
"name": "(gdb) Start",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/debug/cyc",
"stopAtEntry": false,
"miDebuggerServerAddress": "172.32.0.93:1234", // Target board's IP address and port
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"logging": {"engineLogging": true},
"miDebuggerPath": "arm-rockchip830-linux-uclibcgnueabihf-gdb", // gdb for target
"setupCommands": [
{
"description": "Enable pretty printing for GDB",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set disassembly flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
},
{
"description": "Path for standard libraries",
"text": "set sysroot target:/", // at target board
"ignoreFailures": false
},
{
"description": "Ignore SIGUSR1", // for IPC debugging
"text": "handle SIGUSR1 nostop noprint pass",
"ignoreFailures": false
}
],
}