]> git.lizzy.rs Git - rust.git/commit
rollup merge of #19954: michaelwoerister/rust-gdb
authorAlex Crichton <alex@alexcrichton.com>
Wed, 31 Dec 2014 00:25:44 +0000 (16:25 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 31 Dec 2014 00:25:44 +0000 (16:25 -0800)
commitfe64ff1104298d0102da05eed1242516c2c4d955
tree4efaf2e990213a5b077936e2d238c29e371e8c8a
parent84f5ad8679c7fc454473ffbf389030f3e5fee379
parent91a0e18866d143c045e9e29377a6e918011c0b63
rollup merge of #19954: michaelwoerister/rust-gdb

This pull request adds the `rust-gdb` shell script which starts GDB with Rust pretty printers enabled. The PR also makes `rustc` add a special `.debug_gdb_scripts` ELF section on Linux which tells GDB that the produced binary should use the Rust pretty printers.

Note that at the moment this script will only work and be installed on Linux. On Mac OS X there's `rust-lldb` which works much better there. On Windows I had too many problems making this stable. I'll give it another try soonish.

You can use this script just like you would use GDB from the command line. It will use the pretty printers from the Rust "installation" found first in PATH. E.g. if you have `~/rust/x86_64-linux-gnu/stage1/bin` in your path, it will use the pretty printer scripts in `~/rust/x86_64-linux-gnu/stage1/lib/rustlib/etc`.
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/debuginfo.rs