-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
launch a lldb session on jvm #3796
Comments
@brucejhju Have run the debugger an m1 mac, so this is definitely possible, but not sure I have enough context from your screen shot to diagnose the problem. If you can send along any of the error messages in the debugger console window or use ghidraDebug (in support) versus ghidraRun, that might help. A couple of things to suggest: have you read the instruction in Ghidra/Debug/Debugger-swig-lldb? they might help, although frankly i think you’d see a different error. if you are debugging a native (aarch64) executable, you need to be running as root or have debug privileges. the version of liblldb.dylib has to be roughly co-located with the lldb-server executable, but, for the system version, this should be true, as well. it might be good to add its location to LD_LIBRARY_PATH too. am unfortunately not near my computer, but, if you can get us a little more info, i can probably make a better guess. |
@d-millar Thank you for help millar. First, I have installed ghidra for homebrew and lldb is system version(mac default: i think it's included xcode-command-line-tools) currently. Second, I already had read and try the instruction in Ghidra/Debug/Debugger-swig-lldb. that's evidence with below picture about environment var. but, step(4) doesn't tried. Last, I found ghidraLog about error. hope to it will be helpful.
|
That helps! Given you are using version 13, you should not need to do step 2. For step 3, LLVM_BUILD should be set up a level, I think. The code is looking for bin/liblldb.dylib, so you may need to add a soft link. LLVM_HOME should have an “include” directory in it. If /opt/homebrew/Cellar/llvm/include doesn’t exist, you may need to point LLVM_HOME at the download source. Once you have both liblldb.dylib and liblldb-java.dylib, you will need to do step 4, so Ghidra knows where they are. Right now, Ghidra can’t find either (per your error log). Step 4 should fix that, once you have both. |
OK - guess I could have been clearer: Re (2), link /opt/homebrew/Cellar/llvm/13.0.0_2/bin/liblldb.dylib to /opt/homebrew/Cellar/llvm/13.0.0_2/lib/liblldb.13.0.0.dylib Re (3), LLVM_BUILD & LLVM_HOME should now be set to /opt/homebrew/Cellar/llvm/13.0.0_2. Re (4), you HAVE to do Step 4 (or the equivalent using LD_LIBRARY_PATH, which I’m not sure works), i.e -Djava.library.path=/opt/homebrew/Cellar/llvm/13.0.0_2/bin/liblldb.dylib:/path_to/Ghidra/Debug/Debugger-swig-lldb/build/os/macos…/liblldb-java.dylib |
I have some problem, when i tried gradle build in swig-lldb I can't search it in google. doesn't found solution.
|
If your “include” directory does not include that file, you need to “git clone” llvm and point LLVM_HOME at the root of that project. |
@j4hmilli Did you ever get this working? |
environment : m1 mac
question :
I have lldb on my mac but ghidra debugger can't connect to lldb, i spent a lot of time try on fix problem...
someone have solution? how i can run debugger with lldb on m1 mac
The text was updated successfully, but these errors were encountered: