SeaQL / FireDBG.for.Rust

🔥 Time Travel Visual Debugger for Rust
https://firedbg.sea-ql.org
MIT License
1.21k stars 21 forks source link

Mapping vtable addresses to Rust type #35

Open tyt2y3 opened 6 months ago

tyt2y3 commented 6 months ago

Would love to have some ideas on the best way to map vtable addresses back to the original Rust types.

Say we have a Box<dyn MyTrait>, the goal is to lookup the original type info from the vtable address, and then use the type info to decode the data at the data address.

We can already do this for normal boxed types, because we trace allocations. Since there is no allocation for Zero Sized Types, this trick does not work.

Originally posted by @tyt2y3 in https://github.com/SeaQL/FireDBG.for.Rust/discussions/34