diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-02-21 20:21:50 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-03-06 12:28:38 -0500 |
| commit | 9e5def9616aba274a6c3138d9f66e778d50c35e0 (patch) | |
| tree | ea75e44389d8de50225c940509d7b4f592013d14 /src/test/debuginfo | |
| parent | 7f19f161f24c9a02ff8c3f73122d0b015039221f (diff) | |
| download | rust-9e5def9616aba274a6c3138d9f66e778d50c35e0.tar.gz rust-9e5def9616aba274a6c3138d9f66e778d50c35e0.zip | |
rust-lldb: fix crash when printing empty string
Diffstat (limited to 'src/test/debuginfo')
| -rw-r--r-- | src/test/debuginfo/empty-string.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/test/debuginfo/empty-string.rs b/src/test/debuginfo/empty-string.rs new file mode 100644 index 00000000000..8c5f67a6604 --- /dev/null +++ b/src/test/debuginfo/empty-string.rs @@ -0,0 +1,35 @@ +// ignore-windows failing on win32 bot +// ignore-android: FIXME(#10381) +// 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() {} |
