GDB debugging is complicated, sometimes you don't have a good enough computer to run everything within the virtual machine (all sorts of IDE, webpages, Ghidra...). You want to do boot up your Linux VM in headless mode, no GUI, and SSH/remote everything. But there is a problem: you need a GNU/Linux gdb, not the ones that has MinGW as ABI build targets...
Even ChatGPT or Gemini failed to notice me, even if I explicitly stated what I wanted. The trick is simple, and if you are familiar with MinGW and GDB stuff you should already know: in MSYS2, there is a package called gdb-multiarch, install it with this command:
pacman -S mingw-w64-x86_64-gdb-multiarch
# Then, inside MinGW terminal
gdb-multiarch --config