User forums > Using Code::Blocks

unrecognised emulation mode: windows error

<< < (3/4) > >>

spflanze:
I removed the spaces in the paths. But the error message remained the same.

Build log:
--- Code: ----------------- Clean: Debug in Test_Project_posix (compiler: GNU GCC Compiler)---------------

Cleaned "Test_Project_posix - Debug"

-------------- Build: Debug in Test_Project_posix (compiler: GNU GCC Compiler)---------------

g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\wx_pch.h -o wx_pch.h.gch\Debug_wx_pch_h_gch
windres.exe -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu  -J rc -O coff -i C:\ENGINE~1\TEST_P~2\resource.rc -o obj\Debug\resource.res
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\Test_Project_posixApp.cpp -o obj\Debug\Test_Project_posixApp.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall -g -g -IC:\wxWidgets-3.1.2-posix\include -IC:\wxWidgets-3.1.2-posix\lib\gcc_dll\mswu -c C:\Engineering_Software\Test_Project_posix\Test_Project_posixMain.cpp -o obj\Debug\Test_Project_posixMain.o
x86_64-w64-mingw32-g++.exe -LC:\wxWidgets-3.1.2-posix\lib\gcc_dll -o bin\Debug\Test_Project_posix.exe  obj\Debug\Test_Project_posixApp.o obj\Debug\Test_Project_posixMain.o obj\Debug\resource.res -mthreads  -lwxmsw31u -mwindows
Output file is bin\Debug\Test_Project_posix.exe with size 929.42 KB
Process terminated with status 0 (0 minute(s), 10 second(s))
0 error(s), 0 warning(s) (0 minute(s), 10 second(s))
--- End code ---

Debug log:

--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Engineering_Software\Test_Project_posix\
Adding source dir: C:\Engineering_Software\Test_Project_posix\
Adding file: C:\Engineering_Software\Test_Project_posix\bin\Debug\Test_Project_posix.exe
Changing directory to: C:/Engineering_Software/Test_Project_posix/.
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\Dr. Memory\bin
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix/bin/Debug/Test_Project_posix.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No symbol table loaded.  Use the "file" command.
Debugger finished with status 0

--- End code ---

BlueHazzard:
There are some points you have to look out:
1) Are you using the correct debugger?
the debugger has to be "the same" as the compiler.
Check your debugger executable in Settings->Debugger->Default->Executable path
This should be the executable found in your compiler directory

2) Does your executable has debugging symbols:
Are you compiling with the -g flag?
You can use the debug target of your project for this

3) Do you use a compiler and debugger that have the same debugging symbols format? See 1) for a fix

4) Does your project uses the right debugger?
If you have multiple debugger configurations you have to select the right debugger:
Debug->Active debuggers->Targets default (with this option the debugger configuration of the compiler of this target is used see below) or select the propriate configuration, but then keep in mind that you have to keep the configuration in sync with your projects

How to select the default compiler of a target?
The default compiler configuration of the target is set by the default configuration of the compiler of this target. You can set the default configuration of this compiler here:
Settings->Compiler->Select the compiler from the drop down at the top->toolchain executables->Debugger

Also please enable full debugger log in
Settings->Debugger->Common->Full (debug) Log
and post a new log here if it still does not work

Hope something helps...

spflanze:
1) Settings->Debugger->Default->Executable path was:
C:\MinGW\bin\gdb.exe
This was not the same directory as the compiler. I made it the same.

2) The -g flag is in effect. This can be seen in the build log. It is actually in the compiler command line twice.

3) This is fixed now.

4) There is only one debugger in "Settings => Debugger", and it is the default one. The default debugger that is selected in "Settings => Compiler => Toolchain executables" is "GDB/CDB debugger : Default". This is the only choice there.

After the above fix (question 1) the error changed. When I attempt to step through the program I now get a error dialog opening with the message:

--- Quote ---gdborig.exe has stopped working

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

--- End quote ---

The checkbox at "Settings->Debugger->Common->Full (debug) Log" is now checked. The log in the Debugger tab:


--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Engineering_Software\Test_Project_posix_WXDEBG_\
Adding source dir: C:\Engineering_Software\Test_Project_posix_WXDEBG_\
Adding file: C:\Engineering_Software\Test_Project_posix_WXDEBG_\bin\Debug\Test_Project_posix_WXDEBG_.exe
Changing directory to: C:/Engineering_Software/Test_Project_posix_WXDEBG_/.
Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files (x86)\Dr. Memory\bin

[debug]Command-line: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe
[debug]Working dir : C:\Engineering_Software\Test_Project_posix_WXDEBG_

Starting debugger: C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe -nx -fullname -quiet  -args C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe
done

[debug]Reading symbols from C:/Engineering_Software/Test_Project_posix_WXDEBG_/bin/Debug/Test_Project_posix_WXDEBG_.exe...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 8.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Engineering_Software/Test_Project_posix_WXDEBG_/
[debug]Source directories searched: C:/Engineering_Software/Test_Project_posix_WXDEBG_;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> start
[debug]Temporary breakpoint 2 at 0x4068d9
[debug]Starting program: C:\Engineering_Software\Test_Project_posix_WXDEBG_\bin\Debug\Test_Project_posix_WXDEBG_.exe

Child process PID: 10296

[debug][New Thread 10296.0x2bd0]
[debug]Temporary breakpoint 2, 0x00000000004068d9 in main ()
[debug]>>>>>>cb_gdb:
[debug]> info frame

Debugger finished with status 1

--- End code ---

In "Settings => Compiler => Toolchain executables" I made these changes:

C Compiler:
From: gcc.exe
To: x86_64-w64-mingw32-gcc.exe

C++ Compiler:
From: g++
To: x86_64-w64-mingw32-g++.exe

After the above changes I got the same result. The Same error dialog opened with message that "gdborig.exe has stopped working".

Your help on this is much appreciated. :)

stahta01:
What is the path to your compiler?


--- Quote ---Set variable: PATH=.;C:\wxWidgets-3.1.2-posix\lib\gcc_dll;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64;C:\Program Files (x86)\CodeBlocks\MinGW\bin;

--- End quote ---

Remove the path that is not to your compiler!

Edit: If I was you, I would uninstall or delete all MinGW GCC except for the one you are trying to get to work. But, I have no idea if this will help with debugging.

Tim S.

spflanze:
The path "C:\Program Files (x86)\CodeBlocks\MinGW\bin;" was not valid. That version of Code::Blocks had been removed, and so this left over path was a path to nowhere.  I did nevertheless remove it, did a clean recompile, and attempted to step through the program again. I got the same "gdborig.exe stopped working" error.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version