I have a problem to compile MAME as debug build (release build is totally fine). The compiling itself actually works, but I get an .exe file that is over 2.5 GB large and cannot be opened.

I compile with the official MAME Build Tools from GitHub and using the following command line.

Code
set MINGW64=C:\Projects\MAME\buildtools\vendor\mingw64
set PATH=%MINGW64%\bin;%MINGW64%\opt\bin;%MINGW64%\Qt\bin;%PATH%

gcc -v

make DEBUG=1 SYMBOLS=1

I also tried to compile a debug build with Visual Studio and got a similar result. Furthermore no .pdb file is generated.

Code
set VSENV="C:\Programme (x86)\Microsoft Visual Studio 12.0\VC"

call %VSENV%\vcvarsall.bat amd64
call %VSENV%\dx_setenv.cmd amd64

make MSVC_BUILD=1 DEBUG=1 SYMBOLS=1

The last version of MAME I could compile as debug build with .pdb file was 0.159, where the .exe file was around 180 MB and the .pdb filearound 400 MB, which could be debugged perfectly well with Visual Studio.

Anyway, the .pdb file would be really nice to have, but the oversized .exe file is completely useless.

I hope someone can give me an advice how to fix this.