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"
~"Working directory /[...]/source/simulations/simProg.\n"
~"Signal Stop\tPrint\tPass to program\tDescription\n"
~"SIGSEGV Yes\tYes\tNo\t\tSegmentation fault\n"
The essential data from the IDE log are:
>Log Session: Tuesday, April 15, 2014 6:28:52 PM CEST
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-18.104.22.168.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
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! :)
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?
Created attachment 146879 [details]
GDB Log file
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.
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. ;)
The bug is also present with Oracle Java jdk1.8.0_05.
Hallo,I tried the Gcc 4.7.7 from the RedHat DevTool-Set 1.1, but the same behaviour is still present.best
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.
is there any update for this bug on the horizon????
The debugging engine was unable to detect your symbol file. Could you please screen-shot run and debug tabs in project properties?
Created attachment 147591 [details]
project properties - debug
the project debug properties
Created attachment 147592 [details]
project properties - run
the project run properties
the shell script in the run command simple calls:
make -f Makefile-Netbeans-Project.mk Run
thereby is Makefile-Netbeans-Project.mk the makefile of my c++ project from source
were the screenshots of the project properties helpful? do you need any support?
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
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.
Could you please screen-shot Project Properties -> Build -> Make tab in project properties?
Created attachment 147887 [details]
Project Properties --> Build --> Make
The desired screen shot from the project properties build make options.
Created attachment 147888 [details]
Project Custom Makefile
For your information: The custom makefile, used to create, build and run the project.
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. ;)
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)
(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.
(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.
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???
It looks like an internal GDB issue. Could you share the log?
Created attachment 148268 [details]
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. ;)
postscript: my c++ module version is: 22.214.171.124