Add a name for tuple fields in debuginfo so that they can be accessed in debuggers.
This commit is contained in:
parent
feeb23d42e
commit
03f9269496
|
@ -9,6 +9,7 @@
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
import gdb
|
import gdb
|
||||||
|
import re
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
# GDB Pretty Printing Module for Rust
|
# GDB Pretty Printing Module for Rust
|
||||||
|
@ -299,12 +300,12 @@ def classify_struct(type):
|
||||||
if fields[0].name == "RUST$ENUM$DISR":
|
if fields[0].name == "RUST$ENUM$DISR":
|
||||||
if field_count == 1:
|
if field_count == 1:
|
||||||
return STRUCT_KIND_CSTYLE_VARIANT
|
return STRUCT_KIND_CSTYLE_VARIANT
|
||||||
elif fields[1].name is None:
|
elif all_fields_conform_to_tuple_field_naming(fields, 1):
|
||||||
return STRUCT_KIND_TUPLE_VARIANT
|
return STRUCT_KIND_TUPLE_VARIANT
|
||||||
else:
|
else:
|
||||||
return STRUCT_KIND_STRUCT_VARIANT
|
return STRUCT_KIND_STRUCT_VARIANT
|
||||||
|
|
||||||
if fields[0].name is None:
|
if all_fields_conform_to_tuple_field_naming(fields, 0):
|
||||||
if type.tag.startswith("("):
|
if type.tag.startswith("("):
|
||||||
return STRUCT_KIND_TUPLE
|
return STRUCT_KIND_TUPLE
|
||||||
else:
|
else:
|
||||||
|
@ -325,7 +326,6 @@ def first_field(val):
|
||||||
for field in val.type.fields():
|
for field in val.type.fields():
|
||||||
return field
|
return field
|
||||||
|
|
||||||
|
|
||||||
def get_field_at_index(val, index):
|
def get_field_at_index(val, index):
|
||||||
i = 0
|
i = 0
|
||||||
for field in val.type.fields():
|
for field in val.type.fields():
|
||||||
|
@ -334,6 +334,12 @@ def get_field_at_index(val, index):
|
||||||
i += 1
|
i += 1
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def all_fields_conform_to_tuple_field_naming(fields, start_index):
|
||||||
|
for i in range(start_index, len(fields)):
|
||||||
|
if (fields[i].name is None) or (re.match(r"__\d+$", fields[i].name) is None):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def extract_length_and_data_ptr_from_std_vec(vec_val):
|
def extract_length_and_data_ptr_from_std_vec(vec_val):
|
||||||
length = int(vec_val["len"])
|
length = int(vec_val["len"])
|
||||||
vec_ptr_val = vec_val["ptr"]
|
vec_ptr_val = vec_val["ptr"]
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
import lldb
|
import lldb
|
||||||
|
import re
|
||||||
|
|
||||||
def print_val(val, internal_dict):
|
def print_val(val, internal_dict):
|
||||||
'''Prints the given value with Rust syntax'''
|
'''Prints the given value with Rust syntax'''
|
||||||
|
@ -61,14 +61,14 @@ def print_struct_val_starting_from(field_start_index, val, internal_dict):
|
||||||
# The only field of this struct is the enum discriminant
|
# The only field of this struct is the enum discriminant
|
||||||
return type_name
|
return type_name
|
||||||
|
|
||||||
has_field_names = type_has_field_names(t)
|
is_tuple_like = type_is_tuple_like(t)
|
||||||
|
|
||||||
if has_field_names:
|
if is_tuple_like:
|
||||||
template = "%(type_name)s {\n%(body)s\n}"
|
|
||||||
separator = ", \n"
|
|
||||||
else:
|
|
||||||
template = "%(type_name)s(%(body)s)"
|
template = "%(type_name)s(%(body)s)"
|
||||||
separator = ", "
|
separator = ", "
|
||||||
|
else:
|
||||||
|
template = "%(type_name)s {\n%(body)s\n}"
|
||||||
|
separator = ", \n"
|
||||||
|
|
||||||
if type_name.startswith("("):
|
if type_name.startswith("("):
|
||||||
# this is a tuple, so don't print the type name
|
# this is a tuple, so don't print the type name
|
||||||
|
@ -76,7 +76,7 @@ def print_struct_val_starting_from(field_start_index, val, internal_dict):
|
||||||
|
|
||||||
def render_child(child_index):
|
def render_child(child_index):
|
||||||
this = ""
|
this = ""
|
||||||
if has_field_names:
|
if not is_tuple_like:
|
||||||
field_name = t.GetFieldAtIndex(child_index).GetName()
|
field_name = t.GetFieldAtIndex(child_index).GetName()
|
||||||
this += field_name + ": "
|
this += field_name + ": "
|
||||||
|
|
||||||
|
@ -233,13 +233,15 @@ def extract_type_name(qualified_type_name):
|
||||||
return qualified_type_name[index + 2:]
|
return qualified_type_name[index + 2:]
|
||||||
|
|
||||||
|
|
||||||
def type_has_field_names(ty):
|
def type_is_tuple_like(ty):
|
||||||
'''Returns true of this is a type with field names (struct, struct-like enum variant)'''
|
'''Returns true of this is a type with field names (struct, struct-like enum variant)'''
|
||||||
# This may also be an enum variant where the first field doesn't have a name but the rest has
|
for field in ty.fields:
|
||||||
if ty.GetNumberOfFields() > 1:
|
if field.GetName() == "RUST$ENUM$DISR":
|
||||||
return ty.GetFieldAtIndex(1).GetName() is not None
|
# Ignore the enum discriminant field if there is one.
|
||||||
else:
|
continue
|
||||||
return ty.GetFieldAtIndex(0).GetName() is not None
|
if (field.GetName() is None) or (re.match(r"__\d+$", field.GetName()) is None):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def is_vec_slice(val):
|
def is_vec_slice(val):
|
||||||
|
|
|
@ -2029,7 +2029,7 @@ impl<'tcx> StructMemberDescriptionFactory<'tcx> {
|
||||||
|
|
||||||
self.fields.iter().enumerate().map(|(i, field)| {
|
self.fields.iter().enumerate().map(|(i, field)| {
|
||||||
let name = if field.name == special_idents::unnamed_field.name {
|
let name = if field.name == special_idents::unnamed_field.name {
|
||||||
"".to_string()
|
format!("__{}", i)
|
||||||
} else {
|
} else {
|
||||||
token::get_name(field.name).to_string()
|
token::get_name(field.name).to_string()
|
||||||
};
|
};
|
||||||
|
@ -2107,9 +2107,12 @@ struct TupleMemberDescriptionFactory<'tcx> {
|
||||||
impl<'tcx> TupleMemberDescriptionFactory<'tcx> {
|
impl<'tcx> TupleMemberDescriptionFactory<'tcx> {
|
||||||
fn create_member_descriptions<'a>(&self, cx: &CrateContext<'a, 'tcx>)
|
fn create_member_descriptions<'a>(&self, cx: &CrateContext<'a, 'tcx>)
|
||||||
-> Vec<MemberDescription> {
|
-> Vec<MemberDescription> {
|
||||||
self.component_types.iter().map(|&component_type| {
|
self.component_types
|
||||||
|
.iter()
|
||||||
|
.enumerate()
|
||||||
|
.map(|(i, &component_type)| {
|
||||||
MemberDescription {
|
MemberDescription {
|
||||||
name: "".to_string(),
|
name: format!("__{}", i),
|
||||||
llvm_type: type_of::type_of(cx, component_type),
|
llvm_type: type_of::type_of(cx, component_type),
|
||||||
type_metadata: type_metadata(cx, component_type, self.span),
|
type_metadata: type_metadata(cx, component_type, self.span),
|
||||||
offset: ComputedMemberOffset,
|
offset: ComputedMemberOffset,
|
||||||
|
@ -2262,7 +2265,7 @@ impl<'tcx> EnumMemberDescriptionFactory<'tcx> {
|
||||||
let sole_struct_member_description = MemberDescription {
|
let sole_struct_member_description = MemberDescription {
|
||||||
name: match non_null_variant.arg_names {
|
name: match non_null_variant.arg_names {
|
||||||
Some(ref names) => token::get_name(names[0]).to_string(),
|
Some(ref names) => token::get_name(names[0]).to_string(),
|
||||||
None => "".to_string()
|
None => "__0".to_string()
|
||||||
},
|
},
|
||||||
llvm_type: non_null_llvm_type,
|
llvm_type: non_null_llvm_type,
|
||||||
type_metadata: non_null_type_metadata,
|
type_metadata: non_null_type_metadata,
|
||||||
|
@ -2432,7 +2435,13 @@ fn describe_enum_variant<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
|
||||||
.map(|&name| token::get_name(name).to_string())
|
.map(|&name| token::get_name(name).to_string())
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
None => variant_info.args.iter().map(|_| "".to_string()).collect()
|
None => {
|
||||||
|
variant_info.args
|
||||||
|
.iter()
|
||||||
|
.enumerate()
|
||||||
|
.map(|(i, _)| format!("__{}", i))
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// If this is not a univariant enum, there is also the discriminant field.
|
// If this is not a univariant enum, there is also the discriminant field.
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print arg
|
// gdb-command:print arg
|
||||||
// gdb-check:$5 = {4, 5}
|
// gdb-check:$5 = {__0 = 4, __1 = 5}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print a
|
// gdb-command:print a
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print *the_a_ref
|
// gdb-command:print *the_a_ref
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, 0, 2088533116, 2088533116}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, __0 = 0, __1 = 2088533116, __2 = 2088533116}}
|
||||||
|
|
||||||
// gdb-command:print *the_b_ref
|
// gdb-command:print *the_b_ref
|
||||||
// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, 0, 286331153, 286331153}}
|
// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, __0 = 0, __1 = 286331153, __2 = 286331153}}
|
||||||
|
|
||||||
// gdb-command:print *univariant_ref
|
// gdb-command:print *univariant_ref
|
||||||
// gdb-check:$3 = {{4820353753753434}}
|
// gdb-check:$3 = {{__0 = 4820353753753434}}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print *stack_val_ref
|
// gdb-command:print *stack_val_ref
|
||||||
// gdb-check:$1 = {-14, -19}
|
// gdb-check:$1 = {__0 = -14, __1 = -19}
|
||||||
|
|
||||||
// gdb-command:print *ref_to_unnamed
|
// gdb-command:print *ref_to_unnamed
|
||||||
// gdb-check:$2 = {-15, -20}
|
// gdb-check:$2 = {__0 = -15, __1 = -20}
|
||||||
|
|
||||||
// gdb-command:print *unique_val_ref
|
// gdb-command:print *unique_val_ref
|
||||||
// gdb-check:$3 = {-17, -22}
|
// gdb-check:$3 = {__0 = -17, __1 = -22}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// gdb-command:print *a
|
// gdb-command:print *a
|
||||||
// gdb-check:$1 = 1
|
// gdb-check:$1 = 1
|
||||||
// gdb-command:print *b
|
// gdb-command:print *b
|
||||||
// gdb-check:$2 = {2, 3.5}
|
// gdb-check:$2 = {__0 = 2, __1 = 3.5}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -30,15 +30,15 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print a
|
// gdb-command:print a
|
||||||
// gdb-check:$5 = {7, 8, 9.5, 10.5}
|
// gdb-check:$5 = {__0 = 7, __1 = 8, __2 = 9.5, __3 = 10.5}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print a
|
// gdb-command:print a
|
||||||
// gdb-check:$6 = {11.5, 12.5, 13, 14}
|
// gdb-check:$6 = {__0 = 11.5, __1 = 12.5, __2 = 13, __3 = 14}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print x
|
// gdb-command:print x
|
||||||
// gdb-check:$7 = {{RUST$ENUM$DISR = Case1, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = Case1, 0, 2088533116, 2088533116}}
|
// gdb-check:$7 = {{RUST$ENUM$DISR = Case1, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 2088533116, __2 = 2088533116}}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$3 = {4444.5, 5555, 6666, 7777.5}
|
// gdb-check:$3 = {__0 = 4444.5, __1 = 5555, __2 = 6666, __3 = 7777.5}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print tuple_interior_padding
|
// gdb-command:print tuple_interior_padding
|
||||||
// gdb-check:$1 = {0, OneHundred}
|
// gdb-check:$1 = {__0 = 0, __1 = OneHundred}
|
||||||
|
|
||||||
// gdb-command:print tuple_padding_at_end
|
// gdb-command:print tuple_padding_at_end
|
||||||
// gdb-check:$2 = {{1, OneThousand}, 2}
|
// gdb-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2}
|
||||||
|
|
||||||
// gdb-command:print tuple_different_enums
|
// gdb-command:print tuple_different_enums
|
||||||
// gdb-check:$3 = {OneThousand, MountainView, OneMillion, Vienna}
|
// gdb-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna}
|
||||||
|
|
||||||
// gdb-command:print padded_struct
|
// gdb-command:print padded_struct
|
||||||
// gdb-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
|
// gdb-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5}
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
// gdb-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
|
// gdb-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto}
|
||||||
|
|
||||||
// gdb-command:print struct_with_drop
|
// gdb-command:print struct_with_drop
|
||||||
// gdb-check:$7 = {{a = OneHundred, b = Vienna}, 9}
|
// gdb-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -25,7 +25,7 @@ extern crate cross_crate_spans;
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print result
|
// gdb-command:print result
|
||||||
// gdb-check:$1 = {17, 17}
|
// gdb-check:$1 = {__0 = 17, __1 = 17}
|
||||||
// gdb-command:print a_variable
|
// gdb-command:print a_variable
|
||||||
// gdb-check:$2 = 123456789
|
// gdb-check:$2 = 123456789
|
||||||
// gdb-command:print another_variable
|
// gdb-command:print another_variable
|
||||||
|
@ -33,7 +33,7 @@ extern crate cross_crate_spans;
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print result
|
// gdb-command:print result
|
||||||
// gdb-check:$4 = {1212, 1212}
|
// gdb-check:$4 = {__0 = 1212, __1 = 1212}
|
||||||
// gdb-command:print a_variable
|
// gdb-command:print a_variable
|
||||||
// gdb-check:$5 = 123456789
|
// gdb-check:$5 = 123456789
|
||||||
// gdb-command:print another_variable
|
// gdb-command:print another_variable
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
// gdb-command:print a
|
// gdb-command:print a
|
||||||
// gdb-check:$6 = 5
|
// gdb-check:$6 = 5
|
||||||
// gdb-command:print b
|
// gdb-command:print b
|
||||||
// gdb-check:$7 = {6, 7}
|
// gdb-check:$7 = {__0 = 6, __1 = 7}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print h
|
// gdb-command:print h
|
||||||
|
@ -95,11 +95,11 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print aa
|
// gdb-command:print aa
|
||||||
// gdb-check:$30 = {34, 35}
|
// gdb-check:$30 = {__0 = 34, __1 = 35}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print bb
|
// gdb-command:print bb
|
||||||
// gdb-check:$31 = {36, 37}
|
// gdb-check:$31 = {__0 = 36, __1 = 37}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print cc
|
// gdb-command:print cc
|
||||||
|
@ -107,17 +107,17 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print dd
|
// gdb-command:print dd
|
||||||
// gdb-check:$33 = {40, 41, 42}
|
// gdb-check:$33 = {__0 = 40, __1 = 41, __2 = 42}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print *ee
|
// gdb-command:print *ee
|
||||||
// gdb-check:$34 = {43, 44, 45}
|
// gdb-check:$34 = {__0 = 43, __1 = 44, __2 = 45}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print *ff
|
// gdb-command:print *ff
|
||||||
// gdb-check:$35 = 46
|
// gdb-check:$35 = 46
|
||||||
// gdb-command:print gg
|
// gdb-command:print gg
|
||||||
// gdb-check:$36 = {47, 48}
|
// gdb-check:$36 = {__0 = 47, __1 = 48}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print *hh
|
// gdb-command:print *hh
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print simple_tuple_ident
|
// gdb-command:print simple_tuple_ident
|
||||||
// gdb-check:$24 = {34903493, 232323}
|
// gdb-check:$24 = {__0 = 34903493, __1 = 232323}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
// gdb-command:print f
|
// gdb-command:print f
|
||||||
// gdb-check:$6 = 5
|
// gdb-check:$6 = 5
|
||||||
// gdb-command:print g
|
// gdb-command:print g
|
||||||
// gdb-check:$7 = {6, 7}
|
// gdb-check:$7 = {__0 = 6, __1 = 7}
|
||||||
|
|
||||||
// gdb-command:print h
|
// gdb-command:print h
|
||||||
// gdb-check:$8 = 8
|
// gdb-check:$8 = 8
|
||||||
|
@ -85,25 +85,25 @@
|
||||||
// gdb-check:$29 = 33
|
// gdb-check:$29 = 33
|
||||||
|
|
||||||
// gdb-command:print aa
|
// gdb-command:print aa
|
||||||
// gdb-check:$30 = {34, 35}
|
// gdb-check:$30 = {__0 = 34, __1 = 35}
|
||||||
|
|
||||||
// gdb-command:print bb
|
// gdb-command:print bb
|
||||||
// gdb-check:$31 = {36, 37}
|
// gdb-check:$31 = {__0 = 36, __1 = 37}
|
||||||
|
|
||||||
// gdb-command:print cc
|
// gdb-command:print cc
|
||||||
// gdb-check:$32 = 38
|
// gdb-check:$32 = 38
|
||||||
|
|
||||||
// gdb-command:print dd
|
// gdb-command:print dd
|
||||||
// gdb-check:$33 = {40, 41, 42}
|
// gdb-check:$33 = {__0 = 40, __1 = 41, __2 = 42}
|
||||||
|
|
||||||
// gdb-command:print *ee
|
// gdb-command:print *ee
|
||||||
// gdb-check:$34 = {43, 44, 45}
|
// gdb-check:$34 = {__0 = 43, __1 = 44, __2 = 45}
|
||||||
|
|
||||||
// gdb-command:print *ff
|
// gdb-command:print *ff
|
||||||
// gdb-check:$35 = 46
|
// gdb-check:$35 = 46
|
||||||
|
|
||||||
// gdb-command:print gg
|
// gdb-command:print gg
|
||||||
// gdb-check:$36 = {47, 48}
|
// gdb-check:$36 = {__0 = 47, __1 = 48}
|
||||||
|
|
||||||
// gdb-command:print *hh
|
// gdb-command:print *hh
|
||||||
// gdb-check:$37 = 50
|
// gdb-check:$37 = 50
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
// gdb-command:print *t1
|
// gdb-command:print *t1
|
||||||
// gdb-check:$2 = 2.5
|
// gdb-check:$2 = 2.5
|
||||||
// gdb-command:print ret
|
// gdb-command:print ret
|
||||||
// gdb-check:$3 = {{1, 2.5}, {2.5, 1}}
|
// gdb-check:$3 = {__0 = {__0 = 1, __1 = 2.5}, __1 = {__0 = 2.5, __1 = 1}}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print *t0
|
// gdb-command:print *t0
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
// gdb-command:print *t1
|
// gdb-command:print *t1
|
||||||
// gdb-check:$5 = 4
|
// gdb-check:$5 = 4
|
||||||
// gdb-command:print ret
|
// gdb-command:print ret
|
||||||
// gdb-check:$6 = {{3.5, 4}, {4, 3.5}}
|
// gdb-check:$6 = {__0 = {__0 = 3.5, __1 = 4}, __1 = {__0 = 4, __1 = 3.5}}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
// gdb-command:print *t0
|
// gdb-command:print *t0
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
// gdb-command:print *t1
|
// gdb-command:print *t1
|
||||||
// gdb-check:$8 = {a = 6, b = 7.5}
|
// gdb-check:$8 = {a = 6, b = 7.5}
|
||||||
// gdb-command:print ret
|
// gdb-command:print ret
|
||||||
// gdb-check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}}
|
// gdb-check:$9 = {__0 = {__0 = 5, __1 = {a = 6, b = 7.5}}, __1 = {__0 = {a = 6, b = 7.5}, __1 = 5}}
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// STACK BY REF
|
// STACK BY REF
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$1 = {x = {8888, -8888}}
|
// gdb-check:$1 = {x = {__0 = 8888, __1 = -8888}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$2 = -1
|
// gdb-check:$2 = -1
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
// STACK BY VAL
|
// STACK BY VAL
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$4 = {x = {8888, -8888}}
|
// gdb-check:$4 = {x = {__0 = 8888, __1 = -8888}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$5 = -3
|
// gdb-check:$5 = -3
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print case1
|
// gdb-command:print case1
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, 0, 31868, 31868, 31868, 31868}, {RUST$ENUM$DISR = Case1, 0, 2088533116, 2088533116}, {RUST$ENUM$DISR = Case1, 0, 8970181431921507452}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = 31868, __2 = 31868, __3 = 31868, __4 = 31868}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 2088533116, __2 = 2088533116}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 8970181431921507452}}
|
||||||
|
|
||||||
// gdb-command:print case2
|
// gdb-command:print case2
|
||||||
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, 0, 4369, 4369, 4369, 4369}, {RUST$ENUM$DISR = Case2, 0, 286331153, 286331153}, {RUST$ENUM$DISR = Case2, 0, 1229782938247303441}}
|
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, __0 = 0, __1 = 4369, __2 = 4369, __3 = 4369, __4 = 4369}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 286331153, __2 = 286331153}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 1229782938247303441}}
|
||||||
|
|
||||||
// gdb-command:print case3
|
// gdb-command:print case3
|
||||||
// gdb-check:$3 = {{RUST$ENUM$DISR = Case3, 0, 22873, 22873, 22873, 22873}, {RUST$ENUM$DISR = Case3, 0, 1499027801, 1499027801}, {RUST$ENUM$DISR = Case3, 0, 6438275382588823897}}
|
// gdb-check:$3 = {{RUST$ENUM$DISR = Case3, __0 = 0, __1 = 22873, __2 = 22873, __3 = 22873, __4 = 22873}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 1499027801, __2 = 1499027801}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 6438275382588823897}}
|
||||||
|
|
||||||
// gdb-command:print univariant
|
// gdb-command:print univariant
|
||||||
// gdb-check:$4 = {{-1}}
|
// gdb-check:$4 = {{__0 = -1}}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
// STACK BY REF
|
// STACK BY REF
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = Variant2, [...]}, {RUST$ENUM$DISR = Variant2, 117901063}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = Variant2, [...]}, {RUST$ENUM$DISR = Variant2, __0 = 117901063}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$2 = -1
|
// gdb-check:$2 = -1
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// STACK BY VAL
|
// STACK BY VAL
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$4 = {{RUST$ENUM$DISR = Variant2, [...]}, {RUST$ENUM$DISR = Variant2, 117901063}}
|
// gdb-check:$4 = {{RUST$ENUM$DISR = Variant2, [...]}, {RUST$ENUM$DISR = Variant2, __0 = 117901063}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$5 = -3
|
// gdb-check:$5 = -3
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// STACK BY REF
|
// STACK BY REF
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$1 = {x = {8888, -8888}}
|
// gdb-check:$1 = {x = {__0 = 8888, __1 = -8888}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$2 = -1
|
// gdb-check:$2 = -1
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
// STACK BY VAL
|
// STACK BY VAL
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$4 = {x = {8888, -8888}}
|
// gdb-check:$4 = {x = {__0 = 8888, __1 = -8888}}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$5 = -3
|
// gdb-check:$5 = -3
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// STACK BY REF
|
// STACK BY REF
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$1 = {100, -100.5}
|
// gdb-check:$1 = {__0 = 100, __1 = -100.5}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$2 = -1
|
// gdb-check:$2 = -1
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
// STACK BY VAL
|
// STACK BY VAL
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$4 = {100, -100.5}
|
// gdb-check:$4 = {__0 = 100, __1 = -100.5}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$5 = -3
|
// gdb-check:$5 = -3
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
// OWNED BY REF
|
// OWNED BY REF
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$7 = {200, -200.5}
|
// gdb-check:$7 = {__0 = 200, __1 = -200.5}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$8 = -5
|
// gdb-check:$8 = -5
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
// OWNED BY VAL
|
// OWNED BY VAL
|
||||||
// gdb-command:print self
|
// gdb-command:print self
|
||||||
// gdb-check:$10 = {200, -200.5}
|
// gdb-check:$10 = {__0 = 200, __1 = -200.5}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$11 = -7
|
// gdb-check:$11 = -7
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
// OWNED MOVED
|
// OWNED MOVED
|
||||||
// gdb-command:print *self
|
// gdb-command:print *self
|
||||||
// gdb-check:$13 = {200, -200.5}
|
// gdb-check:$13 = {__0 = 200, __1 = -200.5}
|
||||||
// gdb-command:print arg1
|
// gdb-command:print arg1
|
||||||
// gdb-check:$14 = -9
|
// gdb-check:$14 = -9
|
||||||
// gdb-command:print arg2
|
// gdb-command:print arg2
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print some
|
// gdb-command:print some
|
||||||
// gdb-check:$1 = {RUST$ENCODED$ENUM$0$None = {0x12345678}}
|
// gdb-check:$1 = {RUST$ENCODED$ENUM$0$None = {__0 = 0x12345678}}
|
||||||
|
|
||||||
// gdb-command:print none
|
// gdb-command:print none
|
||||||
// gdb-check:$2 = {RUST$ENCODED$ENUM$0$None = {0x0}}
|
// gdb-check:$2 = {RUST$ENCODED$ENUM$0$None = {__0 = 0x0}}
|
||||||
|
|
||||||
// gdb-command:print full
|
// gdb-command:print full
|
||||||
// gdb-check:$3 = {RUST$ENCODED$ENUM$1$Empty = {454545, 0x87654321, 9988}}
|
// gdb-check:$3 = {RUST$ENCODED$ENUM$1$Empty = {__0 = 454545, __1 = 0x87654321, __2 = 9988}}
|
||||||
|
|
||||||
// gdb-command:print empty_gdb->discr
|
// gdb-command:print empty_gdb->discr
|
||||||
// gdb-check:$4 = (isize *) 0x0
|
// gdb-check:$4 = (isize *) 0x0
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
// gdb-check:$6 = (isize *) 0x0
|
// gdb-check:$6 = (isize *) 0x0
|
||||||
|
|
||||||
// gdb-command:print nested_non_zero_yep
|
// gdb-command:print nested_non_zero_yep
|
||||||
// gdb-check:$7 = {RUST$ENCODED$ENUM$1$2$Nope = {10.5, {a = 10, b = 20, c = [...]}}}
|
// gdb-check:$7 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = 10.5, __1 = {a = 10, b = 20, c = [...]}}}
|
||||||
|
|
||||||
// gdb-command:print nested_non_zero_nope
|
// gdb-command:print nested_non_zero_nope
|
||||||
// gdb-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {[...], {a = [...], b = [...], c = 0x0}}}
|
// gdb-check:$8 = {RUST$ENCODED$ENUM$1$2$Nope = {__0 = [...], __1 = {a = [...], b = [...], c = 0x0}}}
|
||||||
|
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
|
@ -10,33 +10,33 @@
|
||||||
|
|
||||||
// Need a fix for LLDB first...
|
// Need a fix for LLDB first...
|
||||||
// ignore-lldb
|
// ignore-lldb
|
||||||
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print/d vi8x16
|
// gdb-command:print/d vi8x16
|
||||||
// gdb-check:$1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
|
// gdb-check:$1 = {__0 = 0, __1 = 1, __2 = 2, __3 = 3, __4 = 4, __5 = 5, __6 = 6, __7 = 7, __8 = 8, __9 = 9, __10 = 10, __11 = 11, __12 = 12, __13 = 13, __14 = 14, __15 = 15}
|
||||||
// gdb-command:print/d vi16x8
|
// gdb-command:print/d vi16x8
|
||||||
// gdb-check:$2 = {16, 17, 18, 19, 20, 21, 22, 23}
|
// gdb-check:$2 = {__0 = 16, __1 = 17, __2 = 18, __3 = 19, __4 = 20, __5 = 21, __6 = 22, __7 = 23}
|
||||||
// gdb-command:print/d vi32x4
|
// gdb-command:print/d vi32x4
|
||||||
// gdb-check:$3 = {24, 25, 26, 27}
|
// gdb-check:$3 = {__0 = 24, __1 = 25, __2 = 26, __3 = 27}
|
||||||
// gdb-command:print/d vi64x2
|
// gdb-command:print/d vi64x2
|
||||||
// gdb-check:$4 = {28, 29}
|
// gdb-check:$4 = {__0 = 28, __1 = 29}
|
||||||
|
|
||||||
// gdb-command:print/d vu8x16
|
// gdb-command:print/d vu8x16
|
||||||
// gdb-check:$5 = {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}
|
// gdb-check:$5 = {__0 = 30, __1 = 31, __2 = 32, __3 = 33, __4 = 34, __5 = 35, __6 = 36, __7 = 37, __8 = 38, __9 = 39, __10 = 40, __11 = 41, __12 = 42, __13 = 43, __14 = 44, __15 = 45}
|
||||||
// gdb-command:print/d vu16x8
|
// gdb-command:print/d vu16x8
|
||||||
// gdb-check:$6 = {46, 47, 48, 49, 50, 51, 52, 53}
|
// gdb-check:$6 = {__0 = 46, __1 = 47, __2 = 48, __3 = 49, __4 = 50, __5 = 51, __6 = 52, __7 = 53}
|
||||||
// gdb-command:print/d vu32x4
|
// gdb-command:print/d vu32x4
|
||||||
// gdb-check:$7 = {54, 55, 56, 57}
|
// gdb-check:$7 = {__0 = 54, __1 = 55, __2 = 56, __3 = 57}
|
||||||
// gdb-command:print/d vu64x2
|
// gdb-command:print/d vu64x2
|
||||||
// gdb-check:$8 = {58, 59}
|
// gdb-check:$8 = {__0 = 58, __1 = 59}
|
||||||
|
|
||||||
// gdb-command:print vf32x4
|
// gdb-command:print vf32x4
|
||||||
// gdb-check:$9 = {60.5, 61.5, 62.5, 63.5}
|
// gdb-check:$9 = {__0 = 60.5, __1 = 61.5, __2 = 62.5, __3 = 63.5}
|
||||||
// gdb-command:print vf64x2
|
// gdb-command:print vf64x2
|
||||||
// gdb-check:$10 = {64.5, 65.5}
|
// gdb-check:$10 = {__0 = 64.5, __1 = 65.5}
|
||||||
|
|
||||||
// gdb-command:continue
|
// gdb-command:continue
|
||||||
|
|
||||||
|
|
|
@ -15,57 +15,57 @@
|
||||||
// === GDB TESTS ===================================================================================
|
// === GDB TESTS ===================================================================================
|
||||||
|
|
||||||
// gdb-command:print/d 'simple_tuple::NO_PADDING_8'
|
// gdb-command:print/d 'simple_tuple::NO_PADDING_8'
|
||||||
// gdb-check:$1 = {-50, 50}
|
// gdb-check:$1 = {__0 = -50, __1 = 50}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_16'
|
// gdb-command:print 'simple_tuple::NO_PADDING_16'
|
||||||
// gdb-check:$2 = {-1, 2, 3}
|
// gdb-check:$2 = {__0 = -1, __1 = 2, __2 = 3}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_32'
|
// gdb-command:print 'simple_tuple::NO_PADDING_32'
|
||||||
// gdb-check:$3 = {4, 5, 6}
|
// gdb-check:$3 = {__0 = 4, __1 = 5, __2 = 6}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_64'
|
// gdb-command:print 'simple_tuple::NO_PADDING_64'
|
||||||
// gdb-check:$4 = {7, 8, 9}
|
// gdb-check:$4 = {__0 = 7, __1 = 8, __2 = 9}
|
||||||
|
|
||||||
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
|
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
|
||||||
// gdb-check:$5 = {10, 11}
|
// gdb-check:$5 = {__0 = 10, __1 = 11}
|
||||||
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
|
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
|
||||||
// gdb-check:$6 = {12, 13, 14, 15}
|
// gdb-check:$6 = {__0 = 12, __1 = 13, __2 = 14, __3 = 15}
|
||||||
|
|
||||||
// gdb-command:print 'simple_tuple::PADDING_AT_END'
|
// gdb-command:print 'simple_tuple::PADDING_AT_END'
|
||||||
// gdb-check:$7 = {16, 17}
|
// gdb-check:$7 = {__0 = 16, __1 = 17}
|
||||||
|
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print/d noPadding8
|
// gdb-command:print/d noPadding8
|
||||||
// gdb-check:$8 = {-100, 100}
|
// gdb-check:$8 = {__0 = -100, __1 = 100}
|
||||||
// gdb-command:print noPadding16
|
// gdb-command:print noPadding16
|
||||||
// gdb-check:$9 = {0, 1, 2}
|
// gdb-check:$9 = {__0 = 0, __1 = 1, __2 = 2}
|
||||||
// gdb-command:print noPadding32
|
// gdb-command:print noPadding32
|
||||||
// gdb-check:$10 = {3, 4.5, 5}
|
// gdb-check:$10 = {__0 = 3, __1 = 4.5, __2 = 5}
|
||||||
// gdb-command:print noPadding64
|
// gdb-command:print noPadding64
|
||||||
// gdb-check:$11 = {6, 7.5, 8}
|
// gdb-check:$11 = {__0 = 6, __1 = 7.5, __2 = 8}
|
||||||
|
|
||||||
// gdb-command:print internalPadding1
|
// gdb-command:print internalPadding1
|
||||||
// gdb-check:$12 = {9, 10}
|
// gdb-check:$12 = {__0 = 9, __1 = 10}
|
||||||
// gdb-command:print internalPadding2
|
// gdb-command:print internalPadding2
|
||||||
// gdb-check:$13 = {11, 12, 13, 14}
|
// gdb-check:$13 = {__0 = 11, __1 = 12, __2 = 13, __3 = 14}
|
||||||
|
|
||||||
// gdb-command:print paddingAtEnd
|
// gdb-command:print paddingAtEnd
|
||||||
// gdb-check:$14 = {15, 16}
|
// gdb-check:$14 = {__0 = 15, __1 = 16}
|
||||||
|
|
||||||
// gdb-command:print/d 'simple_tuple::NO_PADDING_8'
|
// gdb-command:print/d 'simple_tuple::NO_PADDING_8'
|
||||||
// gdb-check:$15 = {-127, 127}
|
// gdb-check:$15 = {__0 = -127, __1 = 127}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_16'
|
// gdb-command:print 'simple_tuple::NO_PADDING_16'
|
||||||
// gdb-check:$16 = {-10, 10, 9}
|
// gdb-check:$16 = {__0 = -10, __1 = 10, __2 = 9}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_32'
|
// gdb-command:print 'simple_tuple::NO_PADDING_32'
|
||||||
// gdb-check:$17 = {14, 15, 16}
|
// gdb-check:$17 = {__0 = 14, __1 = 15, __2 = 16}
|
||||||
// gdb-command:print 'simple_tuple::NO_PADDING_64'
|
// gdb-command:print 'simple_tuple::NO_PADDING_64'
|
||||||
// gdb-check:$18 = {17, 18, 19}
|
// gdb-check:$18 = {__0 = 17, __1 = 18, __2 = 19}
|
||||||
|
|
||||||
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
|
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
|
||||||
// gdb-check:$19 = {110, 111}
|
// gdb-check:$19 = {__0 = 110, __1 = 111}
|
||||||
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
|
// gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
|
||||||
// gdb-check:$20 = {112, 113, 114, 115}
|
// gdb-check:$20 = {__0 = 112, __1 = 113, __2 = 114, __3 = 115}
|
||||||
|
|
||||||
// gdb-command:print 'simple_tuple::PADDING_AT_END'
|
// gdb-command:print 'simple_tuple::PADDING_AT_END'
|
||||||
// gdb-check:$21 = {116, 117}
|
// gdb-check:$21 = {__0 = 116, __1 = 117}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print case1
|
// gdb-command:print case1
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, 0, {x = 2088533116, y = 2088533116, z = 31868}}, {RUST$ENUM$DISR = Case1, 0, 8970181431921507452, 31868}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = {x = 2088533116, y = 2088533116, z = 31868}}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 8970181431921507452, __2 = 31868}}
|
||||||
|
|
||||||
// gdb-command:print case2
|
// gdb-command:print case2
|
||||||
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, 0, {x = 286331153, y = 286331153, z = 4369}}, {RUST$ENUM$DISR = Case2, 0, 1229782938247303441, 4369}}
|
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, __0 = 0, __1 = {x = 286331153, y = 286331153, z = 4369}}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 1229782938247303441, __2 = 4369}}
|
||||||
|
|
||||||
// gdb-command:print univariant
|
// gdb-command:print univariant
|
||||||
// gdb-check:$3 = {{{x = 123, y = 456, z = 789}}}
|
// gdb-check:$3 = {{__0 = {x = 123, y = 456, z = 789}}}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
// ignore-tidy-linelength
|
||||||
|
|
||||||
// min-lldb-version: 310
|
// min-lldb-version: 310
|
||||||
|
|
||||||
// compile-flags:-g
|
// compile-flags:-g
|
||||||
|
@ -15,29 +17,29 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print no_padding1
|
// gdb-command:print no_padding1
|
||||||
// gdb-check:$1 = {x = {0, 1}, y = 2, z = {3, 4, 5}}
|
// gdb-check:$1 = {x = {__0 = 0, __1 = 1}, y = 2, z = {__0 = 3, __1 = 4, __2 = 5}}
|
||||||
// gdb-command:print no_padding2
|
// gdb-command:print no_padding2
|
||||||
// gdb-check:$2 = {x = {6, 7}, y = {{8, 9}, 10}}
|
// gdb-check:$2 = {x = {__0 = 6, __1 = 7}, y = {__0 = {__0 = 8, __1 = 9}, __1 = 10}}
|
||||||
|
|
||||||
// gdb-command:print tuple_internal_padding
|
// gdb-command:print tuple_internal_padding
|
||||||
// gdb-check:$3 = {x = {11, 12}, y = {13, 14}}
|
// gdb-check:$3 = {x = {__0 = 11, __1 = 12}, y = {__0 = 13, __1 = 14}}
|
||||||
// gdb-command:print struct_internal_padding
|
// gdb-command:print struct_internal_padding
|
||||||
// gdb-check:$4 = {x = {15, 16}, y = {17, 18}}
|
// gdb-check:$4 = {x = {__0 = 15, __1 = 16}, y = {__0 = 17, __1 = 18}}
|
||||||
// gdb-command:print both_internally_padded
|
// gdb-command:print both_internally_padded
|
||||||
// gdb-check:$5 = {x = {19, 20, 21}, y = {22, 23}}
|
// gdb-check:$5 = {x = {__0 = 19, __1 = 20, __2 = 21}, y = {__0 = 22, __1 = 23}}
|
||||||
|
|
||||||
// gdb-command:print single_tuple
|
// gdb-command:print single_tuple
|
||||||
// gdb-check:$6 = {x = {24, 25, 26}}
|
// gdb-check:$6 = {x = {__0 = 24, __1 = 25, __2 = 26}}
|
||||||
|
|
||||||
// gdb-command:print tuple_padded_at_end
|
// gdb-command:print tuple_padded_at_end
|
||||||
// gdb-check:$7 = {x = {27, 28}, y = {29, 30}}
|
// gdb-check:$7 = {x = {__0 = 27, __1 = 28}, y = {__0 = 29, __1 = 30}}
|
||||||
// gdb-command:print struct_padded_at_end
|
// gdb-command:print struct_padded_at_end
|
||||||
// gdb-check:$8 = {x = {31, 32}, y = {33, 34}}
|
// gdb-check:$8 = {x = {__0 = 31, __1 = 32}, y = {__0 = 33, __1 = 34}}
|
||||||
// gdb-command:print both_padded_at_end
|
// gdb-command:print both_padded_at_end
|
||||||
// gdb-check:$9 = {x = {35, 36, 37}, y = {38, 39}}
|
// gdb-check:$9 = {x = {__0 = 35, __1 = 36, __2 = 37}, y = {__0 = 38, __1 = 39}}
|
||||||
|
|
||||||
// gdb-command:print mixed_padding
|
// gdb-command:print mixed_padding
|
||||||
// gdb-check:$10 = {x = {{40, 41, 42}, {43, 44}}, y = {45, 46, 47, 48}}
|
// gdb-check:$10 = {x = {__0 = {__0 = 40, __1 = 41, __2 = 42}, __1 = {__0 = 43, __1 = 44}}, y = {__0 = 45, __1 = 46, __2 = 47, __3 = 48}}
|
||||||
|
|
||||||
#![allow(unused_variables)]
|
#![allow(unused_variables)]
|
||||||
#![omit_gdb_pretty_printer_section]
|
#![omit_gdb_pretty_printer_section]
|
||||||
|
|
|
@ -17,21 +17,21 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print no_padding1
|
// gdb-command:print no_padding1
|
||||||
// gdb-check:$1 = {{0, 1}, 2, 3}
|
// gdb-check:$1 = {__0 = {__0 = 0, __1 = 1}, __1 = 2, __2 = 3}
|
||||||
// gdb-command:print no_padding2
|
// gdb-command:print no_padding2
|
||||||
// gdb-check:$2 = {4, {5, 6}, 7}
|
// gdb-check:$2 = {__0 = 4, __1 = {__0 = 5, __1 = 6}, __2 = 7}
|
||||||
// gdb-command:print no_padding3
|
// gdb-command:print no_padding3
|
||||||
// gdb-check:$3 = {8, 9, {10, 11}}
|
// gdb-check:$3 = {__0 = 8, __1 = 9, __2 = {__0 = 10, __1 = 11}}
|
||||||
|
|
||||||
// gdb-command:print internal_padding1
|
// gdb-command:print internal_padding1
|
||||||
// gdb-check:$4 = {12, {13, 14}}
|
// gdb-check:$4 = {__0 = 12, __1 = {__0 = 13, __1 = 14}}
|
||||||
// gdb-command:print internal_padding2
|
// gdb-command:print internal_padding2
|
||||||
// gdb-check:$5 = {15, {16, 17}}
|
// gdb-check:$5 = {__0 = 15, __1 = {__0 = 16, __1 = 17}}
|
||||||
|
|
||||||
// gdb-command:print padding_at_end1
|
// gdb-command:print padding_at_end1
|
||||||
// gdb-check:$6 = {18, {19, 20}}
|
// gdb-check:$6 = {__0 = 18, __1 = {__0 = 19, __1 = 20}}
|
||||||
// gdb-command:print padding_at_end2
|
// gdb-command:print padding_at_end2
|
||||||
// gdb-check:$7 = {{21, 22}, 23}
|
// gdb-check:$7 = {__0 = {__0 = 21, __1 = 22}, __1 = 23}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -17,22 +17,22 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print no_padding16
|
// gdb-command:print no_padding16
|
||||||
// gdb-check:$1 = {10000, -10001}
|
// gdb-check:$1 = {__0 = 10000, __1 = -10001}
|
||||||
|
|
||||||
// gdb-command:print no_padding32
|
// gdb-command:print no_padding32
|
||||||
// gdb-check:$2 = {-10002, -10003.5, 10004}
|
// gdb-check:$2 = {__0 = -10002, __1 = -10003.5, __2 = 10004}
|
||||||
|
|
||||||
// gdb-command:print no_padding64
|
// gdb-command:print no_padding64
|
||||||
// gdb-check:$3 = {-10005.5, 10006, 10007}
|
// gdb-check:$3 = {__0 = -10005.5, __1 = 10006, __2 = 10007}
|
||||||
|
|
||||||
// gdb-command:print no_padding163264
|
// gdb-command:print no_padding163264
|
||||||
// gdb-check:$4 = {-10008, 10009, 10010, 10011}
|
// gdb-check:$4 = {__0 = -10008, __1 = 10009, __2 = 10010, __3 = 10011}
|
||||||
|
|
||||||
// gdb-command:print internal_padding
|
// gdb-command:print internal_padding
|
||||||
// gdb-check:$5 = {10012, -10013}
|
// gdb-check:$5 = {__0 = 10012, __1 = -10013}
|
||||||
|
|
||||||
// gdb-command:print padding_at_end
|
// gdb-command:print padding_at_end
|
||||||
// gdb-check:$6 = {-10014, 10015}
|
// gdb-check:$6 = {__0 = -10014, __1 = 10015}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print case1
|
// gdb-command:print case1
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, 0, 31868, 31868, 31868, 31868}, {RUST$ENUM$DISR = Case1, 0, 2088533116, 2088533116}, {RUST$ENUM$DISR = Case1, 0, 8970181431921507452}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = Case1, __0 = 0, __1 = 31868, __2 = 31868, __3 = 31868, __4 = 31868}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 2088533116, __2 = 2088533116}, {RUST$ENUM$DISR = Case1, __0 = 0, __1 = 8970181431921507452}}
|
||||||
|
|
||||||
// gdb-command:print case2
|
// gdb-command:print case2
|
||||||
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, 0, 4369, 4369, 4369, 4369}, {RUST$ENUM$DISR = Case2, 0, 286331153, 286331153}, {RUST$ENUM$DISR = Case2, 0, 1229782938247303441}}
|
// gdb-check:$2 = {{RUST$ENUM$DISR = Case2, __0 = 0, __1 = 4369, __2 = 4369, __3 = 4369, __4 = 4369}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 286331153, __2 = 286331153}, {RUST$ENUM$DISR = Case2, __0 = 0, __1 = 1229782938247303441}}
|
||||||
|
|
||||||
// gdb-command:print case3
|
// gdb-command:print case3
|
||||||
// gdb-check:$3 = {{RUST$ENUM$DISR = Case3, 0, 22873, 22873, 22873, 22873}, {RUST$ENUM$DISR = Case3, 0, 1499027801, 1499027801}, {RUST$ENUM$DISR = Case3, 0, 6438275382588823897}}
|
// gdb-check:$3 = {{RUST$ENUM$DISR = Case3, __0 = 0, __1 = 22873, __2 = 22873, __3 = 22873, __4 = 22873}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 1499027801, __2 = 1499027801}, {RUST$ENUM$DISR = Case3, __0 = 0, __1 = 6438275382588823897}}
|
||||||
|
|
||||||
// gdb-command:print univariant
|
// gdb-command:print univariant
|
||||||
// gdb-check:$4 = {{-1}}
|
// gdb-check:$4 = {{__0 = -1}}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
// gdb-command:run
|
// gdb-command:run
|
||||||
|
|
||||||
// gdb-command:print *the_a
|
// gdb-command:print *the_a
|
||||||
// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, 0, 2088533116, 2088533116}}
|
// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, __0 = 0, __1 = 2088533116, __2 = 2088533116}}
|
||||||
|
|
||||||
// gdb-command:print *the_b
|
// gdb-command:print *the_b
|
||||||
// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, 0, 286331153, 286331153}}
|
// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, __0 = 0, __1 = 286331153, __2 = 286331153}}
|
||||||
|
|
||||||
// gdb-command:print *univariant
|
// gdb-command:print *univariant
|
||||||
// gdb-check:$3 = {{123234}}
|
// gdb-check:$3 = {{__0 = 123234}}
|
||||||
|
|
||||||
|
|
||||||
// === LLDB TESTS ==================================================================================
|
// === LLDB TESTS ==================================================================================
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
// gdb-command:print padded_tuple.length
|
// gdb-command:print padded_tuple.length
|
||||||
// gdb-check:$8 = 2
|
// gdb-check:$8 = 2
|
||||||
// gdb-command:print padded_tuple.data_ptr[0]
|
// gdb-command:print padded_tuple.data_ptr[0]
|
||||||
// gdb-check:$9 = {6, 7}
|
// gdb-check:$9 = {__0 = 6, __1 = 7}
|
||||||
// gdb-command:print padded_tuple.data_ptr[1]
|
// gdb-command:print padded_tuple.data_ptr[1]
|
||||||
// gdb-check:$10 = {8, 9}
|
// gdb-check:$10 = {__0 = 8, __1 = 9}
|
||||||
|
|
||||||
// gdb-command:print padded_struct.length
|
// gdb-command:print padded_struct.length
|
||||||
// gdb-check:$11 = 2
|
// gdb-check:$11 = 2
|
||||||
|
|
Loading…
Reference in New Issue