This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243859 - C Debugger does not recognise breakpoints
Summary: C Debugger does not recognise breakpoints
Status: RESOLVED INCOMPLETE
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-16 10:11 UTC by theghostdog
Modified: 2014-07-24 10:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
GDB Log file (9.34 KB, application/octet-stream)
2014-04-22 08:19 UTC, theghostdog
Details
project properties - debug (58.82 KB, image/png)
2014-06-06 12:38 UTC, theghostdog
Details
project properties - run (36.25 KB, image/png)
2014-06-06 12:38 UTC, theghostdog
Details
Project Properties --> Build --> Make (48.69 KB, image/png)
2014-07-04 13:26 UTC, theghostdog
Details
Project Custom Makefile (12.23 KB, application/octet-stream)
2014-07-04 13:28 UTC, theghostdog
Details
gdb log (1.66 MB, application/octet-stream)
2014-07-24 10:04 UTC, theghostdog
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theghostdog 2014-04-16 10:11:33 UTC
I'am running a c++ project with NB 8.0 on a Centos 6.0 machine, g++4.4.7 and gdb 7.2-60.el6_4.1. Unfortunately, a long gone issue is back: Trying to debugging the program in NB does not work. The gdb does not stop at any defined breakpoint neither it catches some useful data, if the program to debug run into an SegFault. Only a disassembly file is shown. 

I know, this was already an GDB issue at NB 7.0. Thus, here is my GDB log, recorded during the failed debugging session:

This log is saved to: /tmp/gdb-cmds3572853162591147543.log 
 NB build: 201403101706 
 ~"GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)\n" 
 ~"Copyright (C) 2010 Free Software Foundation, Inc.\n" 
 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n" 
 ~"This GDB was configured as \"x86_64-redhat-linux-gnu\".\nFor bug reporting instructions, please see:\n" 
 ~"<http://www.gnu.org/software/gdb/bugs/>.\n" 
 (gdb) 
 ~"Working directory /[...]/source/simulations/simProg.\n" 
 (gdb) 
 ~"Signal        Stop\tPrint\tPass to program\tDescription\n" 
 ~"SIGSEGV       Yes\tYes\tNo\t\tSegmentation fault\n" 
 (gdb)



The essential data from the IDE log are:

