standard_testfile symbol_needs_eval.c ${gdb_test_file_name}-dw.S
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] {
+ return
+}
+
+set int_size [get_sizeof "int" -1]
+
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
- global dwarf_regnum regname
+ global dwarf_regnum regname int_size
set exec_mask_var [gdb_target_symbol exec_mask]
int_type_label: DW_TAG_base_type {
{DW_AT_name "int"}
{DW_AT_encoding @DW_ATE_signed}
- {DW_AT_byte_size 4 DW_FORM_sdata}
+ {DW_AT_byte_size $int_size DW_FORM_sdata}
}
# define artificial variable a
{DW_AT_type :$int_type_label}
{DW_AT_location {
DW_OP_addr $exec_mask_var
- DW_OP_deref
+ DW_OP_deref_size $int_size
# conditional jump to DW_OP_bregx
DW_OP_bra 4
standard_testfile symbol_needs_eval.c ${gdb_test_file_name}-dw.S
+if [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] {
+ return
+}
+
+set int_size [get_sizeof "int" -1]
+
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
- global dwarf_regnum regname
+ global dwarf_regnum regname int_size
set exec_mask_var [gdb_target_symbol exec_mask]
int_type_label: DW_TAG_base_type {
{DW_AT_name "int"}
{DW_AT_encoding @DW_ATE_signed}
- {DW_AT_byte_size 4 DW_FORM_sdata}
+ {DW_AT_byte_size $int_size DW_FORM_sdata}
}
# add info for variable exec_mask
{DW_AT_location {
DW_OP_lit1
DW_OP_addr $exec_mask_var
- DW_OP_deref
+ DW_OP_deref_size $int_size
# jump to DW_OP_fbreg
DW_OP_skip 4