User forums > Help

Debugger

<< < (2/2)

ollydbg:

--- Quote from: Hans-Linux on February 03, 2012, 03:18:07 pm ---Problem solved:

Code::Blocks for Windows source files must have a CR/LF line ending.

Settings -> Editor -> End of line options -> tick 'Ensure consistent EOL's' and set 'End-of-line mode' to CR/LF.

When using source files from a Linux or Mac project with CR or LF line ending, modify each source file before re-compiling.

Hans

--- End quote ---
That's not true, I test your code in either CR LF(Windows style) or LF(Linux style), and both cases the debugger works fine. (winXp, MinGW4.6.x, mingw_gdb cvs version)

Hans-Linux:
The problem may be caused because of my setup.

I use Code::Blocks on 32 and 64 bit Open Suse 11.3,  and Windows 7 and Windows 2000 on Oracle virtual machines.  The source files are created and stored on the Linux 64 bit system in a shared directory with UTF-8 encoding and LF line ending.

The windows systems use Windows-1252 encoding and CR/LF line ending. The files are not converted from UTF-8 and LF to Windows-1252 and CR/LF when loaded. They are converted when modified and saved.

I have not noticed any problem on the Linux systems after source files have been modified and converted on the Windows systems to Windows-1252 and CR/LF.

I previously used MS Visual Studio 10 without this problem. They bring up a window asking whether the files should be converted. Maybe Code::Blocks can in the future implement something like this.

Hans

Navigation

[0] Message Index

[*] Previous page

Go to full version