Added a pretty printer for &mut slices
This commit is contained in:
parent
7e07e31600
commit
036b08917d
@ -139,7 +139,7 @@ class Type(object):
|
||||
return TYPE_KIND_STR_SLICE
|
||||
|
||||
# REGULAR SLICE
|
||||
if (unqualified_type_name.startswith("&[") and
|
||||
if (unqualified_type_name.startswith(("&[", "&mut [")) and
|
||||
unqualified_type_name.endswith("]") and
|
||||
self.__conforms_to_field_layout(SLICE_FIELD_NAMES)):
|
||||
return TYPE_KIND_SLICE
|
||||
|
@ -53,6 +53,11 @@
|
||||
// gdb-command:print *((int64_t[2]*)('vec_slices::MUT_VECT_SLICE'.data_ptr))
|
||||
// gdb-check:$15 = {64, 65}
|
||||
|
||||
//gdb-command:print mut_slice.length
|
||||
//gdb-check:$16 = 5
|
||||
//gdb-command:print *((int64_t[5]*)(mut_slice.data_ptr))
|
||||
//gdb-check:$17 = {1, 2, 3, 4, 5}
|
||||
|
||||
|
||||
// === LLDB TESTS ==================================================================================
|
||||
|
||||
@ -106,6 +111,8 @@ fn main() {
|
||||
MUT_VECT_SLICE = VECT_SLICE;
|
||||
}
|
||||
|
||||
let mut_slice: &mut [i64] = &mut [1, 2, 3, 4, 5];
|
||||
|
||||
zzz(); // #break
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user