Hi I have rust-gdb and lldb installed in my linux OS, but I cannot successfully use them to debug rust program.
Here I list the details of the debug process, the rust-gdb is able to run, but failed to hit the correct break point, and the watched variables also not display;
And the lldb simply not runs, I think I should get a rust-lldb, but I can't find it from the installed rust package, or on the net, could anybody tell me where I can get that rust-lldb?
rust-gdb:
..Rust/hello/target/debug> cargo build
..Rust/hello/target/debug> rust-gdb hello
...
Reading symbols from hello...done.
(gdb) l main.rs:main
1 fn main() {
2 let mut ia;
3 for i in 0..10 {
4 ia = i;
5 println!("Hello{}!", ia);
6 }
7 }
(gdb) b 3
Breakpoint 1 at 0x5ecb: ../Rust/hello/src/main.rs:3. (2 locations)
(gdb) b 4
Breakpoint 2 at 0x5f97: file ../Rust/hello/src/main.rs, line 4.
(gdb) run
Starting program: ../Rust/hello/target/debug/hello
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.19-22.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, hello::main ()
at /../Rust/hello/src/main.rs:3
3 for i in 0..10 {
Missing separate debuginfos, use: zypper install libgcc_s1-debuginfo-5.3.1+r233831-6.1.x86_64
(gdb) c
Continuing.
Breakpoint 1, hello::main ()
at /../Rust/hello/src/main.rs:3
3 for i in 0..10 {
(gdb) c
Continuing.
Breakpoint 2, hello::main ()
at /../Rust/hello/src/main.rs:5
5 println!("Hello{}!", ia);
(gdb) watch ia
Hardware watchpoint 3: ia
(gdb) c
Continuing.
Hello0!
Breakpoint 1, hello::main ()
at /../Rust/hello/src/main.rs:3
3 for i in 0..10 {
(gdb) c
Continuing.
Breakpoint 2, hello::main ()
at ../Rust/hello/src/main.rs:5
5 println!("Hello{}!", ia);
lldb:
...Rust/hello/target/debug> lldb hello
(lldb) target create "hello"
Current executable set to 'hello' (x86_64).
(lldb) l
1 fn main() {
2 let mut ia;
3 for i in 0..10 {
4 ia = i;
5 println!("Hello{}!", ia);
6 }
7 }
(lldb) run
// Nothing more display here