1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #427 (closed defect: fixed)

Opened 11 months ago

Last modified 10 months ago

Wrong interpretation of code_offset in dwarf_add_line_entry

Reported by: jtytgat Owned by: kaiwang27
Priority: major Milestone: RELEASE_1_0
Component: libdwarf Version:
Keywords: Cc:


Compared to SGI libdwarf implementation, code_offset in dwarf_add_line_entry is interpreted differently. In elftoolchain, it is an address offset compared to the address specified in the last dwarf_lne_set_address call.

The SGI libdwarf implementation it is an address like the one specified in dwarf_lne_set_address calls and gets implicitly the same relocation as specified in the last dwarf_lne_set_address call (hence, the 'offset' in code_offset).

It is a bit confusing and not well documented but it is clear when trying out the same code against elftoolchain and libdwarf.

I've attached a patch to address this. I guess the corresponding man3 page of dwarf_add_line_entry needs fixing and/or enhanced.


libdwarf_add_line_entry.patch (0.6 KB) - added by jtytgat 11 months ago.

Change History

Changed 11 months ago by jtytgat

Changed 10 months ago by kaiwang27

  • status changed from new to closed
  • resolution set to fixed

Patch committed in [2953]. Thanks!

Note: See TracTickets for help on using tickets.