Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: twgray on April 16, 2013, 01:47:16 am

Title: Code::Blocks 10.11 on Ubuntu 12.10 - No line indicator when debugging. Solved!
Post by: twgray on April 16, 2013, 01:47:16 am
When in debug mode with gdb I can see breakpoints in the .c file but there is no indicator showing which line of code gdb is currently on.  The Debug window at the bottom tells me where gdb is currently but shouldn't there be an arrow or something giving a visual indication?

I have tried this with C::B compiled from source and with Pasgui's packages and both exhibit the same issue.  

Anyone else having this problem?
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: oBFusCATed on April 16, 2013, 09:34:24 am
Enable full logging in the debugger's settings and paste the log from the debugger (using code tags), please.
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: twgray on April 16, 2013, 09:57:30 pm
Where doe the debugger place the log file?
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: Jenna on April 16, 2013, 10:00:06 pm
No file, it just add debug-output to the debuggers log-pane.
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: twgray on April 16, 2013, 10:13:13 pm
Right...found the "log file" right before you replied.

Anyway, this is what it spits out up to the first breakpoint:

Code
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/twgray/Projects/MC::Blocks/parse/
Adding source dir: /home/twgray/Projects/MC::Blocks/parse/
Adding file: /home/twgray/Projects/MC::Blocks/parse/bin/Debug/parse
Changing directory to: /home/twgray/Projects/MC::Blocks/parse/.
Set variable: LD_LIBRARY_PATH=.:

[debug]Command-line: /usr/bin/gdb -nx -fullname  -quiet  -args /home/twgray/Projects/MC::Blocks/parse/bin/Debug/parse
[debug]Working dir : /home/twgray/Projects/MC::Blocks/parse

Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/twgray/Projects/MC::Blocks/parse/bin/Debug/parse
done

[debug]Reading symbols from /home/twgray/Projects/MC::Blocks/parse/bin/Debug/parse...
[debug]done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:

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

[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.5-ubuntu
[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 "x86_64-linux-gnu".
[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-ubuntu

[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 disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/twgray/Projects/MC::Blocks/parse/
[debug]Source directories searched: /home/twgray/Projects/MC:/home/twgray/Projects/MC::Blocks/parse/:/home/twgray/Projects/MC::Blocks/parse/Blocks/parse:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "/home/twgray/Projects/MC::Blocks/parse/Parse.c:51"
[debug]Breakpoint 2 at 0x403b5a: file /home/twgray/Projects/MC::Blocks/parse/Parse.c, line 51.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/4
[debug]Queued:[tty /dev/pts/4]
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/twgray/Projects/MC::Blocks/parse/bin/Debug/parse
[debug]Breakpoint 2, exampleFunc (filename=0x4f1659 "configurations.xml") at /home/twgray/Projects/MC::Blocks/parse/Parse.c:51
[debug]/home/twgray/Projects/MC::Blocks/parse/Parse.c:51:1460:beg:0x403b5a
[debug]>>>>>>cb_gdb:

The program has stopped on a breakpoint but the breakpoint format is not recognized:
/home/twgray/Projects/MC::Blocks/parse/Parse.c:51:1460:beg:0x403b5a
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: oBFusCATed on April 17, 2013, 12:09:34 am
Try to store your project in a path without special characters - "::" in your case.
Title: Re: Code::Blocks 10.11 on Ubuntu 12.10 - No current line indicator when debugging.
Post by: twgray on April 17, 2013, 12:24:12 am
That was it, thanks.