headcrab-rs / headcrab

A modern Rust debugging library 🦀
https://headcrab.rs
Other
888 stars 32 forks source link

Use {:#016x?} for register printing #121

Closed bjorn3 closed 4 years ago

bjorn3 commented 4 years ago

The x causes all numbers to be formatted as hex. The # causes both an 0x prefix to be added to all hex numbers and the register struct to span multiple lines. The 016 causes all hex numbers to be zero padded to 16 chars.

Found this trick at http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeymoon/