wiki:DwarfTasks
Last modified 5 years ago Last modified on 04/20/09 00:47:24

DWARF tasks & milestones

testing note

All the early milestones (all we have so far) have a testing goal in terms of a pass/fail test on a single file. For each milestone, we'll consider it accomplished when the single-file-test.sh run of that test over all the DebugInfoTesting data has no failures.

tasks

  1. C++ interface (libdw reader front-end)
    1. containers/iterators: CU, DIE, attrs
      • CU: iterable container of DIEs
      • DIE
        1. iterable container of children
        2. iterable container of attrs
      • attrs: dictionary of key(int)=>value
        • no values yet
        • container/iterator flavors:
          1. raw pair iterator
          2. dictionary w/o dup keys
          3. hides sibling
    2. Milestone: iterate full tree, see tags, attr names (int)
  2. C++ interface for writer
    1. template-compatible with reader iterators + writable
    2. simple pure memory data structures for now
    3. no attr values yet
    4. deep-copy from reader trees via tempaltes
    5. Milestone: copy input tree to writer data, apply comparator template widget to input
  3. attr value interfaces
    1. background for design: DwarfValues
    2. reader interfaces by value-space
      1. stubs for relocation details
      2. refine value class: e.g. src file name string
    3. known-attribute map
      1. Milestone: DwarfLint checks for known attrs with expected class
        1. DebugInfoTesting norel set
    4. Milestone: DwarfCmp compares values
      1. test without meaningful reference comparisons
      2. DebugInfoTesting norel set
    5. compatible writer interfaces
      1. simple pure memory data structures for now
      2. copy/initialize from reader counterpart
      3. xfrmers
        1. src file name rewrite/collect
        2. hashcons for dedup
      4. Milestone: hacked copying-DwarfCmp compares values
        1. DebugInfoTesting norel set
  4. relocatable values (see DwarfRelocs)
    1. DwarfLint checks relocs
      1. .debug_info: r_offset+r_type match form there
      2. other sections
    2. smart reader
      1. convert libdw parsers to use hooks for address/offset handling https://fedorahosted.org/pipermail/elfutils-devel/2009-March/000208.html
        1. hand-kludge test hooks that produce stderr output
        2. hack/enhance dwarflint to emit similar line for each reloc
        3. run e.g. dwarf-print or dwarfcmp to traverse data so as to pass all data through those hooks, get the output
        4. compare dwarflint and libdw-emitted lists, make sure they match
        5. Milestone: comparison matches
          1. self-test on build's own .o files
          2. DebugInfoTesting rel set
    3. value interfaces for relocatable value classes
      1. elfutils::symbolic_address
        • DW_FORM_addr attributes
        • line info entries
        • ranges/aranges
      2. DWARF constant blocks with relocs in middle
      3. location expressions (DW_OP_addr)
        • until proper locexpr interface, treat as constant blocks
    4. reloc generation
      1. common reloc-generation internals
        1. ebl_simple_reloc_type reciprocal to choose r_types
      2. hooks in all those value places
      3. hooks in all places producing .debug_* offsets
        1. "final" and fully-relocatable options