Im using vscode with the cortex-debug/jlink extension to debug my cortex m target.
I need the capability to issue GDB commands during launch (attach to debug and start session).
In this specific case, i wanna issue the command "directory C:...\BUILD" to GDB to replace absolute paths within the output file (*.elf).
However i have no clue how i can issue GDB commands in the VSCode launch.json file.
Example:
{
// extension: cortex debug
"version": "0.2.0",
"configurations": [
{
"type": "cortex-debug",
"request": "launch",
"name": "Debug J-Link",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/BUILD/output.elf",
"serverpath": "/usr/bin/JLinkGDBServerExe",
"servertype": "jlink",
"device": "...",
"interface": "swd",
"serialNumber": "",
"jlinkscript": "",
"runToMain": true,
"svdFile": ""
},
...
How can i add GDB commands to this?