O'Reilly logo

Mastering Rust by Vesa Kaihlavirta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exercises

  1. Try the explore command of gdb. How does it differ from print?
  2. Try the step command in gdb or lldb. How is it different? What happens between the function calls?
  3. Both gdb and lldb support attaching to a running process. Make a program that doesn't quit, perhaps an erroneous never-ending loop, then attach to it via rust-gdb or rust-lldb and see what happens.
  4. Could you fix a program running in production by attaching to it? What prerequisites need to be fulfilled beforehand?
  5. Check out the disassembler command in either of the debuggers.
  6. If Visual Code Studio isn't your preferred editor, try to find out if your favorite one has debugger integration for Rust.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required