diff options
| author | Petr Machata <[email protected]> | 2009-03-25 19:25:10 -0700 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2009-03-25 19:25:10 -0700 |
| commit | 09881df7297c1e59d0e1f4bef1531ed0e48ab2f8 (patch) | |
| tree | 7eb4be5cc952d3e8117e0f2e8667aa25afa140f1 /tests | |
| parent | d0aa42a6e3728e3f08a8e261bd623db95e81d5d2 (diff) | |
<dwarf>: Don't swallow last attribute
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 6 | ||||
| -rw-r--r-- | tests/Makefile.am | 4 | ||||
| -rwxr-xr-x | tests/run-dwarf-attributes.sh | 38 |
3 files changed, 46 insertions, 2 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 6bc5000e..e523c8cd 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2009-03-25 Petr Machata <[email protected]> + + * dwarf-attributes.cc: New file. + * Makefile.am (noinst_PROGRAMS): Add it. + (dwarf_attributes_SOURCES, dwarf_attributes_LDADD): New variables. + 2009-03-25 Roland McGrath <[email protected]> * dwarf-print.cc (print_die, process_file): Take LIMIT argument. diff --git a/tests/Makefile.am b/tests/Makefile.am index e075fd03..3efc3142 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -88,7 +88,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \ run-disasm-x86.sh run-disasm-x86-64.sh \ run-early-offscn.sh \ - run-dwarfcmp-self.sh run-dwarflint-self.sh + run-dwarfcmp-self.sh run-dwarflint-self.sh run-dwarf-attributes.sh # run-show-ciefde.sh if !STANDALONE @@ -144,7 +144,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \ testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \ testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \ - testfile49.bz2 + testfile49.bz2 dwarf-attributes.sh installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ bindir=$(DESTDIR)$(bindir) \ diff --git a/tests/run-dwarf-attributes.sh b/tests/run-dwarf-attributes.sh new file mode 100755 index 00000000..e39c42f7 --- /dev/null +++ b/tests/run-dwarf-attributes.sh @@ -0,0 +1,38 @@ +#! /bin/sh +# Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc. +# This file is part of Red Hat elfutils. +# Written by Ulrich Drepper <[email protected]>, 1999. +# +# Red Hat elfutils is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by the +# Free Software Foundation; version 2 of the License. +# +# Red Hat elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Red Hat elfutils; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. +# +# Red Hat elfutils is an included package of the Open Invention Network. +# An included package of the Open Invention Network is a package for which +# Open Invention Network licensees cross-license their patents. No patent +# license is granted, either expressly or impliedly, by designation as an +# included package. Should you wish to participate in the Open Invention +# Network licensing program, please visit www.openinventionnetwork.com +# <http://www.openinventionnetwork.com>. + +. $srcdir/test-subr.sh + +testfiles testfile + +testrun_compare ./dwarf-print --depth=1 testfile <<\EOF +testfile: + <compile_unit offset=[0xb] stmt_list=0 high_pc=0x804845a low_pc=0x804842c name="m.c" comp_dir="/home/drepper/gnu/new-bu/build/ttt" producer="GNU C 2.96 20000731 (Red Hat Linux 7.0)" language=0x1>... + <compile_unit offset=[0xca] stmt_list=0x4b high_pc=0x8048466 low_pc=0x804845c name="b.c" comp_dir="/home/drepper/gnu/new-bu/build/ttt" producer="GNU C 2.96 20000731 (Red Hat Linux 7.0)" language=0x1>... + <compile_unit offset=[0x15fc] stmt_list=0x1e0 high_pc=0x8048472 low_pc=0x8048468 name="f.c" comp_dir="/home/drepper/gnu/new-bu/build/ttt" producer="GNU C 2.96 20000731 (Red Hat Linux 7.0)" language=0x1>... +EOF + +exit 0 |
