From 2f4d55654675a22c71e78b7038bdd758a29ab35a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 31 Aug 2010 01:28:03 -0700 Subject: debugging hacks, not to be merged --- libdw/c++/dwarf_comparator | 4 ++++ libdw/c++/dwarf_output | 10 ++++++++-- libdw/c++/dwarf_tracker | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/libdw/c++/dwarf_comparator b/libdw/c++/dwarf_comparator index fa167e52..d46338e6 100644 --- a/libdw/c++/dwarf_comparator +++ b/libdw/c++/dwarf_comparator @@ -304,6 +304,10 @@ namespace elfutils inline bool operator () (const ait1 &it1, const ait2 &it2) { + if (!_m_cmp.equals ((*it1).second, (*it2).second)) + { + asm("nop"); + } return _m_cmp.equals ((*it1).second, (*it2).second); } }; diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output index 3110ea30..3a2bbabd 100644 --- a/libdw/c++/dwarf_output +++ b/libdw/c++/dwarf_output @@ -1,5 +1,5 @@ /* elfutils::dwarf_output -- DWARF file generation in -*- C++ -*- - Copyright (C) 2009 Red Hat, Inc. + Copyright (C) 2009, 2010 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -153,6 +153,12 @@ namespace elfutils friend class dwarf_output; friend class dwarf_output_collector; + __attribute__((used)) die_info_pair *info () const + { + return reinterpret_cast + (const_cast (this)); + } + public: class attributes_type : public dwarf_data::attributes_type @@ -1632,7 +1638,7 @@ namespace elfutils /* XXX disabled! tentative circularity matches taint this record! must record taint to avoid caching, or punt caching. */ - //_m_pending->_m_matched = doppleganger; + _m_pending->_m_matched = doppleganger; } /* This is called by finalize_children. In case of imported_unit diff --git a/libdw/c++/dwarf_tracker b/libdw/c++/dwarf_tracker index cbd253e8..5baa6b14 100644 --- a/libdw/c++/dwarf_tracker +++ b/libdw/c++/dwarf_tracker @@ -706,15 +706,15 @@ namespace elfutils return matched._m_lhs == NULL && matched._m_rhs == NULL; } - inline bool notice_match (reference_match &/*matched*/, - const die1 &, const die2 &/*b*/, bool matches) + inline bool notice_match (reference_match &matched, + const die1 &, const die2 &b, bool matches) { /* XXX not reliable! This match could be predicated on a tentative match of a circular ref inside. We can't cache that! + */ if (matches && matched._m_lhs != NULL) matched._m_lhs->second.insert (b); - */ return matches; } -- cgit v1.2.1