Replies: 5 comments 29 replies
-
@moomoohk OK, so a couple of (hopefully) clarifying details up front: the host and port in "LLVM lldb local agent via GADP/TCP" are the host and port for connecting to the Ghidra agent wrapping the lldb interface (via JNI). They are NOT the host and port exported by debugserver. The use case requiring these entries is typically one in which you either (a) are worried about native methods crashing your Ghidra instance, or (b) debugging in an environment where lldb is not available locally. Have you built or imported lldb for Windows? If not, you'll need to either do so or run the agent a platform that supports lldb. Yell if this isn't clear. The host and port for debugserver should be specified using the standard way, i.e. "gdb-remote host:port" from the Interpreter window or use the options in "Connect to server..." (under Objects->Connectors) after launching either in IN-VM or GADP agents from Targets. |
Beta Was this translation helpful? Give feedback.
-
Well I can't believe it... I guess the final tip I need is how to connect to the debugserver running on my Mac. |
Beta Was this translation helpful? Give feedback.
-
You can also up the timeout value in Objects. |
Beta Was this translation helpful? Give feedback.
-
Hey I probably should have initially tried with a smaller binary... But indeed after setting the timeout to 20 minutes I did some other things while letting Ghidra (presumably) load symbols. When I came back after some time everything seemed to be working perfectly... Threads, modules, tree nodes, etc. were all loaded and responsive. I think my main takeaway and suggestion for improvement is that there should be better indication in the GUI that something is happening in the background. Re Re 1: I don't think the problem had to do with the newer version evidenced by everything working as intended. I think it's worth noting that Re Re 3: I closed that window ages ago, sorry... I don't recall seeing anything indicative about a process running in the background gumming up the works, or anything about symbols. Re Re 4: Great tip. Thanks. Re GDB over SSH: I actually got SSH to work fairly easily (enabling sshd on Macs is apparently super easy) but I'm working on a system process which requires super perms to attach to. This was probably the issue here. Since the SSH session starts in a user context it just wasn't possible to use this channel. Maybe consider piping in a super password to Re agent on Mac: Intel processor. The guide does include a troubleshooting tip in case the final binary doesn't show up however it didn't help (like I wrote above, played around with envars and nothing changed). Otherwise got no errors. Re Ghidra on Mac: LLDB was actually a breeze to compile (especially after the ordeal of compiling for Windows...). Ghidra was giving me some errors but since I seem to have gotten remote debugging to work, I don't have a reason to keep investigating. All in all, this was one hell of a nut to crack but we got there in the end :) |
Beta Was this translation helpful? Give feedback.
-
Hey, These settings seem extremely relevant to my issues with long symbol-loading times:
Caches go here:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm attempting to debug a process running a MacOS machine from my main Windows machine (where Ghidra is running).
On the Mac I've attached a debugger to the process using
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/debugserver <windows ip>:<port> --attach=<mac process name>
. This command seems to run fine and the debugger waits for incoming connections.In the Ghidra debugger I open the new debugger target dialog, select the "LLVM lldb local agent via GADP/TCP" option, fill in the address+port details and hit "Connect".
At this point I receive the following error:
The message is quite uninformative and even seems truncated such that I can't understand what the real issue is.
Help would be appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions