Bug type: Debugger
Launching for an embedded target is not working as the setupCommands that are needed are being passed before gdb has actually started. setupCommands snippet below followed by the trace output. You'll see the gdb setupCommands emitted in the trace before the output from gdb itself and the show architecture request I believe comes from the extension that comes at the end of the trace.
I have repro code that can be shared but it is a bit of setup.
Bug type: Debugger Launching for an embedded target is not working as the setupCommands that are needed are being passed before gdb has actually started. setupCommands snippet below followed by the trace output. You'll see the gdb setupCommands emitted in the trace before the output from gdb itself and the show architecture request I believe comes from the extension that comes at the end of the trace.
I have repro code that can be shared but it is a bit of setup.
GDB Logs
``` 1: (98) LaunchOptions{"name":"Launch no tasks","type":"cppdbg","request":"launch","cwd":"C:\\source\\embedded\\examples\\blinky\\AZ3166","program":"C:\\source\\embedded\\examples\\blinky\\AZ3166/build/mxchip_blinky.elf","MIMode":"gdb","miDebuggerPath":"arm-none-eabi-gdb","miDebuggerServerAddress":"localhost:3333","debugServerPath":"openocd","debugServerArgs":"-f board/stm32f4discovery.cfg","serverStarted":"Listening on port 3333 for gdb connections","serverLaunchTimeout":10000,"filterStderr":true,"stopAtEntry":true,"externalConsole":false,"setupCommands":[{"text":"set target-async off"},{"text":"set pagination off"},{"text":"target extended-remote localhost:3333","ignoreFailures":false},{"text":"-file-exec-and-symbols C:/source/embedded/examples/blinky/AZ3166/build/mxchip_blinky.elf","ignoreFailures":false},{"text":"monitor reset halt","ignoreFailures":false},{"text":"monitor reset init","ignoreFailures":false},{"text":"-target-download","ignoreFailures":false},{"text":"load","ignoreFailures":false}],"launchCompleteCommand":"exec-continue","logging":{"moduleLoad":true,"trace":true,"engineLogging":true,"programOutput":true,"exceptions":true},"__configurationTarget":5,"__sessionId":"749aa19b-7f23-4fa5-826a-69ab2ab9a4f4"} 1: (167) Starting: "openocd" -f board/stm32f4discovery.cfg 1: (559) Starting: "C:\armgcc\10-2020-q4-major\bin\arm-none-eabi-gdb.exe" --interpreter=mi 1: (563) DebuggerPid=9104 1: (619) ->=thread-group-added,id="i1" 1: (619) ->~"GNU gdb (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.1.90.20201028-git\n" 1: (619) ->~"Copyright (C) 2020 Free Software Foundation, Inc.\n" 1: (619) ->~"License GPLv3+: GNU GPL version 3 or later