rust-dev-tools / dev-tools-team

resources for the Rust dev-tools team
42 stars 9 forks source link

Debugging status and plan #3

Open nrc opened 7 years ago

nrc commented 7 years ago

What is the status of debugging Rust programs? How can we improve? Should include tools like profiling which are backed off debuginfo.

oli-obk commented 7 years ago

miri can be used to debug small programs at the MIR-level. It detects many cases of undefined behaviour. There's also cargo miri which runs miri on all #[test] functions in the library or in the test directory.

Manishearth commented 7 years ago

I and tromey maintain the gdb rust integration. I would like to work on lldb Rust, but I won't have time till stylo is over.

fitzgen commented 7 years ago

I think a lot of upstream work needs to funnel into gdb and lldb, I'm constantly running into papercuts using them.

Things like expression evaluation off a bit, setting a breakpoint on a not-fully-qualified function name (and dealing with the hash), etc. I'll try to jot them down as I run into them so that I have something more concrete here.

cc @tromey

Manishearth commented 7 years ago

The expression evaluation stuff keeps breaking because Rust keeps changing/breaking how it does paths in debuginfo.

tromey commented 7 years ago

Here's my plan: https://docs.google.com/document/d/1a2v0ro40vy3z-Np44CF-5v6THH9Huy_Dtp8-aUIdgkM/edit#heading=h.3bhlq7o1wouo

It links to the DWARF binding plan as well. This is what I want to work on, I'm just looking for the time and/or slot in Moz.

@fitzgen either file gdb bugs or just email me and I will file them for you. I work on the gdb rust bugs as time permits.

Manishearth commented 7 years ago

(cc me on them. I do have time to fix things in gdb. just not to go and do big heaps of work to make lldb work)

tromey commented 7 years ago

Try this instead, may only work at moz for now: https://docs.google.com/a/mozilla.com/document/d/1a2v0ro40vy3z-Np44CF-5v6THH9Huy_Dtp8-aUIdgkM/edit?usp=sharing