Author Topic: Debugger problems  (Read 8459 times)

Offline mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Debugger problems
« on: April 26, 2011, 12:32:04 pm »
Hi,

I have managed to install Code Blocks on my Ubuntu 10.04. Now, I have encountered a new problem. The program compiles but the debugger doesn't work. When I press F4 or F8 I can see in the debugger log:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/mihai/Code::Blocks/1/
Adding source dir: /home/mihai/Code::Blocks/1/
Adding file: bin/Debug/1
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.1-ubuntu
Temporary breakpoint 1 ("/home/mihai/Code::Blocks/1/tst.cpp:10) pending.
Can't find member of namespace, class, struct, or union named "/home/mihai/Code::Blocks/1/tst.cpp:10"
Hint: try '"/home/mihai/Code::Blocks/1/tst.cpp:10<TAB> or '"/home/mihai/Code::Blocks/1/tst.cpp:10<ESC-?>
Program exited normally.
Debugger finished with status 0


Also, after I compile the program and I want to see the return value in the output file, it doesn't work to go directly to the *.out file; first I have to  hide the CodeBlocks window and then to open it again in order to show me that window asking if I want to reload the output file.

Have a nice day,



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger problems
« Reply #1 on: April 26, 2011, 01:17:45 pm »
Can you post the debugger's debug log?
You have to enable it in Settigns -> Compiler & debugger -> debugger -> display debugger's debug log (it is something like that)
(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 mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugger problems
« Reply #2 on: April 26, 2011, 01:27:35 pm »
This one?

LD_LIBRARY_PATH=.:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args bin/Debug/1
Working dir : /home/mihai/Code::Blocks/1/
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep 81735
Executing: ps x -o tty,pid,command
Reading symbols from /home/mihai/Code::Blocks/1/bin/Debug/1...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>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 disassembly-flavor intel
>>>>>>cb_gdb:
> directory /home/mihai/Code::Blocks/1/
>>>>>>cb_gdb:
> tbreak "/home/mihai/Code::Blocks/1/tst.cpp:10"
Temporary breakpoint 1 ("/home/mihai/Code::Blocks/1/tst.cpp:10) pending.
Can't find member of namespace, class, struct, or union named "/home/mihai/Code::Blocks/1/tst.cpp:10"
>>>>>>cb_gdb:
Hint: try '"/home/mihai/Code::Blocks/1/tst.cpp:10<TAB> or '"/home/mihai/Code::Blocks/1/tst.cpp:10<ESC-?>
(Note leading single quote.)
PS result: ?         1974 ps x -o tty,pid,command
PS result: pts/0     1972 sleep 81735
TTY is[/dev/pts/0]
GetConsoleTTY[/dev/pts/0]ConsolePid[1971]
> tty /dev/pts/0
Queued:[tty /dev/pts/0]
>>>>>>cb_gdb:
> run
Program exited normally.
>>>>>>cb_gdb:
> quit

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger problems
« Reply #3 on: April 26, 2011, 02:04:58 pm »
Hm, the path is the problem. Rename Code::Blocks to codeblocks and it will work.

But probably the command is wrong. I will see if I can fix it.
(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 mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugger problems
« Reply #4 on: April 26, 2011, 08:02:09 pm »
It worked  :D thank you.

About the second question.. is there any possible setting or it is a bug?

And another thing,  it doesn't show me the execution time as I saw that it should.

« Last Edit: April 26, 2011, 08:09:15 pm by mihaipopa12 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger problems
« Reply #5 on: April 26, 2011, 10:08:35 pm »
About the second question.. is there any possible setting or it is a bug?
It seems it is a gdb bug, I've reported it.

And another thing,  it doesn't show me the execution time as I saw that it should.
This is normal, because when debugging C::B doesn't use cb_console_runner.
(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 mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugger problems
« Reply #6 on: April 27, 2011, 02:58:00 pm »
It doesn't show me the execution time when I execute the program, is it normal?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger problems
« Reply #7 on: April 27, 2011, 03:00:05 pm »
Have you set the type of the executable to be "Console", also you need to check "pause when executable finishes"
(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 mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugger problems
« Reply #8 on: April 27, 2011, 03:04:58 pm »
And another question  :?... I see that I am now running code blocks 8.02, it is not the last version, is it?
How could I have an update or install a newer comptible version?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugger problems
« Reply #9 on: April 27, 2011, 04:31:30 pm »
Probably apt-get update && apt-get upgrade
But someone running desktop ubuntu can help you more accurately.
Also you could search the forum for instructions, search for "jens repo"
(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 mihaipopa12

  • Single posting newcomer
  • *
  • Posts: 6
Re: Debugger problems
« Reply #10 on: April 27, 2011, 04:51:51 pm »
I did it but I still have the problem with the output file reload.
Thank you very much :D