Debug the Java Sieve Project as native-image.#7
Open
JaroslavTulach wants to merge 1 commit intomasterfrom
Open
Debug the Java Sieve Project as native-image.#7JaroslavTulach wants to merge 1 commit intomasterfrom
JaroslavTulach wants to merge 1 commit intomasterfrom
Conversation
Collaborator
Author
|
Right now (with 4ffdc70) invoking Debug Project results in that's not fully correct. @entlicher how do you want to establish connection between |
Collaborator
Author
|
I am able to connect Java to import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import org.newsclub.net.unix.AFUNIXServerSocket;
import org.newsclub.net.unix.AFUNIXSocketAddress;
public final class SimpleTestServer {
public static void main(String[] args) throws IOException {
final File socketFile = new File(new File(System.getProperty("java.io.tmpdir")), "gdb.sock");
try (AFUNIXServerSocket server = AFUNIXServerSocket.newInstance()) {
server.bind(new AFUNIXSocketAddress(socketFile));
System.out.println("Server is waiting for connection: " + server);
try (Socket sock = server.accept()) {
try (InputStream is = sock.getInputStream(); //
OutputStream os = sock.getOutputStream()) {
os.write("run".getBytes("UTF-8"));
os.flush();
}
}
}
}
}and then the Java part can send $ socat /tmp/gdb.sock - | gdb target/sieveHowever I am not able to achieve the same without |
736a251 to
d2e9fc8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since d9a30a9 we are able to build and execute the generated

sievenative executable:Make sure the project is set to use GraalVM 20.3 with native-image exectable installed and that you select the native-image configuration in the toolbar choicebox.
After Build, or Clean and Build select Run and the native executable is going to be properly executed:

The question for the pull request is: Can we also get Debug working?
CCing @sdedic & @entlicher & @jlahoda