From: Petr Machata Date: Thu, 26 Mar 2009 01:22:00 +0000 (+0100) Subject: Use newly-available --depth from dwarf-print in the test case X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fpmachata%2Fdwarf;p=thirdparty%2Felfutils.git Use newly-available --depth from dwarf-print in the test case --- diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf index c6a31a913..81d7d85c4 100644 --- a/libdw/c++/dwarf +++ b/libdw/c++/dwarf @@ -637,7 +637,7 @@ namespace elfutils inline attribute operator* () const { - if (unlikely (_m_offset == 1 && _m_attr.valp == NULL)) + if (unlikely (_m_attr.valp == NULL)) throw std::runtime_error ("dereferencing end iterator"); return attribute (_m_die, _m_attr); } diff --git a/tests/dwarf-attributes.sh b/tests/dwarf-attributes.sh deleted file mode 100755 index be3363e78..000000000 --- a/tests/dwarf-attributes.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh -# Copyright (C) 2009 Red Hat, Inc. -# This file is part of Red Hat elfutils. -# -# 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 -# . - -./dwarf-print "$@" | sed -n '/compile_unit/{p;q;}' diff --git a/tests/run-dwarf-attributes.sh b/tests/run-dwarf-attributes.sh index b03f318bf..e39c42f7b 100755 --- a/tests/run-dwarf-attributes.sh +++ b/tests/run-dwarf-attributes.sh @@ -28,8 +28,11 @@ testfiles testfile -testrun_compare $srcdir/dwarf-attributes.sh testfile <<\EOF - +testrun_compare ./dwarf-print --depth=1 testfile <<\EOF +testfile: + ... + ... + ... EOF exit 0