2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2013-2014, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
9 #include "DebugInfoEntries.h"
19 static void GetDIEName(const DebugInfoEntry
* entry
,
21 static void GetDIETypeName(const DebugInfoEntry
* entry
,
23 static void GetFullDIEName(const DebugInfoEntry
* entry
,
25 static void GetFullyQualifiedDIEName(
26 const DebugInfoEntry
* entry
,
29 static bool GetDeclarationLocation(DwarfFile
* dwarfFile
,
30 const DebugInfoEntry
* entry
,
31 const char*& _directory
,
33 int32
& _line
, int32
& _column
);
35 template<typename EntryType
, typename Predicate
>
36 static EntryType
* GetDIEByPredicate(EntryType
* entry
,
37 const Predicate
& predicate
);
41 template<typename EntryType
, typename Predicate
>
43 DwarfUtils::GetDIEByPredicate(EntryType
* entry
, const Predicate
& predicate
)
48 // try the abstract origin
49 if (EntryType
* abstractOrigin
= dynamic_cast<EntryType
*>(
50 entry
->AbstractOrigin())) {
51 entry
= abstractOrigin
;
56 // try the specification
57 if (EntryType
* specification
= dynamic_cast<EntryType
*>(
58 entry
->Specification())) {
59 entry
= specification
;
64 // try the type unit signature
65 if (EntryType
* signature
= dynamic_cast<EntryType
*>(
66 entry
->SignatureType())) {
76 #endif // DWARF_UTILS_H