Skip to content
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

mac #6

Closed
lunxian8 opened this issue Jan 12, 2024 · 8 comments
Closed

mac #6

lunxian8 opened this issue Jan 12, 2024 · 8 comments

Comments

@lunxian8
Copy link

No such symbol:gHotSpotVMStructs

@apangin
Copy link
Owner

apangin commented Jan 13, 2024

Can you please elaborate on the problem you're seeing?
What OS / Architecture / Java version do you use?
What is the exact command you run?

@lunxian8
Copy link
Author

macos/jdk1.8.0_301/getSymbol("gHotSpotVMStructs")

error:No such symbol:gHotSpotVMStructs

code:

public long getSymbol(String name) {
long address = Symbols.lookup(name);
if (address == 0) {
throw new NoSuchElementException("No such symbol: " + name);
}
return getLong(address);
}

@lunxian8
Copy link
Author

"Thank you. These codes run without errors on both Windows and Linux systems. What I need to do is:

https://github.com/apangin/helfy/blob/master/test/one/helfy/DisableStructs.java"

@lunxian8
Copy link
Author

image image

@apangin
Copy link
Owner

apangin commented Jan 20, 2024

Thank you for the report. Indeed, libjvm.dylib does not export VMStructs symbols on macOS. However, they are still available as private symbols in a shared library. To read those symbols, one will need to implement a mach-O parser to find symbols directly in the dylib.

@lunxian8
Copy link
Author

Thank you for your response. This area is a knowledge gap for me, and I don't know how to implement it. Hehe

@apangin
Copy link
Owner

apangin commented Jan 23, 2024

I may provide some guidance/consultation if you wish.
I don't plan to implement this myself for free though, since this project (especially, macOS support) is not a priority right now.

@apangin apangin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2024
@lunxian8
Copy link
Author

Thank you very much! This is my personal learning project. Currently, macOS is not my development priority. I will focus on completing the code on Linux or Windows. Thank you for your guidance, and I will gradually address macOS support in my subsequent learning. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants