First, I found the "GDB workaround" option. Which fixes the issue.
So for future reference the location of the options is: Settings -> Compiler --> Tab 'Other Settings' --> 'Advanced options'
The basic consoleApp with MinGW and GDB works fine out of the box.
After trying with a basic consoleApp I checked the commands sent to GDB:
Standard GDB with MinGW
break "C:/windowspathwithspaces/main.cpp:39"
[debug]Breakpoint 3 at 0x4014d5: file C:\windowspathwithspaces\main.cpp, line 39.
[debug]>>>>>>cb_gdb:
ARM Embedded GDB
[debug]> break "C:/windowspathwithspaces/main.cpp:62"
[debug]No source file named C:/windowspathwithspaces/main.cpp.
[debug]Breakpoint 6 ("c:/windowspathwithspaces/main.cpp:62") pending.
[debug]>>>>>>cb_gdb:
So from C::B point of view everything seems to be the same.
So the full paths option is standard on GNU GCC which is installed with C::B but not for GNU GCC for ARM? (Since these are the settings I used as a baseline for my GNU GCC for ARM Embedded compiler target)
Explains the confusion
For reference, I had the same problem with arm-none-eabi-gdb.
The solution was to specify the full path to the elf file in the "Additional GDB commands" in "project options -> Debugger":
monitor reset halt
file c:/data/xy/bin/Debug/xy.elf
load
Instead of specifying full path, below line works in the "Additional GDB commands" even there are spaces in the full path:
file ./Debug/bin/$(TARGET_OUTPUT_BASENAME).elf
Instead of specifying full path, below line works in the "Additional GDB commands" even there are spaces in the full path:
file ./Debug/bin/$(TARGET_OUTPUT_BASENAME).elf
Unfortunately, no. I just tried with the following debugger commands:
monitor halt
file ./Debug/bin/$(TARGET_OUTPUT_BASENAME).elf
load ./Debug/bin/$(TARGET_OUTPUT_BASENAME).elf
monitor sleep 100
continue
They still result in the "No such file or directory" error. Perhaps this has to do with my Windows machine?
Perhaps the GDB workaround option should be made more clear or easier to find?