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#58629 - euclio:debug-empty-str, r=alexcrichton
rust-lldb: fix crash when printing empty string Fixes rust-lang#52185. ~Re-enables the pretty-std debuginfo test and tweaks the test as necessary to get it to pass again. This reveals that lldb's formatting of enums is broken (rust-lang#58492). I also removed the emoji from the test because I couldn't get the docker image's gdb to print the emoji, just octal escapes (https://github.com/rust-lang/rust/pull/53154/files#r208263904).~
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// compile-flags:-g | ||
// min-gdb-version: 7.7 | ||
// min-lldb-version: 310 | ||
|
||
// === GDB TESTS =================================================================================== | ||
|
||
// gdb-command: run | ||
|
||
// gdb-command: print empty_string | ||
// gdb-check:$1 = "" | ||
|
||
// gdb-command: print empty_str | ||
// gdb-check:$2 = "" | ||
|
||
// === LLDB TESTS ================================================================================== | ||
|
||
// lldb-command: run | ||
|
||
// lldb-command: fr v empty_string | ||
// lldb-check:[...]empty_string = "" | ||
|
||
// lldb-command: fr v empty_str | ||
// lldb-check:[...]empty_str = "" | ||
|
||
fn main() { | ||
let empty_string = String::new(); | ||
|
||
let empty_str = ""; | ||
|
||
zzz(); // #break | ||
} | ||
|
||
fn zzz() {} |