|
Packit |
032894 |
#! /bin/sh
|
|
Packit |
032894 |
# Copyright (C) 2018 Red Hat, Inc.
|
|
Packit |
032894 |
# This file is part of elfutils.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# This file is free software; you can redistribute it and/or modify
|
|
Packit |
032894 |
# it under the terms of the GNU General Public License as published by
|
|
Packit |
032894 |
# the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
032894 |
# (at your option) any later version.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# elfutils is distributed in the hope that it will be useful, but
|
|
Packit |
032894 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
032894 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
032894 |
# GNU General Public License for more details.
|
|
Packit |
032894 |
#
|
|
Packit |
032894 |
# You should have received a copy of the GNU General Public License
|
|
Packit |
032894 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
032894 |
|
|
Packit |
032894 |
. $srcdir/test-subr.sh
|
|
Packit |
032894 |
|
|
Packit |
032894 |
# Make sure --debug-dump=info implies .debug_types, even when implicit.
|
|
Packit |
032894 |
# See run-typeiter.sh
|
|
Packit |
032894 |
testfiles testfile-debug-types
|
|
Packit |
032894 |
|
|
Packit |
032894 |
testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=str --debug-dump=info testfile-debug-types<<\EOF
|
|
Packit |
032894 |
|
|
Packit |
032894 |
DWARF section [28] '.debug_info' at offset 0x1089:
|
|
Packit |
032894 |
[Offset]
|
|
Packit |
032894 |
Compilation unit at offset 0:
|
|
Packit |
032894 |
Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
|
|
Packit |
032894 |
[ b] compile_unit abbrev: 8
|
|
Packit |
032894 |
producer (strp) "GNU C++ 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic -march=x86-64 -g -fdebug-types-section"
|
|
Packit |
032894 |
language (data1) C_plus_plus (4)
|
|
Packit |
032894 |
comp_dir (strp) "/home/mark/src/elfutils/tests"
|
|
Packit |
032894 |
low_pc (addr) 0x00000000004005b0 <main>
|
|
Packit |
032894 |
high_pc (data8) 11 (0x00000000004005bb)
|
|
Packit |
032894 |
stmt_list (sec_offset) 0
|
|
Packit |
032894 |
[ 29] subprogram abbrev: 9
|
|
Packit |
032894 |
external (flag_present) yes
|
|
Packit |
032894 |
name (strp) "main"
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
type (ref4) [ 46]
|
|
Packit |
032894 |
low_pc (addr) 0x00000000004005b0 <main>
|
|
Packit |
032894 |
high_pc (data8) 11 (0x00000000004005bb)
|
|
Packit |
032894 |
frame_base (exprloc)
|
|
Packit |
032894 |
[ 0] call_frame_cfa
|
|
Packit |
032894 |
GNU_all_call_sites (flag_present) yes
|
|
Packit |
032894 |
[ 46] base_type abbrev: 10
|
|
Packit |
032894 |
byte_size (data1) 4
|
|
Packit |
032894 |
encoding (data1) signed (5)
|
|
Packit |
032894 |
name (string) "int"
|
|
Packit |
032894 |
[ 4d] variable abbrev: 11
|
|
Packit |
032894 |
name (string) "a"
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
type (ref_sig8) {18763953736e2de0}
|
|
Packit |
032894 |
external (flag_present) yes
|
|
Packit |
032894 |
location (exprloc)
|
|
Packit |
032894 |
[ 0] addr 0x601030
|
|
Packit |
032894 |
[ 64] variable abbrev: 11
|
|
Packit |
032894 |
name (string) "b"
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
type (ref_sig8) {7cf9bbf793fcaf13}
|
|
Packit |
032894 |
external (flag_present) yes
|
|
Packit |
032894 |
location (exprloc)
|
|
Packit |
032894 |
[ 0] addr 0x601031
|
|
Packit |
032894 |
|
|
Packit |
032894 |
DWARF section [31] '.debug_str' at offset 0x11dd:
|
|
Packit |
032894 |
Offset String
|
|
Packit |
032894 |
[ 0] "/home/mark/src/elfutils/tests"
|
|
Packit |
032894 |
[ 1e] "GNU C++ 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic -march=x86-64 -g -fdebug-types-section"
|
|
Packit |
032894 |
[ 7e] "main"
|
|
Packit |
032894 |
|
|
Packit |
032894 |
DWARF section [32] '.debug_types' at offset 0x1260:
|
|
Packit |
032894 |
[Offset]
|
|
Packit |
032894 |
Type unit at offset 0:
|
|
Packit |
032894 |
Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
|
|
Packit |
032894 |
Type signature: 0x7cf9bbf793fcaf13, Type offset: 0x38 [38]
|
|
Packit |
032894 |
[ 17] type_unit abbrev: 1
|
|
Packit |
032894 |
language (data1) C_plus_plus (4)
|
|
Packit |
032894 |
GNU_odr_signature (data8) 4783233826607187165
|
|
Packit |
032894 |
stmt_list (sec_offset) 0
|
|
Packit |
032894 |
[ 25] structure_type abbrev: 2
|
|
Packit |
032894 |
name (string) "A"
|
|
Packit |
032894 |
signature (ref_sig8) {18763953736e2de0}
|
|
Packit |
032894 |
declaration (flag_present) yes
|
|
Packit |
032894 |
sibling (ref4) [ 38]
|
|
Packit |
032894 |
[ 34] structure_type abbrev: 3
|
|
Packit |
032894 |
name (string) "B"
|
|
Packit |
032894 |
declaration (flag_present) yes
|
|
Packit |
032894 |
[ 38] structure_type abbrev: 4
|
|
Packit |
032894 |
name (string) "B"
|
|
Packit |
032894 |
byte_size (data1) 1
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
specification (ref4) [ 34]
|
|
Packit |
032894 |
Type unit at offset 67:
|
|
Packit |
032894 |
Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
|
|
Packit |
032894 |
Type signature: 0x18763953736e2de0, Type offset: 0x25 [25]
|
|
Packit |
032894 |
[ 5a] type_unit abbrev: 1
|
|
Packit |
032894 |
language (data1) C_plus_plus (4)
|
|
Packit |
032894 |
GNU_odr_signature (data8) 16005269134005989797
|
|
Packit |
032894 |
stmt_list (sec_offset) 0
|
|
Packit |
032894 |
[ 68] structure_type abbrev: 5
|
|
Packit |
032894 |
name (string) "A"
|
|
Packit |
032894 |
byte_size (data1) 1
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
[ 6e] structure_type abbrev: 6
|
|
Packit |
032894 |
name (string) "B"
|
|
Packit |
032894 |
declaration (flag_present) yes
|
|
Packit |
032894 |
signature (ref_sig8) {7cf9bbf793fcaf13}
|
|
Packit |
032894 |
[ 79] member abbrev: 7
|
|
Packit |
032894 |
name (string) "x"
|
|
Packit |
032894 |
decl_file (data1) <stdin> (1)
|
|
Packit |
032894 |
decl_line (data1) 1
|
|
Packit |
032894 |
type (ref4) [ 6e]
|
|
Packit |
032894 |
data_member_location (data1) 0
|
|
Packit |
032894 |
EOF
|
|
Packit |
032894 |
|
|
Packit |
032894 |
exit 0
|