Menu

#397 CIE augmentation "HC" should be accepted

RELEASE_1_0
new
Kai Wang
None
libdwarf
minor
enhancement
2012-07-30
2012-07-30
No

In libdwarf_frame.c, _dwarf_frame_add_cie says

    /* We only recognize normal .dwarf_frame and GNU .eh_frame sections. */
    if (*cie->cie_augment != 0 && *cie->cie_augment != 'z') {
        ...
    }

The MetaWare compiler emits DWARF 2 debug information with augmentation string "HC" (presumably because it used to be called the "High C compiler"), which gets rejected, so the frame data can't be accessed.

As far as I can see, the only non-standard output it can emit is a DW_CFA_info instruction (0x34 with a single unsigned LEB128 argument), and that's only used when compiling unusual hand-written assembly code with a .cfa_info line. Since that's very rare, it should be safe enough to assume that "HC" is a recognised value for cie_augment and just treat it the same as the empty string.

(Admittedly this is a pretty obscure compiler - I'd prefer to be able to use the standard elftoolchain code with it, but I wouldn't mind if you say I should maintain a local fork of elftoolchain instead.)

Discussion


Log in to post a comment.