Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
9.0, 10.0
-
None
-
None
Description
All major Linux distributions now (e.g Debian, Fedora. Ubuntu, OpenSuSE) configure gcc with "--enable-default-pie" which will create Position Independent executables by default (to support DEP/ASLR)
By default PIE executables will identify themselves on Linux as:
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked
This will be reported as ELF type ET_DYN
However Netbeans does not recognize shared objects as executables and most likely identifies them as a shared library. This means it is impossible to use the debugger with C/C++ code since you cannot select an executable to run the debugger on.
For Netbeans to see a file as an ELF executable it must be of type
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
This will be reported as ELF type ET_EXEC
Now, there is an easy workaround and that is to pass the options
-fno-pie -no-pie
to gcc when compiling (or the corresponding to say clang) to create "old-style" executables. For security reason that is of course not recommended for production code.
Since there is a simply workaround and the fact that v10 does not yet officially support C/C++ I have marked this down as "minor" but it is a low hanging fruit to fix since it only requires identifying the code that determines file type and include shared objects as allowable executables.
Once C/C++ once again is officially supported it is of course vital that this is fixed.