>Log Session: Tuesday, April 15, 2014 6:28:52 PM CEST 
 >System Info: 
   Product Version         = NetBeans IDE 8.0 (Build 201403101706) (#b8e35b888b3f) 
   Operating System        = Linux version 2.6.32-431.11.2.el6.x86_64 running on amd64 
   Java; VM; Vendor        = 1.7.0_51; OpenJDK 64-Bit Server VM 24.45-b08; Oracle Corporation 
   Runtime                 = OpenJDK Runtime Environment 1.7.0_51-mockbuild_2014_01_15_01_39-b00 
   Java Home               = /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre 
   System Locale; Encoding = en_US (nb); UTF-8 
   Home Directory          = XXXXXXXX 
   Current Directory       = /opt/netbeans-7.4/bin 
   User Directory          = /home/XXXXXX/.netbeans/8.0 
   Cache Directory         = /home/XXXXXX/.cache/netbeans/8.0 
   Installation            = /opt/netbeans/nb 
                             /opt/netbeans/ide 
                             /opt/netbeans/harness 
                             /opt/netbeans/cnd 
                             /opt/netbeans/dlight 
                             /opt/netbeans/platform 
   Boot & Ext. Classpath   = /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/netx.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/plugin.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/rhino.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/classes:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/gnome-java-bridge.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext/localedata.jar 
   Application Classpath   = /opt/netbeans/platform/lib/boot.jar:/opt/netbeans/platform/lib/org-openide-modules.jar:/opt/netbeans/platform/lib/org-openide-util.jar:/opt/netbeans/platform/lib/org-openide-util-lookup.jar:/opt/netbeans/platform/lib/locale/boot_ja.jar:/opt/netbeans/platform/lib/locale/boot_pt_BR.jar:/opt/netbeans/platform/lib/locale/boot_ru.jar:/opt/netbeans/platform/lib/locale/boot_zh_CN.jar:/opt/netbeans/platform/lib/locale/org-openide-modules_ja.jar:/opt/netbeans/platform/lib/locale/org-openide-modules_pt_BR.jar:/opt/netbeans/platform/lib/locale/org-openide-modules_ru.jar:/opt/netbeans/platform/lib/locale/org-openide-modules_zh_CN.jar:/opt/netbeans/platform/lib/locale/org-openide-util_ja.jar:/opt/netbeans/platform/lib/locale/org-openide-util-lookup_ja.jar:/opt/netbeans/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/opt/netbeans/platform/lib/locale/org-openide-util-lookup_ru.jar:/opt/netbeans/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/opt/netbeans/platform/lib/locale/org-openide-util_pt_BR.jar:/opt/netbeans/platform/lib/locale/org-openide-util_ru.jar:/opt/netbeans/platform/lib/locale/org-openide-util_zh_CN.jar:/usr/lib/jvm/java/lib/dt.jar:/usr/lib/jvm/java/lib/tools.jar 
   Startup Classpath       = /opt/netbeans/platform/core/org-openide-filesystems.jar:/opt/netbeans/platform/core/core.jar:/opt/netbeans/platform/core/locale/core_ru.jar:/opt/netbeans/platform/core/locale/core_zh_CN.jar:/opt/netbeans/platform/core/locale/core_ja.jar:/opt/netbeans/platform/core/locale/org-openide-filesystems_zh_CN.jar:/opt/netbeans/platform/core/locale/org-openide-filesystems_pt_BR.jar:/opt/netbeans/platform/core/locale/org-openide-filesystems_ru.jar:/opt/netbeans/platform/core/locale/core_pt_BR.jar:/opt/netbeans/platform/core/locale/org-openide-filesystems_ja.jar:/opt/netbeans/nb/core/org-netbeans-upgrader.jar:/opt/netbeans/nb/core/locale/org-netbeans-upgrader_ja.jar:/opt/netbeans/nb/core/locale/core_nb_zh_CN.jar:/opt/netbeans/nb/core/locale/org-netbeans-upgrader_pt_BR.jar:/opt/netbeans/nb/core/locale/core_nb_ja.jar:/opt/netbeans/nb/core/locale/core_nb_pt_BR.jar:/opt/netbeans/nb/core/locale/core_nb_ru.jar:/opt/netbeans/nb/core/locale/core_nb.jar:/opt/netbeans/nb/core/locale/org-netbeans-upgrader_zh_CN.jar:/opt/netbeans/nb/core/locale/org-netbeans-upgrader_ru.jar

I run the program by calling a shell script from the run dialog within the project properties. For the debugging purpose, i have defined a dedicated debug-run command (no script) within the debug properties too. Thus, a lost of debug symbols may are not the reason, like the last time. 

If I run the program and attach an gdb manually, everything works fine. Thus, i think its not a system failure but it looks rather like a NB cnd bug. 

Hope for support! :)

best
Comment 1 soldatov 2014-04-16 16:55:36 UTC
1) in NetBeans 8.0 'Debugger Console' tab displays user's commands. Can you attach your /tmp/gdb-cmds3572853162591147543.log file (this file contains internal commands)
2) Do you use "C/C++ Application" or "C/C++ Project with Existing Sources" project type?
Comment 2 theghostdog 2014-04-22 08:19:39 UTC
Created attachment 146879 [details]
GDB Log file
Comment 3 theghostdog 2014-04-22 08:24:44 UTC
Hello soldatov,

the project type is C++ Project from existing Source, created directly with NB 8.0. The log file is created with a fresh run, within the debugger should catch three breakpoints several times, but it has not done it. 

best 

ghostdog

PS: by the way, I'am sorry, but writing an comment and attaching a file afterwards looks also as an bug, since the file is posted without the comment. this is the reason for my double post. ;)
Comment 4 theghostdog 2014-04-29 12:24:09 UTC
The bug is also present with Oracle Java jdk1.8.0_05.
Comment 5 theghostdog 2014-04-30 12:50:40 UTC
Hallo,I tried the Gcc 4.7.7 from the RedHat DevTool-Set 1.1, but the same behaviour is still present.best
Comment 6 theghostdog 2014-05-08 13:57:50 UTC
Just for your information. I have created an NB C++ application project and tried the debugger. For this configuration works the debugger as expected on Centos 6.
Comment 7 theghostdog 2014-06-06 08:55:06 UTC
hello soldatov,

is there any update for this bug on the horizon????

best

theghostdog
Comment 8 henk89 2014-06-06 09:01:35 UTC
The debugging engine was unable to detect your symbol file. Could you please screen-shot run and debug tabs in project properties?
Comment 9 theghostdog 2014-06-06 12:38:04 UTC
Created attachment 147591 [details]
project properties - debug

the project debug properties
Comment 10 theghostdog 2014-06-06 12:38:41 UTC
Created attachment 147592 [details]
project properties - run

