Skip to content

Commit

Permalink
Fix inverted logic in DwarfDyninst::is_cudie (#1505)
Browse files Browse the repository at this point in the history
If a DIE is a CU, then it contains a reference to its Dwarf_CU.

Introduced by 71f2e14 (PR1499).
  • Loading branch information
hainest committed Sep 6, 2023
1 parent 7acb767 commit d7047e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dwarf/h/dwarf_cu_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace Dyninst { namespace DwarfDyninst {
inline bool is_typecu(Dwarf_Die die) { return dwarf_tag(&die) == DW_TAG_type_unit; }

inline bool is_cudie(Dwarf_Die die) {
// If there is an inner CU attribute, then it's not a CU
if (die.cu)
// If there is not an inner CU attribute, then it's not a CU
if (!die.cu)
return false;

// These are best guess. Ideally, we'd like to interrogate
Expand Down

0 comments on commit d7047e2

Please sign in to comment.