Skip to content

Commit

Permalink
The CPPLight debugger works on aarch64.
Browse files Browse the repository at this point in the history
  • Loading branch information
entlicher committed Sep 22, 2022
1 parent a1373cd commit 98957f7
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 77 deletions.
Expand Up @@ -388,7 +388,7 @@ private void finish (boolean sendExit, int exitCode) {
return ;
}
breakpointsHandler.dispose();
if (sendExit) {
if (sendExit && proxy != null) {
proxy.send(new Command("-gdb-exit"));
}
Utils.unmarkCurrent ();
Expand Down
2 changes: 1 addition & 1 deletion ide/dlight.nativeexecution/external/binaries-list
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
89E5CF21801B51580FF00D6CC1209676EDE420FA exechlp-1.0.zip
4B4DCA62F8C4A1954AE6D286955C36CC50B8CC3A exechlp-1.2.zip
@@ -1,6 +1,6 @@
Name: exechlp
Description: binaries that used by dlight.nativeexecution module (process_start, pty, pty_open - used for dealing with pseude terminals; sigqueue, killall - sending signals to processes; stat - getting detailed file information; unbuffer.so - used when unbuffering is required)
Version: 1.0
Version: 1.2
License: CDDL-1.0
Origin: NetBeans
Comment: needed for dlight.nativeexecution module to provide system-dependent services
Expand Down
143 changes: 75 additions & 68 deletions ide/dlight.nativeexecution/nbproject/project.properties
Expand Up @@ -40,72 +40,79 @@ test.config.stableBTD.excludes=\
**/TerminalConfigurationProviderTest.class,\
**/WindowsSupportTest.class

release.external/exechlp-1.0.zip!/Linux-x86/process_start = bin/nativeexecution/Linux-x86/process_start
release.external/exechlp-1.0.zip!/Linux-x86/pty = bin/nativeexecution/Linux-x86/pty
release.external/exechlp-1.0.zip!/Linux-x86/pty_open = bin/nativeexecution/Linux-x86/pty_open
release.external/exechlp-1.0.zip!/Linux-x86/sigqueue = bin/nativeexecution/Linux-x86/sigqueue
release.external/exechlp-1.0.zip!/Linux-x86/stat = bin/nativeexecution/Linux-x86/stat
release.external/exechlp-1.0.zip!/Linux-x86/unbuffer.so = bin/nativeexecution/Linux-x86/unbuffer.so
release.external/exechlp-1.0.zip!/Linux-x86/killall = bin/nativeexecution/Linux-x86/killall
release.external/exechlp-1.0.zip!/Linux-x86_64/process_start = bin/nativeexecution/Linux-x86_64/process_start
release.external/exechlp-1.0.zip!/Linux-x86_64/pty = bin/nativeexecution/Linux-x86_64/pty
release.external/exechlp-1.0.zip!/Linux-x86_64/pty_open = bin/nativeexecution/Linux-x86_64/pty_open
release.external/exechlp-1.0.zip!/Linux-x86_64/sigqueue = bin/nativeexecution/Linux-x86_64/sigqueue
release.external/exechlp-1.0.zip!/Linux-x86_64/stat = bin/nativeexecution/Linux-x86_64/stat
release.external/exechlp-1.0.zip!/Linux-x86_64/unbuffer.so = bin/nativeexecution/Linux-x86_64/unbuffer.so
release.external/exechlp-1.0.zip!/Linux-x86_64/killall = bin/nativeexecution/Linux-x86_64/killall
release.external/exechlp-1.0.zip!/Linux-sparc_64/process_start = bin/nativeexecution/Linux-sparc_64/process_start
release.external/exechlp-1.0.zip!/Linux-sparc_64/pty = bin/nativeexecution/Linux-sparc_64/pty
release.external/exechlp-1.0.zip!/Linux-sparc_64/pty_open = bin/nativeexecution/Linux-sparc_64/pty_open
release.external/exechlp-1.0.zip!/Linux-sparc_64/sigqueue = bin/nativeexecution/Linux-sparc_64/sigqueue
release.external/exechlp-1.0.zip!/Linux-sparc_64/stat = bin/nativeexecution/Linux-sparc_64/stat
release.external/exechlp-1.0.zip!/Linux-sparc_64/unbuffer.so = bin/nativeexecution/Linux-sparc_64/unbuffer.so
release.external/exechlp-1.0.zip!/Linux-sparc_64/killall = bin/nativeexecution/Linux-sparc_64/killall
release.external/exechlp-1.0.zip!/Windows-x86/process_start = bin/nativeexecution/Windows-x86/process_start
release.external/exechlp-1.0.zip!/Windows-x86/pty = bin/nativeexecution/Windows-x86/pty
release.external/exechlp-1.0.zip!/Windows-x86/pty_open = bin/nativeexecution/Windows-x86/pty_open
release.external/exechlp-1.0.zip!/Windows-x86/sigqueue = bin/nativeexecution/Windows-x86/sigqueue
release.external/exechlp-1.0.zip!/Windows-x86/unbuffer.dll = bin/nativeexecution/Windows-x86/unbuffer.dll
release.external/exechlp-1.0.zip!/Windows-x86/killall = bin/nativeexecution/Windows-x86/killall
release.external/exechlp-1.0.zip!/Windows-x86_64/process_start = bin/nativeexecution/Windows-x86_64/process_start
release.external/exechlp-1.0.zip!/Windows-x86_64/pty = bin/nativeexecution/Windows-x86_64/pty
release.external/exechlp-1.0.zip!/Windows-x86_64/pty_open = bin/nativeexecution/Windows-x86_64/pty_open
release.external/exechlp-1.0.zip!/Windows-x86_64/sigqueue = bin/nativeexecution/Windows-x86_64/sigqueue
release.external/exechlp-1.0.zip!/Windows-x86_64/killall = bin/nativeexecution/Windows-x86_64/killall
release.external/exechlp-1.0.zip!/Windows-x86_64/unbuffer.dll = bin/nativeexecution/Windows-x86_64/unbuffer.dll
release.external/exechlp-1.0.zip!/MacOSX-x86/process_start = bin/nativeexecution/MacOSX-x86/process_start
release.external/exechlp-1.0.zip!/MacOSX-x86/pty = bin/nativeexecution/MacOSX-x86/pty
release.external/exechlp-1.0.zip!/MacOSX-x86/pty_open = bin/nativeexecution/MacOSX-x86/pty_open
release.external/exechlp-1.0.zip!/MacOSX-x86/stat = bin/nativeexecution/MacOSX-x86/stat
release.external/exechlp-1.0.zip!/MacOSX-x86/unbuffer.dylib = bin/nativeexecution/MacOSX-x86/unbuffer.dylib
release.external/exechlp-1.0.zip!/MacOSX-x86/killall = bin/nativeexecution/MacOSX-x86/killall
release.external/exechlp-1.0.zip!/MacOSX-x86_64/process_start = bin/nativeexecution/MacOSX-x86_64/process_start
release.external/exechlp-1.0.zip!/MacOSX-x86_64/pty = bin/nativeexecution/MacOSX-x86_64/pty
release.external/exechlp-1.0.zip!/MacOSX-x86_64/pty_open = bin/nativeexecution/MacOSX-x86_64/pty_open
release.external/exechlp-1.0.zip!/MacOSX-x86_64/stat = bin/nativeexecution/MacOSX-x86_64/stat
release.external/exechlp-1.0.zip!/MacOSX-x86_64/unbuffer.dylib = bin/nativeexecution/MacOSX-x86_64/unbuffer.dylib
release.external/exechlp-1.0.zip!/MacOSX-x86_64/killall = bin/nativeexecution/MacOSX-x86_64/killall
release.external/exechlp-1.0.zip!/SunOS-sparc_64/privp = bin/nativeexecution/SunOS-sparc_64/privp
release.external/exechlp-1.0.zip!/SunOS-sparc_64/process_start = bin/nativeexecution/SunOS-sparc_64/process_start
release.external/exechlp-1.0.zip!/SunOS-sparc_64/pty = bin/nativeexecution/SunOS-sparc_64/pty
release.external/exechlp-1.0.zip!/SunOS-sparc_64/pty_open = bin/nativeexecution/SunOS-sparc_64/pty_open
release.external/exechlp-1.0.zip!/SunOS-sparc_64/sigqueue = bin/nativeexecution/SunOS-sparc_64/sigqueue
release.external/exechlp-1.0.zip!/SunOS-sparc_64/stat = bin/nativeexecution/SunOS-sparc_64/stat
release.external/exechlp-1.0.zip!/SunOS-sparc_64/unbuffer.so = bin/nativeexecution/SunOS-sparc_64/unbuffer.so
release.external/exechlp-1.0.zip!/SunOS-sparc_64/killall = bin/nativeexecution/SunOS-sparc_64/killall
release.external/exechlp-1.0.zip!/SunOS-x86/privp = bin/nativeexecution/SunOS-x86/privp
release.external/exechlp-1.0.zip!/SunOS-x86/process_start = bin/nativeexecution/SunOS-x86/process_start
release.external/exechlp-1.0.zip!/SunOS-x86/pty = bin/nativeexecution/SunOS-x86/pty
release.external/exechlp-1.0.zip!/SunOS-x86/pty_open = bin/nativeexecution/SunOS-x86/pty_open
release.external/exechlp-1.0.zip!/SunOS-x86/sigqueue = bin/nativeexecution/SunOS-x86/sigqueue
release.external/exechlp-1.0.zip!/SunOS-x86/stat = bin/nativeexecution/SunOS-x86/stat
release.external/exechlp-1.0.zip!/SunOS-x86/unbuffer.so = bin/nativeexecution/SunOS-x86/unbuffer.so
release.external/exechlp-1.0.zip!/SunOS-x86/killall = bin/nativeexecution/SunOS-x86/killall
release.external/exechlp-1.0.zip!/SunOS-x86_64/process_start = bin/nativeexecution/SunOS-x86_64/process_start
release.external/exechlp-1.0.zip!/SunOS-x86_64/pty = bin/nativeexecution/SunOS-x86_64/pty
release.external/exechlp-1.0.zip!/SunOS-x86_64/pty_open = bin/nativeexecution/SunOS-x86_64/pty_open
release.external/exechlp-1.0.zip!/SunOS-x86_64/sigqueue = bin/nativeexecution/SunOS-x86_64/sigqueue
release.external/exechlp-1.0.zip!/SunOS-x86_64/stat = bin/nativeexecution/SunOS-x86_64/stat
release.external/exechlp-1.0.zip!/SunOS-x86_64/unbuffer.so = bin/nativeexecution/SunOS-x86_64/unbuffer.so
release.external/exechlp-1.0.zip!/SunOS-x86_64/killall = bin/nativeexecution/SunOS-x86_64/killall
release.external/exechlp-1.2.zip!/Linux-aarch64/process_start = bin/nativeexecution/Linux-aarch64/process_start
release.external/exechlp-1.2.zip!/Linux-aarch64/pty = bin/nativeexecution/Linux-aarch64/pty
release.external/exechlp-1.2.zip!/Linux-aarch64/pty_open = bin/nativeexecution/Linux-aarch64/pty_open
release.external/exechlp-1.2.zip!/Linux-aarch64/sigqueue = bin/nativeexecution/Linux-aarch64/sigqueue
release.external/exechlp-1.2.zip!/Linux-aarch64/stat = bin/nativeexecution/Linux-aarch64/stat
release.external/exechlp-1.2.zip!/Linux-aarch64/unbuffer.so = bin/nativeexecution/Linux-aarch64/unbuffer.so
release.external/exechlp-1.2.zip!/Linux-aarch64/killall = bin/nativeexecution/Linux-aarch64/killall
release.external/exechlp-1.2.zip!/Linux-x86/process_start = bin/nativeexecution/Linux-x86/process_start
release.external/exechlp-1.2.zip!/Linux-x86/pty = bin/nativeexecution/Linux-x86/pty
release.external/exechlp-1.2.zip!/Linux-x86/pty_open = bin/nativeexecution/Linux-x86/pty_open
release.external/exechlp-1.2.zip!/Linux-x86/sigqueue = bin/nativeexecution/Linux-x86/sigqueue
release.external/exechlp-1.2.zip!/Linux-x86/stat = bin/nativeexecution/Linux-x86/stat
release.external/exechlp-1.2.zip!/Linux-x86/unbuffer.so = bin/nativeexecution/Linux-x86/unbuffer.so
release.external/exechlp-1.2.zip!/Linux-x86/killall = bin/nativeexecution/Linux-x86/killall
release.external/exechlp-1.2.zip!/Linux-x86_64/process_start = bin/nativeexecution/Linux-x86_64/process_start
release.external/exechlp-1.2.zip!/Linux-x86_64/pty = bin/nativeexecution/Linux-x86_64/pty
release.external/exechlp-1.2.zip!/Linux-x86_64/pty_open = bin/nativeexecution/Linux-x86_64/pty_open
release.external/exechlp-1.2.zip!/Linux-x86_64/sigqueue = bin/nativeexecution/Linux-x86_64/sigqueue
release.external/exechlp-1.2.zip!/Linux-x86_64/stat = bin/nativeexecution/Linux-x86_64/stat
release.external/exechlp-1.2.zip!/Linux-x86_64/unbuffer.so = bin/nativeexecution/Linux-x86_64/unbuffer.so
release.external/exechlp-1.2.zip!/Linux-x86_64/killall = bin/nativeexecution/Linux-x86_64/killall
release.external/exechlp-1.2.zip!/Linux-sparc_64/process_start = bin/nativeexecution/Linux-sparc_64/process_start
release.external/exechlp-1.2.zip!/Linux-sparc_64/pty = bin/nativeexecution/Linux-sparc_64/pty
release.external/exechlp-1.2.zip!/Linux-sparc_64/pty_open = bin/nativeexecution/Linux-sparc_64/pty_open
release.external/exechlp-1.2.zip!/Linux-sparc_64/sigqueue = bin/nativeexecution/Linux-sparc_64/sigqueue
release.external/exechlp-1.2.zip!/Linux-sparc_64/stat = bin/nativeexecution/Linux-sparc_64/stat
release.external/exechlp-1.2.zip!/Linux-sparc_64/unbuffer.so = bin/nativeexecution/Linux-sparc_64/unbuffer.so
release.external/exechlp-1.2.zip!/Linux-sparc_64/killall = bin/nativeexecution/Linux-sparc_64/killall
release.external/exechlp-1.2.zip!/Windows-x86/process_start = bin/nativeexecution/Windows-x86/process_start
release.external/exechlp-1.2.zip!/Windows-x86/pty = bin/nativeexecution/Windows-x86/pty
release.external/exechlp-1.2.zip!/Windows-x86/pty_open = bin/nativeexecution/Windows-x86/pty_open
release.external/exechlp-1.2.zip!/Windows-x86/sigqueue = bin/nativeexecution/Windows-x86/sigqueue
release.external/exechlp-1.2.zip!/Windows-x86/unbuffer.dll = bin/nativeexecution/Windows-x86/unbuffer.dll
release.external/exechlp-1.2.zip!/Windows-x86/killall = bin/nativeexecution/Windows-x86/killall
release.external/exechlp-1.2.zip!/Windows-x86_64/process_start = bin/nativeexecution/Windows-x86_64/process_start
release.external/exechlp-1.2.zip!/Windows-x86_64/pty = bin/nativeexecution/Windows-x86_64/pty
release.external/exechlp-1.2.zip!/Windows-x86_64/pty_open = bin/nativeexecution/Windows-x86_64/pty_open
release.external/exechlp-1.2.zip!/Windows-x86_64/sigqueue = bin/nativeexecution/Windows-x86_64/sigqueue
release.external/exechlp-1.2.zip!/Windows-x86_64/killall = bin/nativeexecution/Windows-x86_64/killall
release.external/exechlp-1.2.zip!/Windows-x86_64/unbuffer.dll = bin/nativeexecution/Windows-x86_64/unbuffer.dll
release.external/exechlp-1.2.zip!/MacOSX-x86/process_start = bin/nativeexecution/MacOSX-x86/process_start
release.external/exechlp-1.2.zip!/MacOSX-x86/pty = bin/nativeexecution/MacOSX-x86/pty
release.external/exechlp-1.2.zip!/MacOSX-x86/pty_open = bin/nativeexecution/MacOSX-x86/pty_open
release.external/exechlp-1.2.zip!/MacOSX-x86/stat = bin/nativeexecution/MacOSX-x86/stat
release.external/exechlp-1.2.zip!/MacOSX-x86/unbuffer.dylib = bin/nativeexecution/MacOSX-x86/unbuffer.dylib
release.external/exechlp-1.2.zip!/MacOSX-x86/killall = bin/nativeexecution/MacOSX-x86/killall
release.external/exechlp-1.2.zip!/MacOSX-x86_64/process_start = bin/nativeexecution/MacOSX-x86_64/process_start
release.external/exechlp-1.2.zip!/MacOSX-x86_64/pty = bin/nativeexecution/MacOSX-x86_64/pty
release.external/exechlp-1.2.zip!/MacOSX-x86_64/pty_open = bin/nativeexecution/MacOSX-x86_64/pty_open
release.external/exechlp-1.2.zip!/MacOSX-x86_64/stat = bin/nativeexecution/MacOSX-x86_64/stat
release.external/exechlp-1.2.zip!/MacOSX-x86_64/unbuffer.dylib = bin/nativeexecution/MacOSX-x86_64/unbuffer.dylib
release.external/exechlp-1.2.zip!/MacOSX-x86_64/killall = bin/nativeexecution/MacOSX-x86_64/killall
release.external/exechlp-1.2.zip!/SunOS-sparc_64/privp = bin/nativeexecution/SunOS-sparc_64/privp
release.external/exechlp-1.2.zip!/SunOS-sparc_64/process_start = bin/nativeexecution/SunOS-sparc_64/process_start
release.external/exechlp-1.2.zip!/SunOS-sparc_64/pty = bin/nativeexecution/SunOS-sparc_64/pty
release.external/exechlp-1.2.zip!/SunOS-sparc_64/pty_open = bin/nativeexecution/SunOS-sparc_64/pty_open
release.external/exechlp-1.2.zip!/SunOS-sparc_64/sigqueue = bin/nativeexecution/SunOS-sparc_64/sigqueue
release.external/exechlp-1.2.zip!/SunOS-sparc_64/stat = bin/nativeexecution/SunOS-sparc_64/stat
release.external/exechlp-1.2.zip!/SunOS-sparc_64/unbuffer.so = bin/nativeexecution/SunOS-sparc_64/unbuffer.so
release.external/exechlp-1.2.zip!/SunOS-sparc_64/killall = bin/nativeexecution/SunOS-sparc_64/killall
release.external/exechlp-1.2.zip!/SunOS-x86/privp = bin/nativeexecution/SunOS-x86/privp
release.external/exechlp-1.2.zip!/SunOS-x86/process_start = bin/nativeexecution/SunOS-x86/process_start
release.external/exechlp-1.2.zip!/SunOS-x86/pty = bin/nativeexecution/SunOS-x86/pty
release.external/exechlp-1.2.zip!/SunOS-x86/pty_open = bin/nativeexecution/SunOS-x86/pty_open
release.external/exechlp-1.2.zip!/SunOS-x86/sigqueue = bin/nativeexecution/SunOS-x86/sigqueue
release.external/exechlp-1.2.zip!/SunOS-x86/stat = bin/nativeexecution/SunOS-x86/stat
release.external/exechlp-1.2.zip!/SunOS-x86/unbuffer.so = bin/nativeexecution/SunOS-x86/unbuffer.so
release.external/exechlp-1.2.zip!/SunOS-x86/killall = bin/nativeexecution/SunOS-x86/killall
release.external/exechlp-1.2.zip!/SunOS-x86_64/process_start = bin/nativeexecution/SunOS-x86_64/process_start
release.external/exechlp-1.2.zip!/SunOS-x86_64/pty = bin/nativeexecution/SunOS-x86_64/pty
release.external/exechlp-1.2.zip!/SunOS-x86_64/pty_open = bin/nativeexecution/SunOS-x86_64/pty_open
release.external/exechlp-1.2.zip!/SunOS-x86_64/sigqueue = bin/nativeexecution/SunOS-x86_64/sigqueue
release.external/exechlp-1.2.zip!/SunOS-x86_64/stat = bin/nativeexecution/SunOS-x86_64/stat
release.external/exechlp-1.2.zip!/SunOS-x86_64/unbuffer.so = bin/nativeexecution/SunOS-x86_64/unbuffer.so
release.external/exechlp-1.2.zip!/SunOS-x86_64/killall = bin/nativeexecution/SunOS-x86_64/killall

Expand Up @@ -39,7 +39,7 @@ else
BITNESS=64
fi
else
uname -a | egrep "x86_64|WOW64|sparc64" >/dev/null
uname -a | egrep "x86_64|WOW64|sparc64|aarch64" >/dev/null
if [ $? -eq 0 ]; then
BITNESS=64
fi
Expand Down Expand Up @@ -187,4 +187,4 @@ echo TMPDIRBASE=${TMPDIRBASE}
echo DATETIME=${DATETIME}
echo ENVFILE=${ENVFILE}
echo ID=${ID}
exit 0
exit 0
Expand Up @@ -28,6 +28,7 @@ public static enum CpuFamily {
SPARC,
X86,
ARM,
AARCH64,
UNKNOWN;
}

Expand Down
Expand Up @@ -168,7 +168,8 @@ public static boolean isSupportedFor(ExecutionEnvironment executionEnvironment)
case LINUX:
return hostInfo.getCpuFamily().equals(CpuFamily.X86)
|| hostInfo.getCpuFamily().equals(CpuFamily.SPARC)
|| (hostInfo.getCpuFamily().equals(CpuFamily.ARM) && Boolean.getBoolean("cnd.pty.arm.support"));
|| (hostInfo.getCpuFamily().equals(CpuFamily.ARM) && Boolean.getBoolean("cnd.pty.arm.support"))
|| hostInfo.getCpuFamily().equals(CpuFamily.AARCH64);
case SUNOS:
return true;
case FREEBSD:
Expand Down
Expand Up @@ -277,7 +277,7 @@ protected final void setupPredefined(ExpanderStyle style) {
predefinedMacros.put("soext", soext); // NOI18N
predefinedMacros.put("osname", osname); // NOI18N
predefinedMacros.put("isa", os.getBitness().toString()); // NOI18N
predefinedMacros.put("_isa", os.getBitness() == HostInfo.Bitness._64 ? "_64" : ""); // NOI18N
predefinedMacros.put("_isa", os.getBitness() == HostInfo.Bitness._64 && hostInfo.getCpuFamily() != HostInfo.CpuFamily.AARCH64 ? "_64" : ""); // NOI18N
String platform = hostInfo.getCpuFamily().name().toLowerCase();

if (style == ExpanderStyle.SUNSTUDIO_STYLE) {
Expand Down
Expand Up @@ -73,9 +73,10 @@ public static void initUnbuffer(final ExecutionEnvironment execEnv, final MacroM
return;
case LINUX:
if (!hinfo.getCpuFamily().equals(CpuFamily.X86) &&
!hinfo.getCpuFamily().equals(CpuFamily.SPARC)) {
!hinfo.getCpuFamily().equals(CpuFamily.SPARC) &&
!hinfo.getCpuFamily().equals(CpuFamily.AARCH64)) {
// Unbuffer is available for x86 only
//and now for sparc linux
// and now for sparc and aarch64 linux
return;
}
break;
Expand Down
1 change: 1 addition & 0 deletions ide/dlight.nativeexecution/tools/Makefile
Expand Up @@ -31,6 +31,7 @@ CF_Linux-x86 = -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -m32
CF_Linux-x86_64 = -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -m64
CF_Linux-sparc_64 = -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -m64
CF_Linux-arm = -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -std=c99
CF_Linux-aarch64 = -DLINUX -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -std=c99
CF_MacOSX-x86 = -DMAXOSX -D_DARWIN_C_SOURCE -m32
CF_MacOSX-x86_64 = -DMAXOSX -D_DARWIN_C_SOURCE -m64
CF_SunOS-sparc_64 = -DSOLARIS -D__EXTENSIONS__ -m64
Expand Down

0 comments on commit 98957f7

Please sign in to comment.