Author Topic: issue with the debugger  (Read 7598 times)

Offline CodeLemming

  • Single posting newcomer
  • *
  • Posts: 5
issue with the debugger
« on: July 05, 2014, 07:17:49 pm »
Hello all!

I'm relatively new to code::blocks and C++ programming and I'm running into a problem with the debugger; it doesn't seem to work. Now, it might be working, but I'm not entirely sure seeing as what happens when I run the debug doesn't match up with what I see in youtube vids tutorialing the code::blocks debugger. Everything seems to compile correctly, but the debugger ignores breakpoints and no windows of any kind pop up. I've gone through most of the threads here that have anything to do with debugger problems and none of them help me.

I'm working with Windows 8 , code::blocks 13.12 , [-g] is checked (on) , [-s] is unchecked (off) , MinGW GDB version is 7.5 , the full debug log is on and I will include it if someone can tell me how to use the 'code' er.. tagline?  Saw it mentioned in one of the posts, but I lost it in my despair of fruitless searching.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7594
    • My Best Post
Re: issue with the debugger
« Reply #1 on: July 05, 2014, 07:29:34 pm »
The # sign above creates [ code ] and [ /code ] markers without any space in them.

That is how to do code sections like the debugger log.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline CodeLemming

  • Single posting newcomer
  • *
  • Posts: 5
Re: issue with the debugger
« Reply #2 on: July 05, 2014, 08:46:59 pm »
Thank you stahta01.

so here's the debugger log then.
Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\CPP_Programs\projects\general_game_setup\
Adding source dir: C:\CPP_Programs\projects\general_game_setup\
Adding file: C:\CPP_Programs\projects\general_game_setup\bin\Debug\general game setup.exe
Changing directory to: C:/CPP_Programs/projects/general_game_setup/.

[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/CPP_PR~1/projects/GENERA~1/bin/Debug/GENERA~2.EXE
[debug]Working dir : C:\CPP_Programs\projects\general_game_setup

Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/CPP_PR~1/projects/GENERA~1/bin/Debug/GENERA~2.EXE
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from C:\CPP_PR~1\projects\GENERA~1\bin\Debug\GENERA~2.EXE...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5
[debug]Copyright (C) 2012 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 "i686-pc-mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 7.5

[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 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/CPP_Programs/projects/general_game_setup/
[debug]Source directories searched: C:/CPP_Programs/projects/general_game_setup;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\CPP_PR~1\projects\GENERA~1\bin\Debug\GENERA~2.EXE
[debug]Error creating process C:\CPP_PR~1\projects\GENERA~1\bin\Debug\GENERA~2.EXE, (error 740).
[debug]>>>>>>cb_gdb:

Error creating process C:\CPP_PR~1\projects\GENERA~1\bin\Debug\GENERA~2.EXE, (error 740).

[debug]> quit

Debugger finished with status 0

any suggestions?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: issue with the debugger
« Reply #3 on: July 05, 2014, 09:51:53 pm »
GDB failed to start your program.
Do you happen to use an antivirus software?
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: issue with the debugger
« Reply #4 on: July 05, 2014, 10:54:16 pm »
Normally "error 740" means the process you try to run needs admin rights.

It might work from a folder below your user-directory or if you start C::B as administrator or if you turn UAC off (if it still exists in win8).

Offline CodeLemming

  • Single posting newcomer
  • *
  • Posts: 5
Re: issue with the debugger
« Reply #5 on: July 05, 2014, 11:54:37 pm »
running code::blocks as admin seems to have at least brought up a window, but it tells me that SDL2.dll is missing (when I know it's there) and won't launch. I'll quickly build up a non-SDL lib temp project and report back.

edit: okay, from my very simple project everything seems to be working well! now I just have to make sure all the SDL stuff is linked up correctly for my actual project.
Thanks all for your help!

edit2: just managed to force my computer to accept the existence of that SDL2.dll and the debugger works just fine!
« Last Edit: July 06, 2014, 12:14:45 am by CodeLemming »