Alex Petrenko
2016-07-11 16:14:16 UTC
As far as I know, lldb supports automatic command execution when breakpoint
is hit (similar to gdb's commands).
Manual <http://lldb.llvm.org/tutorial.html> says it should work like this:
(lldb) breakpoint command add 1.1 Enter your debugger command(s). Type 'DONE' to end. > bt > DONE
This one should output backtrace each time when breakpoint 1.1 is hit. I am
trying to do the same thing in LLDB console in Android Studio 2.1.2:
(lldb) breakpoint list...8: file = '/home/user/src_file.cpp', line = 2683, exact_match = 0, locations = 1, resolved = 1, hit count = 1
8.1: where = libdroid_shared.so`(anonymous namespace)::onDbgThreadResume() + 20 at src_file.cpp:2683, address = 0x0000007f9cad6740, resolved, hit count = 1
(lldb) breakpoint command add 8.1(lldb) breakpoint command add 8.1(lldb)
As you can see, the debugger does not offer me to enter commands. When I
press Enter after breakpoint commmand add line it just outputs empty line,
and there's no command line prompt.
I tried both 32 and 64 bit debuggers, with different files, breakpoints and
apps, but it does not work. The same thing with gdb's commands works
perfectly.
My questions:
- Is this a known bug in Android Studio or lldb, is there a workaround?
- Maybe this is just a bug in Android Studio UI? Can I use lldb without
Android Studio, just the command line interface? How do I do that?
is hit (similar to gdb's commands).
Manual <http://lldb.llvm.org/tutorial.html> says it should work like this:
(lldb) breakpoint command add 1.1 Enter your debugger command(s). Type 'DONE' to end. > bt > DONE
This one should output backtrace each time when breakpoint 1.1 is hit. I am
trying to do the same thing in LLDB console in Android Studio 2.1.2:
(lldb) breakpoint list...8: file = '/home/user/src_file.cpp', line = 2683, exact_match = 0, locations = 1, resolved = 1, hit count = 1
8.1: where = libdroid_shared.so`(anonymous namespace)::onDbgThreadResume() + 20 at src_file.cpp:2683, address = 0x0000007f9cad6740, resolved, hit count = 1
(lldb) breakpoint command add 8.1(lldb) breakpoint command add 8.1(lldb)
As you can see, the debugger does not offer me to enter commands. When I
press Enter after breakpoint commmand add line it just outputs empty line,
and there's no command line prompt.
I tried both 32 and 64 bit debuggers, with different files, breakpoints and
apps, but it does not work. The same thing with gdb's commands works
perfectly.
My questions:
- Is this a known bug in Android Studio or lldb, is there a workaround?
- Maybe this is just a bug in Android Studio UI? Can I use lldb without
Android Studio, just the command line interface? How do I do that?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3200882f-eafb-4f28-98f9-8fa44368a9f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3200882f-eafb-4f28-98f9-8fa44368a9f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.