Skip to content

Rust and Seer

Ernie Pasveer edited this page Apr 29, 2023 · 2 revisions

Introduction

Rust is an up and coming language. Even Linus is adding it to the Linux kernel.

https://thenewstack.io/rust-in-the-linux-kernel/

Gdb's support for Rust has been improving rapidly.

https://rustc-dev-guide.rust-lang.org/debugging-support-in-rustc.html
https://sourceware.org/gdb/onlinedocs/gdb/Rust.html

Because gdb supports Rust, so does Seer. Here's a screenshot of Seer debugging a simple Rust program that uses threads.

image

Setting up Seer for Rust.

There's not much to do. Other than compiling your Rust program with debug turned on (-g), it is recommended to use the rust-gdb debugger instead of the regular gdb debugger. It handles some Rust-isms better than gdb.

Set Seer to use rust-gdb in Seer's config dialog -- Settings->Configuration

image

Make sure to save the new configuration.

Happy Rust debugging!

Feedback.

Send me email or create a task for errors/suggestions/etc.