Author Topic: Debugger and Windows 7  (Read 10533 times)

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Debugger and Windows 7
« on: January 17, 2011, 05:26:26 pm »
I just installed codeblocks-10.05mingw-setup.exe. on Windows 7.

Everything works just fine except the Debugger, it won’t stop at the cursor or the breakpoints.

Hope someone can help as the product is really promising!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #2 on: January 17, 2011, 08:24:07 pm »
Thanks oBFusCATed for a quick reply.

I had already marked -g and -wall but it still does not work.

I tried to install CB on Vista and it works just fine on that platform.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Debugger and Windows 7
« Reply #3 on: January 17, 2011, 08:33:53 pm »
which MinGW do you use ?

You could try an up to date set from here : http://tdm-gcc.tdragon.net/

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #4 on: January 17, 2011, 09:30:59 pm »
I have now the most new version MinGW

 === TDM-GCC Compiler Suite for Windows ===
---         GCC 4.4/4.5 Series         ---
***   Standard MinGW 32-bit Edition    ***

And the debugger does not stop, neither on breakpoints or cursor.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Debugger and Windows 7
« Reply #5 on: January 18, 2011, 01:39:38 am »
And the debugger does not stop, neither on breakpoints or cursor.
what does this sentence means?
how did you do this? please give step by step more details.
Mostly, you have some wrong code/setting.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger and Windows 7
« Reply #6 on: January 18, 2011, 06:37:12 am »
And the debugger does not stop, neither on breakpoints or cursor.
I had already marked -g and -wall but it still does not work.
This all does not help if you have optimisation flags and/or stripped flags (-s) in addition. Please enable full compiler logging (see my sig) and post the full log here.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #7 on: January 18, 2011, 10:18:30 am »
Below, please find enclosed the debugger log file.
The following is suspicious -> No source file named C:/Users/Agnar Már/Documents/C++/enneinprufan/main.cpp in loaded symbols.
The file does exist and the path is correct. Perhaps this is a character encoding bug as:

C:\Users\Agnar Már\Documents\C++\enneinprufan\ != C:/Users/Agnar Már/Documents/C++/enneinprufan/main.cpp

==============================

PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\Common Files\ArcSoft\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Pinnacle\Shared Files\;C:\Program Files\Pinnacle\Shared Files\Filter\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Windows Live\Shared;C:\Min2GW32\bin
Command-line: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname  -quiet -args bin/Debug/enneinprufan.exe
Working dir : C:\Users\Agnar Már\Documents\C++\enneinprufan\
> set prompt >>>>>>cb_gdb:
(gdb)
>>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source C:\Program Files\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory C:/Users/AGNARM~1/DOCUME~1/C__~1/ENNEIN~1/
>>>>>>cb_gdb:
> tbreak "C:/Users/Agnar Már/Documents/C++/enneinprufan/main.cpp:8"
No source file named C:/Users/Agnar Már/Documents/C++/enneinprufan/main.cpp in loaded symbols.
Breakpoint 2 ("C:/Users/Agnar Már/Documents/C++/enneinprufan/main.cpp:8) pending.
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
[New thread 5280.0x14a4]
Program exited normally.
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> quit

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #8 on: January 18, 2011, 10:27:02 am »
I changed the working directory and everything works just fine. This is a character encoding bug.

I'll report it.

Many thanks for your help!!!!! :lol:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger and Windows 7
« Reply #9 on: January 18, 2011, 10:51:27 am »
I'll report it.
Where do you report to? It seems an issue with GDB in the end.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #10 on: January 18, 2011, 11:03:28 am »
It's just that I read the instructions for the forum :lol:

============

rickg22
Lives here!
****

REPORT YOUR BUGS HERE
« on: November 21, 2005, 08:28:46 pm »
   
Just click on this link:

http://developer.berlios.de/bugs/?func=addbug&group_id=5358


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger and Windows 7
« Reply #11 on: January 18, 2011, 01:17:32 pm »
Hm, this one is documented http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks#Path_with_spaces but you've not read it!

I'm not sure if it is possible to fix this problem... so please don't use spaces/special chars...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugger and Windows 7
« Reply #12 on: January 18, 2011, 03:53:06 pm »
REPORT YOUR BUGS HERE
« on: November 21, 2005, 08:28:46 pm »
[...]
http://developer.berlios.de/bugs/?func=addbug&group_id=5358
As a reminder: Of course, this is valid only for Code::Blocks related bugs, not bugs in the compiler / debugger.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Agnar

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger and Windows 7
« Reply #13 on: January 23, 2011, 01:16:04 am »
If it‘s not possible to solve this issue in GDB, It would help if CodeBlock came up with a warning if one tries to save project with none 7bit ASCII characters or/and space in the path name.

And oBFusCATed, i did read your post but I only focused on the settings ... would have saved me lot of time if I would have read it trough properly;-)

Finally, thanks guys for helping me I really appreciate it!!