]> git.lizzy.rs Git - rust.git/commit
auto merge of #10966 : michaelwoerister/rust/prelude2, r=cmr
authorbors <bors@rust-lang.org>
Mon, 16 Dec 2013 13:51:32 +0000 (05:51 -0800)
committerbors <bors@rust-lang.org>
Mon, 16 Dec 2013 13:51:32 +0000 (05:51 -0800)
commit4e77c1148f0cf702310e5c2cd85b369100ff8ec6
treedd7d008884af774da7cf69f424c3f271fa4adae4
parent7b424974531b0ade62e6a26cce038abf5dac0723
parent9384de77bbc8edf5e7c7c1a84e79cd29588cdee9
auto merge of #10966 : michaelwoerister/rust/prelude2, r=cmr

This PR improves the stepping experience in GDB. It contains some fine tuning of line information and makes *rustc* produce nearly the same IR/DWARF as Clang. The focus of the changes is function prologue handling which has caused some problems in the past (https://github.com/mozilla/rust/issues/9641).

It seems that GDB does not properly handle function prologues when the function uses segmented stacks, i.e. it does not recognize that the `__morestack` check is part of the prologue. When setting a breakpoint like `break foo` it will set the break point before the arguments of `foo()` have been loaded and still contain bogus values. For function with the #[no_split_stack] attribute this problem has never occurred for me so I'm pretty sure that segmented stacks are the cause of the problem. @jdm mentioned that segmented stack won't be completely abandoned after all. I'd be grateful if you could tell me about what the future might bring in this regard (@brson, @cmr).

Anyway, this PR should alleviate this problem at least in the case when setting breakpoints using line numbers and also make it less confusing when setting them via function names because then GDB will break *before* the first statement where one could conceivably argue that arguments need not be initialized yet.

Also, a koala: :koala:

Cheers,
Michael