]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/lldb_rust_formatters.py
Rollup merge of #68504 - tmiasko:check-pass, r=alexcrichton
[rust.git] / src / etc / lldb_rust_formatters.py
index 2c651c90f82eb0fb9d618353fb972101ad48b519..fdc1c4fa0cc38d95d0f74e324b596dbcec729347 100644 (file)
@@ -290,6 +290,8 @@ def print_array_of_values(array_name, data_ptr_val, length, internal_dict):
 
 
 def read_utf8_string(ptr_val, byte_count):
+    if byte_count == 0:
+        return '""'
     error = lldb.SBError()
     process = ptr_val.get_wrapped_value().GetProcess()
     data = process.ReadMemory(ptr_val.as_integer(), byte_count, error)