Open Bug 1506009 Opened Last year Updated Last month
Rust source debugging does not work with Android Studio
When I looked into Bug 1505559. I tried to set break point in rust source code, but it did not work. Break point of C++ worked well. I set up Android Studio with the following url. https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_for_Android_build#Developing_Firefox_for_Android_in_Android_Studio
Michael, can you think of any reason this would be?
I'm going to forward this question to Tom, who knows the most about GDB and Rust. I could imagine it being some subtle problem with remote debugging?
Flags: needinfo?(mwoerister) → needinfo?(ttromey)
I need more details to know what the problem is. What version of gdb are you using; what exactly did you try; what were the results?
Android Studio uses lldb: lldb version 7.0.0 (https://us3-mirror-partner-android.googlesource.com/a/platform/external/lldb revision 3fcb389d934b423a1c88d0b83590b518f43b0c40) clang revision 4a4f14fd51a577b70a4c2464720a31fbf09a7bdf llvm revision 4df1b8f01ec06673f219d12d3b527f6a73cbc769 Basically, follow the instructions in the MDN link in comment 0 to set up Android Studio with an Android build, then try to set a breakpoint in rust code. It won't even let you set breakpoints (clicking in the gutter with the line numbers has no effect), whereas it works for C++. Also note that for C++ stuff to work well in both parent and content process you need to put this in your ~/.lldbinit: settings append target.exec-search-paths /home/kats/zspace/gecko-fennec/obj-android-debug/toolkit/library settings append target.exec-search-paths /home/kats/zspace/gecko-fennec/obj-android-debug/mozglue/build (replace paths as needed to patch your local objdir).
Flags: needinfo?(tom) → needinfo?(erahm)
Flags: needinfo?(erahm) → needinfo?(ktaeleman)
Flags: needinfo?(ktaeleman) → needinfo?(erahm)
You need to log in before you can comment on or make changes to this bug.