aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/var-access.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/var-access.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/var-access.exp216
1 files changed, 108 insertions, 108 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index 347d276..8760465 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -54,8 +54,8 @@ Dwarf::assemble $asm_file {
cu {} {
DW_TAG_compile_unit {
- {DW_AT_name $srcfile}
- {DW_AT_comp_dir /tmp}
+ DW_AT_name $srcfile
+ DW_AT_comp_dir /tmp
} {
declare_labels char_type_label
declare_labels int_type_label short_type_label
@@ -64,184 +64,184 @@ Dwarf::assemble $asm_file {
# char
char_type_label: base_type {
- {name "char"}
- {encoding @DW_ATE_unsigned_char}
- {byte_size 1 DW_FORM_sdata}
+ DW_AT_name "char"
+ DW_AT_encoding @DW_ATE_unsigned_char
+ DW_AT_byte_size 1 DW_FORM_sdata
}
# int
int_type_label: base_type {
- {name "int"}
- {encoding @DW_ATE_signed}
- {byte_size 4 DW_FORM_sdata}
+ DW_AT_name "int"
+ DW_AT_encoding @DW_ATE_signed
+ DW_AT_byte_size 4 DW_FORM_sdata
}
# char [8]
array_a8_label: array_type {
- {type :$char_type_label}
+ DW_AT_type :$char_type_label
} {
subrange_type {
- {type :$int_type_label}
- {upper_bound 7 DW_FORM_udata}
+ DW_AT_type :$int_type_label
+ DW_AT_upper_bound 7 DW_FORM_udata
}
}
# struct s { char a, b, c, d; };
struct_s_label: structure_type {
- {name "s"}
- {byte_size 4 DW_FORM_sdata}
+ DW_AT_name "s"
+ DW_AT_byte_size 4 DW_FORM_sdata
} {
member {
- {name "a"}
- {type :$char_type_label}
- {data_member_location 0 DW_FORM_udata}
+ DW_AT_name "a"
+ DW_AT_type :$char_type_label
+ DW_AT_data_member_location 0 DW_FORM_udata
}
member {
- {name "b"}
- {type :$char_type_label}
- {data_member_location 1 DW_FORM_udata}
+ DW_AT_name "b"
+ DW_AT_type :$char_type_label
+ DW_AT_data_member_location 1 DW_FORM_udata
}
member {
- {name "c"}
- {type :$char_type_label}
- {data_member_location 2 DW_FORM_udata}
+ DW_AT_name "c"
+ DW_AT_type :$char_type_label
+ DW_AT_data_member_location 2 DW_FORM_udata
}
member {
- {name "d"}
- {type :$char_type_label}
- {data_member_location 3 DW_FORM_udata}
+ DW_AT_name "d"
+ DW_AT_type :$char_type_label
+ DW_AT_data_member_location 3 DW_FORM_udata
}
}
# struct t { int u, x:9, y:13, z:10; };
struct_t_label: structure_type {
- {name "t"}
- {byte_size 8 DW_FORM_sdata}
+ DW_AT_name "t"
+ DW_AT_byte_size 8 DW_FORM_sdata
} {
member {
- {name "u"}
- {type :$int_type_label}
+ DW_AT_name "u"
+ DW_AT_type :$int_type_label
}
member {
- {name "x"}
- {type :$int_type_label}
- {data_member_location 4 DW_FORM_udata}
- {bit_size 9 DW_FORM_udata}
+ DW_AT_name "x"
+ DW_AT_type :$int_type_label
+ DW_AT_data_member_location 4 DW_FORM_udata
+ DW_AT_bit_size 9 DW_FORM_udata
}
member {
- {name "y"}
- {type :$int_type_label}
- {data_bit_offset 41 DW_FORM_udata}
- {bit_size 13 DW_FORM_udata}
+ DW_AT_name "y"
+ DW_AT_type :$int_type_label
+ DW_AT_data_bit_offset 41 DW_FORM_udata
+ DW_AT_bit_size 13 DW_FORM_udata
}
member {
- {name "z"}
- {type :$int_type_label}
- {data_bit_offset 54 DW_FORM_udata}
- {bit_size 10 DW_FORM_udata}
+ DW_AT_name "z"
+ DW_AT_type :$int_type_label
+ DW_AT_data_bit_offset 54 DW_FORM_udata
+ DW_AT_bit_size 10 DW_FORM_udata
}
}
# struct st { struct s s; struct t t; };
struct_st_label: structure_type {
- {name "st"}
- {byte_size 12 DW_FORM_udata}
+ DW_AT_name "st"
+ DW_AT_byte_size 12 DW_FORM_udata
} {
member {
- {name "s"}
- {type :$struct_s_label}
+ DW_AT_name "s"
+ DW_AT_type :$struct_s_label
}
member {
- {name "t"}
- {type :$struct_t_label}
- {data_member_location 4 DW_FORM_udata}
+ DW_AT_name "t"
+ DW_AT_type :$struct_t_label
+ DW_AT_data_member_location 4 DW_FORM_udata
}
}
DW_TAG_subprogram {
- {MACRO_AT_func { main }}
- {DW_AT_external 1 flag}
+ MACRO_AT_func { main }
+ DW_AT_external 1 flag
} {
# Simple memory location.
DW_TAG_variable {
- {name "a"}
- {type :$array_a8_label}
- {location {
- addr $buf_var
- } SPECIAL_expr}
+ DW_AT_name "a"
+ DW_AT_type :$array_a8_label
+ DW_AT_location {
+ DW_OP_addr $buf_var
+ } SPECIAL_expr
}
# Memory pieces: two bytes from &buf[2], and two bytes
# from &buf[0].
DW_TAG_variable {
- {name "s1"}
- {type :$struct_s_label}
- {location {
- addr $buf_var
- plus_uconst 2
- piece 2
- addr $buf_var
- piece 2
- } SPECIAL_expr}
+ DW_AT_name "s1"
+ DW_AT_type :$struct_s_label
+ DW_AT_location {
+ DW_OP_addr $buf_var
+ DW_OP_plus_uconst 2
+ DW_OP_piece 2
+ DW_OP_addr $buf_var
+ DW_OP_piece 2
+ } SPECIAL_expr
}
# Register- and memory pieces: one byte each from r0,
# &buf[4], r1, and &buf[5].
DW_TAG_variable {
- {name "s2"}
- {type :$struct_s_label}
- {location {
- regx [lindex $dwarf_regnum 0]
- piece 1
- addr "$buf_var + 4"
- piece 1
- regx [lindex $dwarf_regnum 1]
- piece 1
- addr "$buf_var + 5"
- piece 1
- } SPECIAL_expr}
+ DW_AT_name "s2"
+ DW_AT_type :$struct_s_label
+ DW_AT_location {
+ DW_OP_regx [lindex $dwarf_regnum 0]
+ DW_OP_piece 1
+ DW_OP_addr "$buf_var + 4"
+ DW_OP_piece 1
+ DW_OP_regx [lindex $dwarf_regnum 1]
+ DW_OP_piece 1
+ DW_OP_addr "$buf_var + 5"
+ DW_OP_piece 1
+ } SPECIAL_expr
}
# Memory pieces for bitfield access: 8 bytes optimized
# out, 3 bytes from &buf[3], and 1 byte from &buf[1].
DW_TAG_variable {
- {name "st1"}
- {type :$struct_st_label}
- {location {
- piece 8
- addr "$buf_var + 3"
- piece 3
- addr "$buf_var + 1"
- piece 1
- } SPECIAL_expr}
+ DW_AT_name "st1"
+ DW_AT_type :$struct_st_label
+ DW_AT_location {
+ DW_OP_piece 8
+ DW_OP_addr "$buf_var + 3"
+ DW_OP_piece 3
+ DW_OP_addr "$buf_var + 1"
+ DW_OP_piece 1
+ } SPECIAL_expr
}
# Register pieces for bitfield access: 4 bytes optimized
# out, 3 bytes from r0, and 1 byte from r1.
DW_TAG_variable {
- {name "t2"}
- {type :$struct_t_label}
- {location {
- piece 4
- regx [lindex $dwarf_regnum 0]
- piece 3
- regx [lindex $dwarf_regnum 1]
- piece 1
- } SPECIAL_expr}
+ DW_AT_name "t2"
+ DW_AT_type :$struct_t_label
+ DW_AT_location {
+ DW_OP_piece 4
+ DW_OP_regx [lindex $dwarf_regnum 0]
+ DW_OP_piece 3
+ DW_OP_regx [lindex $dwarf_regnum 1]
+ DW_OP_piece 1
+ } SPECIAL_expr
}
# One piece per bitfield, using piece offsets: 32 bits of
# an implicit value, 9 bits of a stack value, 13 bits of
# r0, and 10 bits of buf.
DW_TAG_variable {
- {name "t3"}
- {type :$struct_t_label}
- {location {
- implicit_value 0x12 0x34 0x56 0x78 0x9a
- bit_piece 32 4
- const2s -280
- stack_value
- bit_piece 9 2
- regx [lindex $dwarf_regnum 0]
- bit_piece 13 14
- addr $buf_var
- bit_piece 10 42
- } SPECIAL_expr}
+ DW_AT_name "t3"
+ DW_AT_type :$struct_t_label
+ DW_AT_location {
+ DW_OP_implicit_value 0x12 0x34 0x56 0x78 0x9a
+ DW_OP_bit_piece 32 4
+ DW_OP_const2s -280
+ DW_OP_stack_value
+ DW_OP_bit_piece 9 2
+ DW_OP_regx [lindex $dwarf_regnum 0]
+ DW_OP_bit_piece 13 14
+ DW_OP_addr $buf_var
+ DW_OP_bit_piece 10 42
+ } SPECIAL_expr
}
}
}
@@ -253,7 +253,7 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} \
return -1
}
-if ![runto_main] {
+if {![runto_main]} {
return -1
}