forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#119828 - azhogin:azhogin/collapse_debuginfo…
…_improved_attr, r=petrochenkov Improved collapse_debuginfo attribute, added command-line flag Improved attribute collapse_debuginfo with variants: `#[collapse_debuginfo=(no|external|yes)]`. Added command-line flag for default behaviour. Work-in-progress: will add more tests. cc rust-lang#100758
- Loading branch information
Showing
17 changed files
with
281 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// ignore-lldb | ||
#![feature(collapse_debuginfo)] | ||
|
||
// Test that local macro debug info is not collapsed with #[collapse_debuginfo(external)] | ||
|
||
// compile-flags:-g | ||
|
||
// === GDB TESTS =================================================================================== | ||
|
||
// gdb-command:run | ||
// gdb-command:next | ||
// gdb-command:frame | ||
// gdb-check:[...]#one_callsite[...] | ||
// gdb-command:continue | ||
|
||
fn one() { | ||
println!("one"); | ||
} | ||
|
||
#[collapse_debuginfo(external)] | ||
macro_rules! outer { | ||
() => { | ||
one(); // #one_callsite | ||
}; | ||
} | ||
|
||
fn main() { | ||
let ret = 0; // #break | ||
outer!(); | ||
std::process::exit(ret); | ||
} |
34 changes: 34 additions & 0 deletions
34
tests/debuginfo/collapse-debuginfo-external-flag-overriden-by-attr.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// ignore-lldb | ||
#![feature(collapse_debuginfo)] | ||
|
||
// Test that macro attribute #[collapse_debuginfo(no)] | ||
// overrides "collapse_macro_debuginfo=external" flag | ||
|
||
// compile-flags:-g -Z collapse_macro_debuginfo=external | ||
|
||
// === GDB TESTS =================================================================================== | ||
|
||
// gdb-command:run | ||
// gdb-command:next | ||
// gdb-command:frame | ||
// gdb-check:[...]#one_callsite[...] | ||
// gdb-command:next | ||
// gdb-command:frame | ||
// gdb-command:continue | ||
|
||
fn one() { | ||
println!("one"); | ||
} | ||
|
||
#[collapse_debuginfo(no)] | ||
macro_rules! outer { | ||
() => { | ||
one(); // #one_callsite | ||
}; | ||
} | ||
|
||
fn main() { | ||
let ret = 0; // #break | ||
outer!(); | ||
std::process::exit(ret); | ||
} |
Oops, something went wrong.