Author Topic: Problem with debugging  (Read 31197 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Problem with debugging
« Reply #15 on: July 21, 2013, 01:57:47 am »
I can confirm this (fedora 19 64bit with gcc 4.8.1 and gdb 7.6).
It does not work from commandline either.
Or more exactly, it stops at the bp, but it does not print that it has stopped:

Quote from: all lines end with cr
$ gdb bin/Debug/test
GNU gdb (GDB) Fedora (7.6-32.fc19)
[...]
This GDB was configured as "x86_64-redhat-linux-gnu".
[...]
Reading symbols from /tmp/test/bin/Debug/test...done.
(gdb) break main.cpp:7
Breakpoint 1 at 0x400874: file /tmp/test/main.cpp, line 7.
(gdb) run
Starting program: /tmp/test/bin/Debug/test

Breakpoint 1, main () at /tmp/test/main.cpp:7
Missing separate debuginfos, use: debuginfo-install glibc-2.17-11.fc19.x86_64 libgcc-4.8.1-1.fc19.x86_64 libstdc++-4.8.1-1.fc19.x86_64
(gdb) n
Hello world!
(gdb)

Quote from: all lines end with lf
$ gdb bin/Debug/test
[...]
Reading symbols from /tmp/test/bin/Debug/test...done.
(gdb) break main.cpp:7
Breakpoint 1 at 0x400874: file /tmp/test/main.cpp, line 7.
(gdb) run
Starting program: /tmp/test/bin/Debug/test

Breakpoint 1, main () at /tmp/test/main.cpp:7
7       cout << "Hello world!" << endl;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-11.fc19.x86_64 libgcc-4.8.1-1.fc19.x86_64 libstdc++-4.8.1-1.fc19.x86_64
(gdb) n
Hello world!
8       return 0;
(gdb)

Didn't we haveusers reporting similar issues on mac ?
Might this be related or do the (more or less) new (more or less linux based) mac's use lf (or crlf, that works also) all the time ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with debugging
« Reply #16 on: July 21, 2013, 10:32:50 am »
Didn't we haveusers reporting similar issues on mac ?
I don't think so. But there are other similar reports where we fail to detect when the debugger has stopped (after stepping into, set next statement and so on).
I've reproduced it, too, and I'll try to 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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with debugging
« Reply #17 on: July 21, 2013, 10:33:32 pm »
OK, I have a patch that should fix this and many similar problems.
The patch can be downloaded from here: http://cmpt.benbmp.org/codeblocks/patches/dbg/cb.dbg.stop.on.break.patch

Please try and report if there are any regressions introduced with this patch.

The patch should fix:
1. The problem reported in this topic
2. Executing step into and the code is inavailable
3. Set next statement, where there are errors

@Morten: I think this should fix stepping problem you've reported in the past.

I won't commit it for a while to see if it works with my workflows at least. :)
(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 G-Shadow

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Problem with debugging
« Reply #18 on: August 03, 2013, 08:41:34 pm »
I confirm, in that version (svn 9232) bug is fixed. Sorry for such late answer.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with debugging
« Reply #19 on: August 03, 2013, 10:41:08 pm »
With or without the patch?
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with debugging
« Reply #20 on: August 05, 2013, 08:59:45 pm »
In svn...
(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 G-Shadow

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Problem with debugging
« Reply #21 on: August 06, 2013, 06:56:54 pm »
Ah, sorry ::). With patch, of course.
I have checked out from svn, applied patch, build everything and run.
Compared this patched version vs installed official release to make sure I reproduce correctly.

Offline bangorme

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Problem with debugging
« Reply #22 on: July 14, 2014, 03:32:43 pm »
I'm in ver 12.11.  Is this fix in my version?  I'm having this same problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Problem with debugging
« Reply #23 on: July 14, 2014, 04:35:25 pm »
I'm in ver 12.11.  Is this fix in my version?  I'm having this same problem.

Unlikely, the date on the fix was 2013-08-05, the 12.11 release was in 2012.

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