-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DbgHelp Symbols not available - 2nd attach - OpenJDK Windows #811
Comments
FrankSpierings
added a commit
to FrankSpierings/frida-java
that referenced
this issue
Jul 23, 2024
This change will make the `jvm.js` code be able to bridge Java OpenJDK 17 on Windows. This was tested on Windows 10, using `jdk-17.0.11+9` from https://learn.microsoft.com/en-gb/java/openjdk/download and the separately downloaded and extracted debug symbols. The code is not pretty, but I've tried to keep as close to the original as possible. Note the bug that I discovered while performing the tests; frida/frida-gum#811. This means that the target process needs to be restarted after detaching Frida, for the Java bridge (resolving of Symbols) to work. This code currently does not work with OpenJDK21! This code requires the 'manual' placement of the debug symbols, otherwise `jvm.ts` will be unable to find the functions it requires.
oleavr
pushed a commit
to frida/frida-java-bridge
that referenced
this issue
Aug 30, 2024
This change will make the jvm.js code be able to bridge Java OpenJDK 17 on Windows. This was tested on Windows 10, using jdk-17.0.11+9 from https://learn.microsoft.com/en-gb/java/openjdk/download and the separately downloaded and extracted debug symbols. The code is not pretty, but I've tried to keep it as close to the original as possible. Note that I discovered a bug while performing the tests; frida/frida-gum#811. This means that the target process needs to be restarted after detaching Frida, for the Java bridge (resolving of Symbols) to work. This code currently does not work with OpenJDK21! This code requires the 'manual' placement of the debug symbols, otherwise jvm.js will be unable to find the functions it requires.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
I was looking fixing the debugging of Windows based Java applications, using OpenJDK from Microsoft and the debugging symbols, available here; https://learn.microsoft.com/en-gb/java/openjdk/download.
While attempting to fix an issue where several methods won't be found by
frida-java-bridge
, I noticed thatDebugSymbol.findFunctionsMatching("*")
would not return anything, when attached to the same Java process a second time.Issue reproduction
HelloWorldGui.java
pdb
's) are placed next to the binaries)Attach to the process using Frida, run
DebugSymbol.findFunctionsMatching("*")
, this should result in a large list of ptr's. If not, the debug symbols are likely missing.Detach frida
Reattach frida and run
DebugSymbol.findFunctionsMatching("*")
. BUG HERE The list is now empty.Additional investigation
SymCleanup
from Frida, but this doen not appear to helpThe text was updated successfully, but these errors were encountered: