File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,8 @@ def render_element(i):
290290
291291
292292def read_utf8_string (ptr_val , byte_count ):
293+ if byte_count == 0 :
294+ return '""'
293295 error = lldb .SBError ()
294296 process = ptr_val .get_wrapped_value ().GetProcess ()
295297 data = process .ReadMemory (ptr_val .as_integer (), byte_count , error )
Original file line number Diff line number Diff line change 1+ // ignore-windows failing on win32 bot
2+ // compile-flags:-g
3+ // min-gdb-version: 7.7
4+ // min-lldb-version: 310
5+
6+ // === GDB TESTS ===================================================================================
7+
8+ // gdb-command: run
9+
10+ // gdb-command: print empty_string
11+ // gdb-check:$1 = ""
12+
13+ // gdb-command: print empty_str
14+ // gdb-check:$2 = ""
15+
16+ // === LLDB TESTS ==================================================================================
17+
18+ // lldb-command: run
19+
20+ // lldb-command: fr v empty_string
21+ // lldb-check:[...]empty_string = ""
22+
23+ // lldb-command: fr v empty_str
24+ // lldb-check:[...]empty_str = ""
25+
26+ fn main ( ) {
27+ let empty_string = String :: new ( ) ;
28+
29+ let empty_str = "" ;
30+
31+ zzz ( ) ; // #break
32+ }
33+
34+ fn zzz ( ) { }
You can’t perform that action at this time.
0 commit comments