diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgServerProcessManager.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgServerProcessManager.java
index 23a2513fcc..f641625a0b 100644
--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgServerProcessManager.java
+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dmg/DmgServerProcessManager.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -240,7 +240,7 @@ class DmgServerProcessManager implements Closeable {
String java =
System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
- // optional: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=18200
+ // optional: -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=18200
try {
Process p = Runtime.getRuntime().exec(
new String[] { java, "-classpath", classPath, "-Xmx" + dmgServerMemoryMB + "m", //need more memory to load and xfer data across pipe
diff --git a/Ghidra/Processors/SuperH/certification.manifest b/Ghidra/Processors/SuperH/certification.manifest
index 96eadcbbbf..5653da4619 100644
--- a/Ghidra/Processors/SuperH/certification.manifest
+++ b/Ghidra/Processors/SuperH/certification.manifest
@@ -9,3 +9,4 @@ data/languages/superh.ldefs||GHIDRA||||END|
data/languages/superh.pspec||GHIDRA||||END|
data/languages/superh.sinc||GHIDRA||||END|
data/languages/superh2a.cspec||GHIDRA||||END|
+data/manuals/superh.idx||GHIDRA||||END|
diff --git a/Ghidra/Processors/SuperH/data/languages/superh.ldefs b/Ghidra/Processors/SuperH/data/languages/superh.ldefs
index c105dbd35f..4daaca9598 100644
--- a/Ghidra/Processors/SuperH/data/languages/superh.ldefs
+++ b/Ghidra/Processors/SuperH/data/languages/superh.ldefs
@@ -8,6 +8,7 @@
version="1.0"
slafile="sh-2a.sla"
processorspec="superh.pspec"
+ manualindexfile="../manuals/superh.idx"
id="SuperH:BE:32:SH-2A">
SuperH SH-2A processor 32-bit big-endian
@@ -19,6 +20,7 @@
version="1.0"
slafile="sh-2.sla"
processorspec="superh.pspec"
+ manualindexfile="../manuals/superh.idx"
id="SuperH:BE:32:SH-2">
SuperH SH-2 processor 32-bit big-endian
@@ -30,6 +32,7 @@
version="1.0"
slafile="sh-1.sla"
processorspec="superh.pspec"
+ manualindexfile="../manuals/superh.idx"
id="SuperH:BE:32:SH-1">
SuperH SH-1 processor 32-bit big-endian
diff --git a/Ghidra/Processors/SuperH/data/manuals/superh.idx b/Ghidra/Processors/SuperH/data/manuals/superh.idx
new file mode 100644
index 0000000000..31825e1360
--- /dev/null
+++ b/Ghidra/Processors/SuperH/data/manuals/superh.idx
@@ -0,0 +1,95 @@
+@ h12p0.pdf[SuperH RISC Engine SH-1/SH-2 Programming Manual September 3, 1996]
+add, 64
+addc, 65
+addv, 66
+and, 67
+and.b, 67
+bf, 69
+bf/s, 70
+bra, 72
+braf, 74
+bsr, 76
+bsrf, 78
+bt, 79
+bt/s, 80
+clrmac, 82
+clrt, 83
+cmp/eq, 84
+cmp/ge, 84
+cmp/gt, 84
+cmp/hi, 84
+cmp/hs, 84
+cmp/pl, 84
+cmp/pz, 84
+cmp/str, 84
+div0s, 88
+div0u, 89
+div1, 90
+dmuls.l, 95
+dmulu.l, 97
+dt, 99
+exts.b, 100
+exts.w, 100
+extu.b, 101
+extu.w, 101
+jmp, 102
+jsr, 103
+ldc, 105
+ldc.l, 105
+lds, 107
+lds.l, 107
+mac.l, 109
+mac, 112
+mac.w, 113
+mov, 116
+mov.b, 116
+mov.w, 116
+mov.l, 116
+mova, 129
+movt, 130
+mul.l, 131
+muls.w, 132
+mulu.w, 133
+neg, 134
+negc, 135
+nop, 136
+not, 137
+or, 138
+or.b, 138
+rotcl, 140
+rotcr, 141
+rotl, 142
+rotr, 143
+rte, 144
+rts, 145
+sett, 147
+shal, 148
+shar, 149
+shll, 150
+shll2, 151
+shll8, 151
+shll16, 151
+shlr, 153
+shlr2, 154
+shlr8, 154
+shlr16, 154
+sleep, 156
+stc, 157
+stc.l, 157
+sts, 159
+sts.l, 159
+sub, 161
+subc, 162
+subv, 163
+swap, 164
+swap.b, 164
+swap.w, 164
+tas, 165
+tas.b, 165
+trapa, 166
+tst, 167
+tst.b, 167
+xor, 169
+xor.b, 169
+xtrct, 171
+
diff --git a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/ServerTestUtil.java b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/ServerTestUtil.java
index 207a3973fb..0f4bb42519 100644
--- a/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/ServerTestUtil.java
+++ b/Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/remote/ServerTestUtil.java
@@ -17,6 +17,8 @@ package ghidra.server.remote;
import java.io.*;
import java.net.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.security.KeyStore.PrivateKeyEntry;
@@ -27,6 +29,7 @@ import java.util.zip.ZipInputStream;
import javax.rmi.ssl.SslRMIClientSocketFactory;
+import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.RandomStringUtils;
import db.buffers.DataBuffer;
@@ -99,6 +102,7 @@ public class ServerTestUtil {
private static IOThread cmdErr;
private static Process serverProcess;
private static String serverRepositories;
+ private static Path argsFile;
static {
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
@@ -435,19 +439,15 @@ public class ServerTestUtil {
getTestPkiCACertsPath());
DefaultSSLContextInitializer.initialize(true);
- ArrayList argList = new ArrayList<>();
String javaCommand =
System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
- argList.add(javaCommand);
+ List argList = new ArrayList<>();
argList.add("-cp");
- argList.add(System.getProperty("java.class.path"));
+ argList.add("\"" + System.getProperty("java.class.path").replace("\\", "/") + "\"");
argList.add("-Xmx512M");
- argList.add("-Xdebug");
- argList.add("-Xnoagent");
- argList.add("-Djava.compiler=NONE");
argList.add("-Ddb.buffers.DataBuffer.compressedOutput=" + enableCompressionOnServerStart);
argList.add("-D" + DefaultTrustManagerFactory.GHIDRA_CACERTS_PATH_PROPERTY + "=" +
getTestPkiCACertsPath());
@@ -483,25 +483,15 @@ public class ServerTestUtil {
argList.add("-p" + port);
argList.add(dirPath);
- String[] args = new String[argList.size()];
- argList.toArray(args);
-
- System.out.println();
- for (String arg : argList) {
- boolean includeQuotes = arg.indexOf(' ') != -1;
- if (includeQuotes) {
- System.out.print("'");
- }
- System.out.print(arg);
- if (includeQuotes) {
- System.out.print("'");
- }
- System.out.print(" ");
- }
- System.out.println();
try {
- serverProcess = Runtime.getRuntime().exec(args);
+ // Command line argument is too long on Windows, so use an @arg-file
+ argsFile =
+ Files.createTempFile(Application.getUserTempDirectory().toPath(), "args", ".txt");
+ Files.write(argsFile, argList);
+ System.out.println(javaCommand + " \"@" + argsFile + "\"");
+
+ serverProcess = new ProcessBuilder(javaCommand, "@" + argsFile).start();
serverRepositories = dirPath;
cmdOut = new IOThread(serverProcess.getInputStream());
@@ -658,8 +648,24 @@ public class ServerTestUtil {
serverRepositories = null;
if (testPkiDirectory != null) {
- FileUtilities.deleteDir(testPkiDirectory);
- testPkiDirectory = null;
+ try {
+ FileUtils.deleteDirectory(testPkiDirectory);
+ }
+ catch (IOException e) {
+ // Will likely be an error the next time the test starts
+ e.printStackTrace();
+ }
+ finally {
+ testPkiDirectory = null;
+ }
+ }
+ }
+ if (argsFile != null && Files.exists(argsFile)) {
+ try {
+ Files.delete(argsFile);
+ }
+ catch (IOException e) {
+ // don't care
}
}
}