X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fetc%2Flldb_rust_formatters.py;h=fdc1c4fa0cc38d95d0f74e324b596dbcec729347;hb=cecffb63086407b06612b32667a52ba1e94b092c;hp=2c651c90f82eb0fb9d618353fb972101ad48b519;hpb=284e1a86c0e3e3aed269b5c545d3e9dc78bafa8a;p=rust.git diff --git a/src/etc/lldb_rust_formatters.py b/src/etc/lldb_rust_formatters.py index 2c651c90f82..fdc1c4fa0cc 100644 --- a/src/etc/lldb_rust_formatters.py +++ b/src/etc/lldb_rust_formatters.py @@ -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)