inline bool operator== (const const_iterator &other) const
{
return (_m_die._m_die.addr == other._m_die._m_die.addr
- && _m_offset == other._m_offset);
+ && _m_attr.valp == other._m_attr.valp);
}
inline bool operator!= (const const_iterator &other) const
{
inline attribute operator* () const
{
- if (unlikely (_m_offset == 1))
+ if (unlikely (_m_attr.valp == NULL))
throw std::runtime_error ("dereferencing end iterator");
return attribute (_m_die, _m_attr);
}
+2009-03-25 Petr Machata <pmachata@redhat.com>
+
+ * dwarf-attributes.cc: New file.
+ * Makefile.am (noinst_PROGRAMS): Add it.
+ (dwarf_attributes_SOURCES, dwarf_attributes_LDADD): New variables.
+
2009-03-25 Roland McGrath <roland@redhat.com>
* dwarf-print.cc (print_die, process_file): Take LIMIT argument.
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
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) \
--- /dev/null
+#! /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 <drepper@redhat.com>, 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