From: Roland McGrath Date: Mon, 17 Aug 2009 05:22:51 +0000 (-0700) Subject: Add dwarf::debug_info_entry::identity_type typedef, make it uintptr_t instead of... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0570ca02252356d059d231fa708488f211de4045;p=thirdparty%2Felfutils.git Add dwarf::debug_info_entry::identity_type typedef, make it uintptr_t instead of Dwarf_Off. --- diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf index ef2833b43..56d58e2fc 100644 --- a/libdw/c++/dwarf +++ b/libdw/c++/dwarf @@ -497,7 +497,8 @@ namespace elfutils /* This is an identity pointer that only matches the very same DIE in the very same file (same opened Dwarf instance). */ - inline ::Dwarf_Off identity () const + typedef uintptr_t identity_type; + inline identity_type identity () const { return (uintptr_t) _m_die.addr; } diff --git a/libdw/c++/dwarf_edit b/libdw/c++/dwarf_edit index 2ac1afb0b..9457acfc7 100644 --- a/libdw/c++/dwarf_edit +++ b/libdw/c++/dwarf_edit @@ -237,7 +237,7 @@ namespace elfutils return !(*this == other); } - inline ::Dwarf_Off identity () const + inline dwarf::debug_info_entry::identity_type identity () const { return (uintptr_t) this; } diff --git a/libdw/c++/dwarf_output b/libdw/c++/dwarf_output index 2d05665d9..3ba2bfcaa 100644 --- a/libdw/c++/dwarf_output +++ b/libdw/c++/dwarf_output @@ -438,7 +438,7 @@ namespace elfutils return !(*this == other); } - inline ::Dwarf_Off identity () const + inline dwarf::debug_info_entry::identity_type identity () const { return (uintptr_t) this; } diff --git a/libdw/c++/dwarf_ref_maker b/libdw/c++/dwarf_ref_maker index 1bceeca74..cfb6c4a10 100644 --- a/libdw/c++/dwarf_ref_maker +++ b/libdw/c++/dwarf_ref_maker @@ -130,7 +130,8 @@ namespace elfutils } }; - std::tr1::unordered_map< ::Dwarf_Off, seen> _m_map; + std::tr1::unordered_map _m_map; public: inline dwarf_ref_maker () diff --git a/libdw/c++/dwarf_tracker b/libdw/c++/dwarf_tracker index ff20d3800..ae4179f20 100644 --- a/libdw/c++/dwarf_tracker +++ b/libdw/c++/dwarf_tracker @@ -86,7 +86,8 @@ namespace elfutils /* We record every DIE we have seen here, mapping its .identity () to the die_path of parent DIEs taken to reach it. */ - typedef std::tr1::unordered_map< ::Dwarf_Off, const die_path> die_map; + typedef std::tr1::unordered_map die_map; die_map *_m_seen; bool _m_delete_seen; @@ -174,7 +175,7 @@ namespace elfutils // Random access to a DIE, find the path of the walk that gets there. inline const die_path &path_to (const die &a) { - ::Dwarf_Off id = a->identity (); + const dwarf::debug_info_entry::identity_type id = a->identity (); std::pair found = _m_seen->insert (std::make_pair (id, bad_die_path ())); if (found.second @@ -355,8 +356,10 @@ namespace elfutils tracker2 _m_right; typedef std::tr1::unordered_map< - ::Dwarf_Off, std::pair > + dwarf::debug_info_entry::identity_type, + std::pair + > > equiv_map; equiv_map *_m_equiv; bool _m_delete_equiv;