the project run properties
Comment 11 theghostdog 2014-06-06 12:41:50 UTC
the shell script in the run command simple calls:

#!/bin/sh
make -f Makefile-Netbeans-Project.mk Run

thereby is Makefile-Netbeans-Project.mk the makefile of my c++ project from source
Comment 12 theghostdog 2014-06-16 08:48:11 UTC
hello henk,

were the screenshots of the project properties helpful? do you need any support?

best
Comment 13 theghostdog 2014-06-19 09:01:13 UTC
Hello together,yesterday, I tried to open the project in NetBeans 7.4. First of all, I receive a warning that its a project of a new version. However, the project was opened and compiled. I tried to debug it, but i recognize the same behavior  as in NB 8.0, the debugger does not stop on the break point. Afterwards, I create in NB7.4 a new c   project from source for my project and try it to debug. Again, it does not stop at any break-points. Thus, the error may be independent of NB7.4 and NB8.0. it may be that it is related to the GCC 4.7.7 used via the Redhat Developer Tools 1.1?best
Comment 14 henk89 2014-06-19 14:09:23 UTC
You should specify a correct symbol file in the Build Result field (Project Properties -> Build -> Make). It should be the binary generated by your makefile.
Comment 15 henk89 2014-06-30 14:02:12 UTC
Could you please screen-shot Project Properties -> Build -> Make tab in project properties?
Comment 16 theghostdog 2014-07-04 13:26:45 UTC
Created attachment 147887 [details]
Project Properties --> Build --> Make

The desired screen shot from the project properties build make options.
Comment 17 theghostdog 2014-07-04 13:28:16 UTC
Created attachment 147888 [details]
Project Custom Makefile

For your information: The custom makefile, used to create, build and run the project.
Comment 18 theghostdog 2014-07-04 13:41:16 UTC
Hallo Henk,

as you can see above, I have posted the desired screen shots. In addition, I attached my handmade custom makefile, which rules the build process of my project. Just for your information: this makefile is a kind of meta makefile. It defines some variables and paths and calls a small program that creates the actual makefile. Afterwards, I call indirectly that created makefile. Sounds strange, but its necessary for using the omnet++ network simulator from netbeans, instead the ugly eclipse ide, provided by omnet. ;)

best
Comment 19 henk89 2014-07-04 14:23:11 UTC
It looks like you'd set an incorrect workdir and as a result debugger was unable to resolve out/gcc-debug folder (try writing the absolute path to the workdir here)
Comment 20 henk89 2014-07-04 15:06:02 UTC
(In reply to henk89 from comment #19)
> It looks like you'd set an incorrect workdir and as a result debugger was
> unable to resolve out/gcc-debug folder (try writing the absolute path to the
> workdir here)

I was mistaken: build result is resolved inside the project directory. Try specifying the absolute path to build result.
Comment 21 theghostdog 2014-07-21 12:25:47 UTC
(In reply to henk89 from comment #20)
> (In reply to henk89 from comment #19)
> > It looks like you'd set an incorrect workdir and as a result debugger was
> > unable to resolve out/gcc-debug folder (try writing the absolute path to the
> > workdir here)
> 
> I was mistaken: build result is resolved inside the project directory. Try
> specifying the absolute path to build result.



Hey henk,

your tips solve my problem in parts. ;) I change the project settings in build-result and debug command both, to an absolute path to the build result ( i tried relativ paths and absolute paths using links before, but this does not work). after this, I was able to start a debug session. the debugger stops and shows me the local context. Unfortunately, after pressing a several times of stepover and step into, the debugger seems to crash internaly. in specially, the programm runs, but the debugger menu bar and the debugger window does not came back (the debugger buttons within the menu bar are greyed out and the variables window does not display any content but the program still runs in the debugging mode without doing any progress. was my defect description understandable? maybe, its an additional issue???   

best

ghostdog
Comment 22 henk89 2014-07-23 09:02:28 UTC
It looks like an internal GDB issue. Could you share the log?
Comment 23 theghostdog 2014-07-24 10:04:51 UTC
Created attachment 148268 [details]
gdb log

hey henk,

did you mean the gdb log or the ide log? I have attached a gdb log. 

however, it appears that the last C++ update of NB solves my problem in collaboration with your project setting advices. 

consequently: thank you very much. the issue is now closed, from my perspective. ;)
Comment 24 theghostdog 2014-07-24 10:06:47 UTC
postscript: my c++ module version is: 1.26.3.1