This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/dwarf-2] Fix for the null record problem


Actually, I just realized: it's incorrect to write

        if (dwarf2_attr (die, DW_AT_declaration, cu)) ...;

when you want to do ... when die is a declaration.  As with any flag
attribute, you must write:

        decl_attr = dwarf2_attr (die, DW_AT_declaration, cu);
        if (decl_attr && DW_UNSND (decl_attr)) ...;

(It might not be bad to add a function 'attribute_true_p (DIE, ATTR)'
that captures this logic, because it's used a lot.  But that should be
a separate cleanup; don't feel obliged.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]