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.
Created attachment 158378 [details] screenshot Steps to reproduce: - create Quote sample project and build it using default GNU tool collection - set a breakpoint in line 133 (discount = getDiscountFor(customerName);) - start debugger - enter any string as a customer name e.g. "aaa", debugger stops at the breakpoint - do Step Into Result: Debugger shows Disassembly of libstdc++ (see attached screenshot and gdb log).
Created attachment 158379 [details] gdb log
If while performing 'Step Into' Debugging view was opened then debugger shows quote.cc source with a green cursor placed in the wrong line (see screenshot2).
Created attachment 158380 [details] screenshot2
The bug is 100% reproducible on both my Ubuntu desktop and our Ubuntu testing machine.
GDB log without IDE: hudson@VBoxUbuntu64:~/NetBeansProjects/Quote_1$ gdb ./dist/Debug/GNU-Linux-x86/quote_1 GNU gdb (GDB) 7.5-ubuntu Copyright (C) 2012 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 "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /export/home/hudson/NetBeansProjects/Quote_1/dist/Debug/GNU-Linux-x86/quote_1...done. (gdb) b 133 Breakpoint 1 at 0x402cb9: file quote.cc, line 133. (gdb) r Starting program: /export/home/hudson/NetBeansProjects/Quote_1/dist/Debug/GNU-Linux-x86/quote_1 Support metric quote program Customer list (5 customer(s)): -------------------------------------- John has discount 10% Mike has discount 0% Peter has discount 13% Ann has discount 11% Tom has discount 9% Enter customer name: aaa Breakpoint 1, main (argc=1, argv=0x7fffffffea88) at quote.cc:133 133 discount = getDiscountFor(customerName); (gdb) s std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7fffffffe960, __str="aaa") at /build/buildd/gcc-4.7-4.7.2/build/x86_64-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:171 171 /build/buildd/gcc-4.7-4.7.2/build/x86_64-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc: No such file or directory. (gdb)
It looks like Ubuntu system specific bug (gdb + system libs) and IDE can do nothing with it. The workaround is to skip string copy constructor by performing Step Out followed by Step Into commands. So the only remaining issue here is wrong next line if Debugging View is open but it's definitely not P2 and could be fixed in the next release.
Works fine on my ubuntu with 82. netbeans (enum/release82) C Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 C++ Compiler: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Fortran Compiler: Tool not found Assembler: GNU assembler (GNU Binutils for Ubuntu) 2.26.1 Make Tool: GNU Make 4.1 Debugger: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 QMake Tool: qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory CMake Tool: Tool not found