This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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] |
On Fri, Jan 20, 2012 at 01:05:04PM -0800, Roland McGrath wrote: > I don't know of anything else anyone intends to work on any time soon. > If you have any plans, please post about them. I like to see a new release soon, but I had one little patchlet. In Dwarf 4 there is the new DW_FORM_sec_offset which replaces either DW_FORM_data4 or DW_FORM_data8 for section offsets. But dwarf_formudata doesn't recognize it. That means you cannot easily get at offset values like you could with Dwarf 3. I needed it recently when looking for .debug_ranges index sharing in DIEs. There is a "workaround" that readelf uses: case DW_FORM_sec_offset: attrp->form = cbargs->offset_size == 8 ? DW_FORM_data8 : DW_FORM_data4; /* Fall through. */ case DW_FORM_udata: case DW_FORM_sdata: case DW_FORM_data8: case DW_FORM_data4: case DW_FORM_data2: case DW_FORM_data1:; Dwarf_Word num; if (unlikely (dwarf_formudata (attrp, &num) != 0)) goto attrval_out; But that is slightly ugly and requires you keep track of the offset_size of the cu (which libdw gives you, but requires some extra work with libdwfl). So I would like to just accept DW_FORM_sec_offset in dwarf_formudata. Does that look sane, or do you want a specific dwarf_formsec_off function for that? Thanks, Mark
Attachment:
0001-Handle-DW_FORM_sec_offset-in-dwarf_formudata.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |