File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,8 @@ def render_element(i):
290
290
291
291
292
292
def read_utf8_string (ptr_val , byte_count ):
293
+ if byte_count == 0 :
294
+ return '""'
293
295
error = lldb .SBError ()
294
296
process = ptr_val .get_wrapped_value ().GetProcess ()
295
297
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
+ // ignore-android: FIXME(#10381)
3
+ // compile-flags:-g
4
+ // min-gdb-version: 7.7
5
+ // min-lldb-version: 310
6
+
7
+ // === GDB TESTS ===================================================================================
8
+
9
+ // gdb-command: run
10
+
11
+ // gdb-command: print empty_string
12
+ // gdb-check:$1 = ""
13
+
14
+ // gdb-command: print empty_str
15
+ // gdb-check:$2 = ""
16
+
17
+ // === LLDB TESTS ==================================================================================
18
+
19
+ // lldb-command: run
20
+
21
+ // lldb-command: fr v empty_string
22
+ // lldb-check:[...]empty_string = ""
23
+
24
+ // lldb-command: fr v empty_str
25
+ // lldb-check:[...]empty_str = ""
26
+
27
+ fn main ( ) {
28
+ let empty_string = String :: new ( ) ;
29
+
30
+ let empty_str = "" ;
31
+
32
+ zzz ( ) ; // #break
33
+ }
34
+
35
+ fn zzz ( ) { }
You can’t perform that action at this time.
0 commit comments