Replies: 5 comments 5 replies
-
I think the instructions in Issue #6095 should fix this problem. That said, if it doesn't, let us know. The lldb executable usually has packaged versions for arm64 and x86_64. I believe it'll choose the correct one based on the target (but I could be wrong about that). If it doesn't, you'll probably end of debugging Rosetta, which, I'm sure, will not be a pleasant experience. Side note: any particular reason you're using the GADP variant? If both Ghidra and the target are local, I would recommend using the "IN-VM" version, just because it's easier to debug (and faster) than the GADP version. |
Beta Was this translation helpful? Give feedback.
-
Screen.Recording.2024-01-09.at.4.40.53.PM.movI feel like I'm getting closer, but I'm still not sure what I'm doing wrong. Running a sample executable works fine in lldb, but running it in the Ghidra debugger gives some strange output. |
Beta Was this translation helpful? Give feedback.
-
Yep, all the docs in that dir are related to the debugger and give a good bit more detail than the F1 Help pages. Keep us posted if you hit more issues. |
Beta Was this translation helpful? Give feedback.
-
@viktorb1 Sadly, I am on the road without a computer. Am going to let @nsadeveloper789 take this one, as he’s the expert on the course. |
Beta Was this translation helpful? Give feedback.
-
I'll admit, I've not tried the tutorial on macOS. While I knew we'd need some work to "port" it to Windows, I assumed little/no effort would be needed to "port" it to macOS. I don't know off the top of my head how Apple arranges its C runtime, though. A guess as to why the I don't think this is what's preventing the Note it's possible the toolchain static links the C runtime, so it may not have a module entry. If that's the case, this particular part of the tutorial will not apply. Instead, you'll need to find where in your executable the C runtime was placed. If it's applying some global optimizations, the linker might only include the subset of functions actually used by the executable. On the up side, those static-linked routines will already be mapped to the executable's Ghidra program database. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to debug an executable that is written in x86_64 on an arm64 M2 mac? If so, would you need to install the x86_64 jdk along with all the x86_64 dynamic libraries and basically set up x86_64 Ghidra to make it work? Currently, I have arm64 jdk installed and I ran buildNatives which likely installed all the arm64 binaries. However, when I try launching the program in the debugger using the "LLDB via GADP" option, I get a timeout with a "error: SBTarget is invalid". I suppose this is caused by incompatible architectures, although I am not sure because I am new to this. Any advice would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions